There are several ways to create a representation. You can browse a model in a modeling project and right click on New Representation. Depending on the type of model element you clicked on, different types or representations might be provided. For instance if you right-click on an EPackage you will have :.
You can also create a new representation by clicking on the Modeling Project itself :. In this case the tool will guide you to select a model element for which this representation makes sense. It is possible to load models which are not in the current project by adding Project Dependencies. When clicking on Add Related Elements from the background of the diagram, all the EClasses which are contained in the current EPackage will be proposed.
This is a convenient way to import all the EClasses of a given EPackage into a diagram. References, super types, attributes and operations are automatically imported in the diagram, if you want to remove some of them from a diagram you can either use the Hide contextual action or leverage one of the filters to hide, for instance, all the derived references.
Here is the palette of the Entities diagram editor when both the Design and Review Viewpoints have been enabled. Several layers are provided by the editor. When activating a layer some shapes and colors will changes and specific tools will be available to address your current concern.
For example, activating the Documentation layer will transform the shape of all the model elements to add a red border if it is not documented. Two new tools are appearing then in the palette so that you can create the doc annotations. Once your diagram gets populated it might get harder to find a specific EClass.
Just like in most of the other Eclipse editors, CTRL-O will summon a small popup which is very convenient to find an element. You can select the element in the list and when validating with ENTER the diagram editor will select and reveal this element. You can use the tools defined in the palette to create new EClasses or EDatatypes :. This is especially convenient when using the graphical modeler in full-screen with no other view and clicking on the contextual shortcut which appears a few milliseconds after you select an EClass.
You can adapt the EReference properties at any time and the diagram will reflect your changes. If a non-contained reference is changed into a containment reference then the decorator at the source of the EReference will be adapted. Shorcuts are available in the palette to create difference kind of EStructuralFeatures , notably:. I the case of EAttribute instances, some typing shortcuts are available.
See the «Editing Shortcuts» section. Using the Operation tool from the palette and clicking on an EClass in the diagram you can create a new EOperation instance. To edit the EOperation signature you have several choices, you can directly type it in the diagram, EcoreTools expects a format like :. You can also directly set the values and create new EParameter instances through the Properties View.
Hitting DEL on the keyboard will delete the selected model element and reset all the cross references to it. If you want to remove an element from a given diagram without actually deleting the element, you can either use the Remove tool which is available in the palette or the Delete from Diagram contextual action available with a right click.
If the layer Validation is enabled, then any invalid element will have red borders. To understand what is the error exactly, just keep your mouse pointer above the element and the tooltip will provide you a textual feedback. A lot of shortcuts are available to be more efficient when editing an Ecore model. From a general point of view, just edit the label of a given shape and the diagram editor will try to figure out what you want to edit.
For instance:. These special properties are as follows:. Ecore annotations are modeled as UML comments. For simple annotations no additional actions are necessary. However, Ecore annotations have more powerful semantic than UML comments — they can have an internal substructure. In particular they can have an additional key-value map. For this additional information, there is a special «EcoreAnnotation» stereotype, that can be applied on an annotating comment.
After applying the stereotype, the key-value map can be entered in a separate node of the annotating comment Specification window. Key-value pairs are stored as internal subcomment elements of the annotation. To create an Ecore annotation.
Required: page refresh 5. MagicDraw Page tree. Browse pages. The Graphical Ecore Editor implements multi-diagram support, a custom tabbed properties view, validation feedbacks, refactoring capabilities The long-term goal is to provide the same level of services as does JDT for Java.
Architecture Features Contact. Roadmap Team Report a bug. EcoreTools is a modeler defined using the Eclipse Sirius project. The graphical modeler is defined in the plugin org. Budapest University of Technology and Economics. Development Status:. Date Created:. Date Updated:.
Submitted by:.
0コメント