|Re: [ATL]UML Models and Java Models [message #62713 is a reply to message #62459]
||Wed, 26 September 2007 20:21
| Frédéric Jouault
Registered: July 2009
> I�m a beginner user of ATL-DT plugin. I want do a transformation that
> its input model is an UML Class Diagram from any UML tool (Magic Draw,
> Poseidon, etc.) and its output model is the java code for this diagram.
> Well, I did this transformation using this metamodel for UML:
> And this metamodel for Java code:
> http://www.eclipse.org/gmt/am3/zoos/atlanticZoo/#JavaAbstrac tSyntax
> So, I have two doubts:
> 1.Someone knows a material about how to do that an xmi generated by any
> tool been an instance of UML2 Metamodel.
Supporting every UML tool is very difficult to achieve:
- There are several versions of UML.
- Many tools have their own (incompatible) UML metamodels, derived from
a given official version.
- There are several versions of XMI.
- Many tools have their own (incompatible) implementation of XMI,
derived from a given official version.
In practice, one solution is to choose one UML metamodel as pivot, and
then build bridges to & from other tools. In your case, the pivot would
Note that if you use the UML2 metamodel available from the atlanticZoo,
you may have problems using specific features like profiles: the UML2
plugin implements most of the semantics of profiles in Java code.
Therefore, if you intend to use profiles, you should probably directly
use the UML2 plugin. To do this with ATL, instead of loading UML2.ecore,
you simply use the nsURI.
> 2.How I generate the java code from model (with all line commands)?
TCS (see http://wiki.eclipse.org/TCS) may be used. However, it is
usually more appropriate for DSLs (Domain-Specific Languages) than for
GPLs (General Purpose Languages) like Java.
Another solution is to use the model-to-text tools (see
Powered by FUDForum
. Page generated in 0.02110 seconds