Home » Modeling » MDT (Model Development Tools) » UML2 MOFM2T API DOC?(Is there an API Doc for uml2/5.0.0/UML anywhere?)
| | |
Re: UML2 MOFM2T API DOC? [message #1755169 is a reply to message #1755152] |
Tue, 28 February 2017 16:57 |
Philip Schröder Messages: 28 Registered: January 2017 |
Junior Member |
|
|
First of all thank you both for your quick and informative answers.
I beg your pardon, that I postet in the wrong Forum;
I am still not sure, if this is about UML or MOFM2T or Acceleo.
Maybe a little more details would have been great.
I have already read those
https://wiki.eclipse.org/Acceleo/Getting_Started
http://www.omg.org/spec/MOFM2T/1.0/PDF/
http://www.omg.org/spec/UML/2.5/PDF/
The first one, for instance has an example for generating JavaBeans
containing the following code snippet
[template public generate(aClass : Class)]
[file (aClass.name.concat('.java'), false)]
public class [aClass.name.toUpperFirst()/] {
[for...
So I know at least, that there has to be some Object or Type named 'Class', which has to have an attribute 'name', which is itself an object with an operation 'toupperFirst()'.
I looked for 'toupperFirst' in the above documents, found it in the second but not in the third one.
But, I neither found the keywords 'stereotype' nor 'package' in the second one
(package is in there, but not as a metaclass but only somewhere within XML-Code).
When I look at the JavaDoc provided by Christian W. Damus
http://download.eclipse.org/modeling/mdt/uml2/javadoc/5.0.0/
The UML metaclass 'Class' has a method called ''getName()" as Ed Willink pointed out,
which returns a 'java.lang.String', which then doesn't have a method "toupperFirst()".
So I wonder if all those really are the right places to look for a documentation.
Best regards
Philip.
P.s. It seems to me that XTend is for generating Java Source code, while I want Java, C++, Gradle, CMake code.
[Updated on: Tue, 28 February 2017 17:05] Report message to a moderator
|
|
| |
Re: UML2 MOFM2T API DOC? [message #1755195 is a reply to message #1755172] |
Tue, 28 February 2017 22:59 |
Philip Schröder Messages: 28 Registered: January 2017 |
Junior Member |
|
|
Hello once again,
I have looked into XTend,
but I guess, I will stay with Acceleo for the time being.
The WYSIWYG nature seems to make it way more easier atm.
XTend looks like you need to invest considerably more time into learning the basics.
Anyway, I will for sure keep it in mind, and maybe try it out later.
Concerning my question, now that I realized, with your help, that the functions are those of Acceleo/MOFM2T together with those of the Metamodel (in my case UML 2.5),
I guess, I will be able to figure out the rest on my own
using the 3 documents that I posted in my last post in addition with the Acceleo help.
Thank you guys.
|
|
| |
Re: UML2 MOFM2T API DOC? [message #1755229 is a reply to message #1755215] |
Wed, 01 March 2017 10:56 |
Philip Schröder Messages: 28 Registered: January 2017 |
Junior Member |
|
|
Hello Ed,
thank you for clarifying.
It really looks promising,
but I don't understand, where the <<expression>> syntax comes from,
looks like EBNF to me.
In the XTend documentation
https://www.eclipse.org/xtend/documentation/204_activeannotations.html
it is suddenly used when it comes to "Phase 4: Code Generation" but never introduced.
Clearly in your example this is the part where the Java++ resides, and the rest seems to be literal text, starting within the writer.append; I guess the ''' do initiate some literal text block and somehow the << >> make an exception or something like that, but what are they,
are those the in-memory elements, that the next section "On Expressions and Statements" talks about?
I have never seen that syntax until now, I am more a C++ developer though, and my Java knoweldge is somewhat outdated.
Thank you for your time and trouble.
Best
Philip.
|
|
| | |
Goto Forum:
Current Time: Wed Sep 25 03:33:52 GMT 2024
Powered by FUDForum. Page generated in 0.05333 seconds
|