Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » Operation and parameters code generation queries
Operation and parameters code generation queries [message #1738564] Wed, 20 July 2016 21:10 Go to next message
Higo Felipe is currently offline Higo FelipeFriend
Messages: 4
Registered: June 2016
Junior Member
Hello,

I'm working with the UML 2.4.1 metamodel. After having created a model based on that metamodel, I want to generate the code of the same model. The model has operations, which, in turn, have parameters, as informs the metamodel on page 95 of this documentation.

I read some documentation and articles on the Acceleo and MTL language, but it was not something so clear and plain to me, and I could not get a query to generate these operations with its parameters. Could anyone help me with more information?

Best regards,

H.
Re: Operation and parameters code generation queries [message #1738602 is a reply to message #1738564] Thu, 21 July 2016 09:06 Go to previous messageGo to next message
Laurent Goubet is currently offline Laurent GoubetFriend
Messages: 1902
Registered: July 2009
Senior Member
Hi,

You might want to have a look at existing generators such as what is provided by the umlgen project, which should be able to meet your needs out of the box Smile.

Please let me know if you have specific issues or if umlgen doesn't do what you want it to.

Laurent Goubet
Obeo
Re: Operation and parameters code generation queries [message #1738627 is a reply to message #1738602] Thu, 21 July 2016 14:10 Go to previous messageGo to next message
Higo Felipe is currently offline Higo FelipeFriend
Messages: 4
Registered: June 2016
Junior Member
Thank you for the response, Laurent!

I already knew umlgen, but as you mentioned, it's not it exactly what I'm working. Confused

I am now working with a domain-specific language based on UML metamodel, and want to generate Java code from it. My main problem in this study is exactly generate the code of operations and their input parameters. Could you help me at that particular point?

[Updated on: Thu, 21 July 2016 14:12]

Report message to a moderator

Re: Operation and parameters code generation queries [message #1738706 is a reply to message #1738627] Fri, 22 July 2016 12:49 Go to previous message
Laurent Goubet is currently offline Laurent GoubetFriend
Messages: 1902
Registered: July 2009
Senior Member
Hi,

Please tell us what you have done and how it fails, since we can't answer much without a specific question and example of what you're trying to achieve.

Generating operations should be something that the umlg generators do, and you can find examples on how to do it directly there if it's not exactly meeting your needs, for example, this one shows how to iterate over the parameters, or this one the shows how the operation's signature is generated.

Laurent Goubet
Obeo
Previous Topic:query with multiple parameters
Next Topic:for loop Sequence type mismatch
Goto Forum:
  


Current Time: Sat May 11 20:59:54 GMT 2024

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

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

Back to the top