The UML Modeler API consists of static utility classes: {@link com.ibm.xtools.modeler.ui.UMLModeler UMLModeler}, {@link com.ibm.xtools.modeler.ui.UMLProfileUtility UMLProfileUtility} and {@link com.ibm.xtools.modeler.ui.UMLExportImportUtility UMLExportImportUtility}. There are also several other classes and interfaces that are accessible from UMLModeler. The implementation of these other classes and interfaces spans several plug-ins in the product. These plug-ins are re-exported from the plug-in that exposes UMLModeler, which is com.ibm.xtools.modeler.ui. To use the UML Modeler extensibility, API clients must only add a single plug-in dependency to com.ibm.xtools.modeler.ui.
The foundation of the UML Modeler extensibility is called the modeling platform. The modeling platform consists of a set of services that enable the management of UML models and is based on a UML meta-model that the Eclipse MDT UML2 Component provides. Because the meta-model is an EMF-based implementation of the UML 2.2 specification, the objects that represent user models are UML2 objects.
For example, {@link com.ibm.xtools.modeler.ui.UMLModeler#openModelResource UMLModeler.openModel} returns a UML2 object {@link org.eclipse.uml2.uml.Package Package} in most cases. Like all UML2 objects, Package indirectly extends the {@link org.eclipse.emf.ecore.EModelElement EModelElement} EMF object.
The following modeling platform services are also available for EMF-based models:
For diagraming, the UML Modeler leverages the runtime of the Eclipse GMF project.
For example, {@link com.ibm.xtools.uml.ui.diagram.IUMLDiagramHelper#createDiagram createDiagram} returns a GMF {@link org.eclipse.gmf.runtime.notation.Diagram Diagram}. This object contains {@link org.eclipse.gmf.runtime.notation.View View} objects through its {@link org.eclipse.gmf.runtime.notation.View#getChildren getChildren()} method. Each view can be associated with a semantic element. In case of our UML Modeler diagrams, these semantic elements are UML2 {@link org.eclipse.uml2.uml.Element Element}s and are accessible from the {@link org.eclipse.gmf.runtime.notation.View#getElement View.getElement()} method.
The modeling platform exposes interfaces to help manage notation-based diagrams: