Argo2Ecore
|
|
Argo2Ecore converts UML models created with ArgoUML (www.argouml.org)
to the
Eclipse UML dialect Ecore (see www.eclipse.org/emf).
It allows users to create
graphical UML models using ArgoUML and then use the EMF codegenerator to
generate java code. IMHO ArgoUML is by far the best open source UML modelling tool and
much better than some commercial alternatives including omondo's eclipseuml.
New in version 3.0.0
- adapt to Eclipse 3.3 (Europa)
- fix bug 1611132: Changeability for attributes not transferred to ecore (patch by buschp)
- fix bug 1340891: generate ecore annotation for constraints (patch by jfrain2005)
- add support for EMF "unsettable" attribute (by jfrain2005)
- add support for default attribute values (by jfrain2005)
- add support for UML enumerations (by jfrain2005)
New in version 2.1.0
- Version 2.1 is an update, built with Eclipse 3.1, EMF 2.1 and ArgoUML 0.20.
There are no functional changes but it operates on xmi files instead of zargo files, i.e.
in ArgoUML the model must be exported to XMI. The internal XMI parser
NSUML has been
replaced with MDR.
New in version 2.0.0
- Version 2 is an update, built with Eclipse 3.0M8, EMF 2.0 and ArgoUML 0.15.5.
There are no functional changes.
New in version 1.4.1
- Sorts the classes by name, so the editor plugin menus are much cleaner
New in version 1.4
- Generates an EDataType for all references to classes from java.* and javax.* packages
- a class with stereotype <<interface>> is treated as an interface, i.e. it will create an EClass with isInterface() == true
- bugfix with multiple inheritance. Now the generated class extends the first superclass whose isInterface() == false and implements all other superclasses
New in version 1.3
- downgraded to argouml version 0.14.1 (0.15 disappeared from tigris.org)
- Added several checks for error conditions like duplicate names or invalid types.
Now it should be fairly difficult to produce an invalid *.ecore with ArgoUML.
New in version 1.2
- upgraded to argouml version 0.15.1
New in version 1.1
- added Support for Enumerations. These are modelled as classes with the
<<enumeration>> stereotype. Its attributes become the EEnumLiterals
of Ecore.
- added Support for Operations
Example
The ArgoUML model test.zargo
(test.xmi) and the generated
test.ecore model contains the following model:
How to use
Argo2Ecore was tested with ArgoUML-0.20 and EMF-2.1.
It may or may not work with other versions.
To convert
an Argo model, export to XMI in ArgoUML, right click on the *.xmi file in the Eclipse
package explorer. In the pop up menu choose Convert to Ecore.
This will create the ecore model.
Known issues
- Its easy in ArgoUML to remove objects (e.g. associations) from
the diagram but leave them in the model. In this case Argo2Ecore will still
convert the invisible model objects. This may result in
strange behaviour, if the diagram looks right but the invisible
model objects generate a "wrong" ecore model
- You may get an Java.lang.IllegalArgumentException:
The classifier(s) "MyDataType" must be moved from model to package scope.
The ArgoUML model itself is not mapped to an ecore package, so
if the ArgoUML model "mymodel" contains a package "mypackage" the resulting ecore
package will be "mypackage" and not "mymodel.mypackage".
Therefore ModelElements that are owned by the model itself will not be
translated to ecore. ArgoUML places DataTypes (predefined like "int"
as well as user defined) into the model namespace by default.
Make sure to move these into a packagage.
Supported Tagged Values
- volatile=true/false - the ecore volatile attribute of attributes and references
- transient=true/false - ecore transient attribute of attributes and references
- instance=classname - instance class name of EDataType
- serializable=true/false - serializable attr of EDataType
Enjoy,
Andreas