Versions Compared
Key
- This line was added.
- This line was removed.
- Formatting was changed.
The MagicDraw (or other modeling tool developed by No Magic Inc.us) 17.0 UML metamodel has a nested package structure. UML is a root package that has nested subpackages, for example, classes/mdkernel, components/mdbasiccomponents, mdusecases. Metadata about a specific model element can be found in the package of the element. For example, a UML model element Property is from the package uml/classes/mdkernel, so metadata about Property can be found in the package com.nomagic.uml2.ext.magicdraw.classes.mdkernel.metadata.MdkernelPackage.
Code Block | ||
---|---|---|
| ||
EAttribute nameAttribute = UMLPackage.Literals.NAMED_ELEMENT__NAME; |
Model elements can be created using the EMF UML factory com.nomagic.uml2.ext.magicdraw.metadata.UMLFactory: For example:
Code Block | ||
---|---|---|
| ||
Component component = UMLFactory.eINSTANCE.createComponent(); |
The element will be created in the repository of the active project. UML model elements are not contained by any EMF resource.