Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Papyrus » auto generate java getters and setters
auto generate java getters and setters [message #1774265] Thu, 12 October 2017 11:25 Go to next message
Fabien Toune is currently offline Fabien TouneFriend
Messages: 1
Registered: October 2017
Junior Member
I'm using eclipse Oxygen.1a Release, with latest papyrus installed.
Is it possible to have setters, getters and/or default constructor generated automatically when applying "Generate Java Code" to a class diagram ?

To be more general, is there a way to customize the code generation ?

Thanx !

Re: auto generate java getters and setters [message #1774384 is a reply to message #1774265] Fri, 13 October 2017 14:18 Go to previous messageGo to next message
Cedric Dumoulin is currently offline Cedric DumoulinFriend
Messages: 49
Registered: July 2009
Have you checked in the Papyrus properties under Java code generator propoerties ?

In the original version of the Java code generator (which I developped), it was possible to set such options in Papyrus properties.
I don't know if such options still exist.

Re: auto generate java getters and setters [message #1774481 is a reply to message #1774384] Mon, 16 October 2017 08:53 Go to previous message
Ansgar Radermacher is currently offline Ansgar RadermacherFriend
Messages: 163
Registered: March 2011
Location: Paris Saclay, France
Senior Member
Dear Fabien,

the code generation can be customized by executing a set of model-to-model transformations (on an intermediate model) prior to code generation, as shown here overview. We use this mechanism to implement state-machines. You can define an additional transformation on the model level and associate Java code that does the actual transformation. We will soon add a suitable documentation how to do that. In the meantime, you could check out the plugin org.eclipse.papyrus.designer.transformation.library (get the sources via git SW Designer git). A transformation is currently only executed, if you pass by a deployment plan, in which you can choose a transformation chain and additional transformations. If you want to play first with the mechanism, install the "Transformation" feature of SW Designer.

Previous Topic:C++ reverse to UML generation is broken on Oxygen
Next Topic:Problem installing Papyrus 0.9.0.v201207020923
Goto Forum:

Current Time: Fri Oct 19 08:43:46 GMT 2018

Powered by FUDForum. Page generated in 0.01850 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top