The model implementation "eUML" is our first UML 2.x model subsystem implementation. It uses eclipse [http://www.eclipse.org/modeling/mdt/?project=uml2 UML2] and [http://www.eclipse.org/modeling/emf/ EMF]. This page describes some of the most important concepts of it.
== How to enable it ==
In order to make ArgoUML use eUML, check if the {{{org.eclipse..jar}}} files are available in the ArgoUML installation directory (should be the case since the 0.29.x releases). At startup, make sure that the parameters {{{-Dargouml.model.implementation=org.argouml.model.euml.EUMLModelImplementation -DeUML.resources=org.eclipse.uml2.uml.resources_.jar}}} are set, which is the case in the {{{argouml2.}}} startup scripts.
For using eUML in eclipse, use one of the available launch configurations that include "eUML" or "UML2" in their name.
== Configuration ==
No need to further configure eUML by users! This section describes how ArgoUML ''internally'' configures UML2/EMF.
TODO: Describe how things are set up, especially in {{{org.argouml.model.euml.EUMLModelImplementation}}}.
== Profiles ==
ArgoUML supports both modeling of UML models and UML profiles. Please note that since UML 2.x models and profiles are different things, so ArgoUML makes a distinction between a model and a profile project (as long as ArgoUML has the "one project one model" restriction).
=== Profile creation ===
In UML 2.x, a profile is a separate metamodel element. Both metamodel elements "Model" and "Profile" are packages. In ArgoUML, they are top level packages. You can see this in the XMI files created by ArgoUML: a model begins with a {{{}}} node, while a profile begins with a {{{}}} node (after the XMI header).
Such a profile object is created in ArgoUML via the "New Profile" functionality. It is then displayed in the explorer pane, and elements like stereotypes or datatypes can be added to it. Since ArgoUML saves this in a project file (.zargo), even diagrams can be added to the profile project.
Elements in a profile can only be applied to model elements, when the profile is "deployed" as an XMI file. This is performed via the "Deploy" menu item when you right-click on a profile in the explorer, which then does three things:
1. In eUML, a method {{{define()}}} is called on the profile package, which adds (nonstanard) Ecore extensions to it.
1. Export the defined profile as an to-be-chosen XMI file.
1. Load it as a read-only profile so that it's available in the "Profile Configuration".
Let's create a sample profile with one stereotype 'mystereotype', which can be
applied to a class. This is XMI representation is:
{{{}}}
This cannot be applied by a model, because in eclipse UML2 the profile needs to
be "defined" first. This step introduces an Ecore package in the profile, that
represents the whole profile. A model that applies the profile relies on that
Ecore representation! When saved as XMI, only that Ecore package is added in
comparison to the previous listing 1:
{{{}}}
Such a defined profile can then be used, which is presented next.
=== Profile application ===
In ArgoUML, a profile is applied via the "Profile Configuration". Applying a profile basically means referring it in the model. Let's give an example here.