Login | Register
My pages Projects Community openCollabNet

argouml
Wiki: Diff for "eUML"

Edit this page | Links to this page | Page information | Attachments | Refresh page

 

Differences between revisions 4 and 9 (spanning 6 versions)

Deletions are marked like this. Additions are marked like this.
Line 17: Line 17:
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). Keep this in mind when creating profiles with ArgoUML. 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).
Line 19: Line 19:
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 {{{<uml:Model ...>}}} node, while a profile begins with a {{{<uml:Profile ...>}}} node (after the XMI header).

Assuming that modeling of profiles is straightforward, so we continue with the concept of applying a profile to an eUML model.

=== Profile application ===

In ArgoUML, a profile is applied via the "Profile Configuration". We don't comment on this here.

Applying a profile basically means referring it in the model. In XMI, this will be done by a "href" attribute inside of a "profileApplication" subtree:

{{{<uml:Model [...] xmi:id="<MODEL_ID>">
  [...]
  <profileApplication xmi:type="uml:ProfileApplication" [...] applyingPackage="<MODEL_ID>">
    <xmi:Extension extender="http://www.eclipse.org/emf/2002/Ecore">
      <eAnnotations xmi:type="ecore:EAnnotation" [...]>
        <references xmi:type="ecore:EPackage" href="<REF_TO_ECORE_ELEMENT>"/>
      </eAnnotations>
    </xmi:Extension>
    <appliedProfile xmi:type="uml:Profile" href="<REF_TO_PROFILE_ID>"/>
  </profileApplication>
</uml:Model>}}}

Why is a nonstandard {{{<xmi:Extension [...]>}}} introduced? Because eclipse EMF can only apply a profile via it's Ecore representation, there is no way to avoid this. This is done programmatically by calling a method called {{{define()}}} on the profile. This command adds a Ecore section to the profile. To keep our profiles clean from this nonstandard extension, we store profiles without "{{{define()}}}"ing them and do this right after loading a profile. Because the model refers to the introduced Ecore elements as we see above, we take the risk that the created Ecore IDs are not the same like they was at the last profile loading step. But this works so far.

TODO: Is that really ok? Looks unsatisfying. Check with standard models and profiles at MIWG.

TODO: Continue...
We have separate page for more information on ["UML2, Profiles and XMI"].

The model implementation "eUML" is our first UML 2.x model subsystem implementation. It uses eclipse UML2 and 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_<version>.jar are set, which is the case in the argouml2.<bat|sh> 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).

We have separate page for more information on UML2, Profiles and XMI.

eUML (last edited 2010-12-14 12:19:50 -0700 by thn)