Home > XMI Editor

UML metamodel element


You can change, add or delete metamodel elements using the
XMI 2.1 Editor view, the property view or the UML Editor.
In order to understand the metamodel concept you should consider two kind of elements (e.g. Java and non Java element).

  • If you use the Package Explorer or the UML Editor menu, then all created elements in the class diagram will be Java elements.
  • If you use the XMI 2.1 Editor, then all new created elements will only be UML elements (e.g. no Java code)

1.UML elements

  1. Add a new UML element
    1. Add a UML Element in the class diagram
    2. Add a UML Element in the other diagrams
  2. Change
  3. Delete


    1.1 Add a new UML Element in a class diagram

    You can add new UML element which belongs to the class diagram category (e.g. Class, Interface and Enumeration) by just a drag and drop from the XMI 2.1 Editor.
    The UML element doesn't generate Java code and can be mixed with existing Java Classes in the same class diagram.
    In order to add new UML elements in the class diagram you should use the drag and drop from the XMI 2.1 Editor to the UML Editor feature.
    Only the XMI 2.1 Editor can generate UML classes for the class diagram (e.g. the class diagram omondo toolbar is still generating only Java elements).

    To add a new UML Class in the class diagram.
    First create a new class in the model editor by selecting New Child > Packaged Element > Class
 


    The Class has been created in the XMI 2.1 Editor



    Drag and drop the Class from the XMI 2.1 Editor to the UML Editor.
    You can notice that the UML Class borders are black.




   You can add new UML Property or Operation to the Class.
    Click on the Class > New > Property



    The created Class is only a metamodel Class and doesn't have any Java code.


    1.2 Add new UML element in UML diagram (except class diagram)

    The Omondo toolbar will immediately synchronize the UML editor and the XMI 2.1 Editor.
    EclipseUML 2008 is using the same metamodel and instance, therefore each change in the editor is immediately updated in the metamodel.
    Note that the Class diagram toolbar is generating Java classes, and that the XMI 2.1 Editor is generating new UML Classifiers (e.g. Class, Interface, Enumeration...).
    Other diagrams (e.g. not the Class diagram) toolbar are only generating UML metamodel elements, and no Java code.

    The following example show the Actor creation from the UseCase diagram Toolbar in an UseCase Diagram.
    You can notice that the metamodel & Properties View is immediately updated


    2. How to change UML elements metamodel properties :

    If you click on the UML element in the XMI 2.1 Editor then the Properties View will be immediately synchronized.
    Changing any property in the Property view will immediately update the UML Editor and the XMI 2.1 Editor.

    The following example show how to rename Actor to UML Actor using the Properties View:


    3. How to delete UML Metamodel element:

    If you click an element in the Model Editor, you can then delete this element from the metamodel.
    This element will also be automatically deleted from the UML Editor.

    Select UML Actor in the XMI 2.1 Editor > Delete


    The UML Editor is immediately synchronized and the UML Actor element is deleted from the Model and UML Editor.