Java Reference
In-Depth Information
Table 4-31
Diamond Figure Definition (continued)
Element
Property
Value
Stack Layout
Polygon
Name
Diamond
Template Point
X, Y
5, 0
Template Point
X, Y
0, 5
Template Point
X, Y
5, 10
Template Point
X, Y
10, 5
Node
Name
Scenario
Affixed Parent Side
NSEW
Resize Constraint
NONE
Default Size Facet
Dimension
Dx, Dy
10, 10
In our requirements.gmftool model, we add a new creation tool in the
Nodes group for the Scenario element by copying another tool and pasting
into the group.
In the mapping model, to select our scenario diagram canvas for the
Related Diagrams reference, we need to use Load Resource again and load
scenario.gmfmap into the resource set. Next, we create a new Child
Reference to our Requirement Node Mapping and set its Containment
Feature property to our new scenario:Process reference. The child Node
Mapping settings are found in Figure 4-39. Unfortunately, when selecting the
Related Diagrams property, a dialog appears with two Canvas Mapping
entries. The scenario canvas should be the second one on the list, but we can do
our usual verification by opening the model in a text editor.
We're ready to re-create our requirements.gmfgen model using the normal
sequence, but don't generate the diagram code just yet. Open the generator model
and navigate to the Gen Child Side Affixed Node ProcessEditPart ele-
ment, where you can see the generated Open Diagram Behaviour element. The
Diagram Kind property of the generated Open Diagram Behaviour element
defaults to FIXME put GenEditorGenerator.modelID value here . Simi-
larly, the Editor ID property defaults to FIXME put GenEditorView.id
value here . We replace these with scenario and org.eclipse.
scenario.diagram.part.ScenarioDiagramEditorID , respectively, as
shown in Figure 4-40. Fortunately, these properties are preserved when updating
Search WWH ::




Custom Search