Java Reference
In-Depth Information
and diagram (notation) information are separate, and thus allows for several dia-
grams (views) to be made for the same domain model instance.
Setting this Boolean property to true alters the generated diagram wizard
code to persist the domain model within the same resource (file) as the diagram
model. An XML Metadata Interchange (XMI) element serves as the root, with
child elements for the domain and diagram (notation).
This property is also used in the template for generating the initialize dia-
gram code. If the Initialize xxx Diagram is invoked on a domain model, using the
Domain File Extension , the model content is copied into a file ending in the
Diagram File Extension and persisted in the same file as the notation data.
11.4.2 Gen Diagram
This element contains properties and children related to the diagram itself. The
rest of the properties relate to supporting elements, such as the generated plug-
in, view, and navigator.
Many of the properties for the diagram are strictly names for generated
classes and packages. This element includes names for edit parts, edit policies,
edit commands, edit helpers, and so on. The remaining properties are listed next,
along with the child elements of Gen Diagram .
Contains Shortcuts To and Shortcuts Provided For
Diagrams can have elements from other model instances placed as shortcuts on
their Canvas , but only if the related diagrams are known at generation time. You
should consider two properties here: Contains Shortcuts To and Shortcuts
Provided For .
Adding the file extension of a domain model to the Contains Shortcuts
To property makes elements of that model type appear as shortcuts on your dia-
gram. Note that there must be a top-level node mapping for the selected element
in a deployed GMF diagram definition before a shortcut can be placed on the
diagram.
When this property is populated, a generated Create Shortcut To action
on the diagram invokes a chooser dialog to allow the selection of model elements
to be shortcut. Only those file types specified will be visible, and their content
validated before selection will be permitted.
Most commonly, Toolsmiths will want a set of diagrams of the same type to
allow shortcuts for each other's elements. Adding the Model ID of the related
diagram in the Shortcuts Provided For property enables elements of that
diagram to be added to the diagram.
Search WWH ::




Custom Search