Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Papyrus » Code generation from a transformed model
Code generation from a transformed model [message #1766824] Tue, 27 June 2017 15:57 Go to next message
Mahin Abbasipour is currently offline Mahin AbbasipourFriend
Messages: 24
Registered: June 2013
Junior Member
Hello,

I hope that I am asking my question in a right forum.
I have an ATL transformation that the input and out metamodels are the profiles I defined. The transformed output model has some operations. I want to generate Java code from the output model.
I am able to generate the Java code as explained in https://wiki.eclipse.org/Java_Code_Generation but I don't know how to generate code from a transformed model. Any help is appreciated.

Thank you very much.
Mahin
Re: Code generation from a transformed model [message #1767204 is a reply to message #1766824] Mon, 03 July 2017 14:27 Go to previous messageGo to next message
Ansgar Radermacher is currently offline Ansgar RadermacherFriend
Messages: 126
Registered: March 2011
Location: Paris Saclay, France
Senior Member
Is your output model still basically a UML model, but with some specific stereotypes? If yes, the Papyrus Java code generator can generate code from it, but will of course ignore these specific stereotypes.

If I understand your question, you cannot call the code generator the usual way, since the generated model is "only" a UML file (no Papyprus .di/.notation). Therefore, you cannot open it with Papyrus. If yes, a workaround is to create the missing files: select the UML file in the Project Explorer and then right click on New -> Papyrus Model to create a (basically empty) notation and di file. (It is also possible to open a UML file with Papyrus, but it will complain about the missing files)
Re: Code generation from a transformed model [message #1767232 is a reply to message #1767204] Mon, 03 July 2017 21:29 Go to previous message
Jeni Martin is currently offline Jeni MartinFriend
Messages: 42
Registered: November 2012
Member
Hello,

I tried what you kindly suggested, but when I right click on one of the transformed classes, and then choose "Designer"-->Generate Java code, it says that the operation is not enabled.

Thanks,
Mahin

[Updated on: Mon, 03 July 2017 21:33]

Report message to a moderator

Previous Topic:No SysML Language for Oxygen
Next Topic:CSV formatting for datatypes
Goto Forum:
  


Current Time: Sun Apr 22 20:04:45 GMT 2018

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

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