Java Reference
In-Depth Information
NOTE
This example is a bit contrived but illustrates the approach. Typically, this
technique is used if there are multiple views (diagrams) for a single domain
model, such as the UML. Perhaps a better example would be to associate
state characteristics with our business domain model elements and create
a diagram partition for each class to represent its state behavior.
Opening our requirements.ecore model, we use Load Resource to load
our scenario.ecore model into the resource set. To the Requirement class,
right-click and add a new EReference named scenario of type Process . Set
the Containment property to true . Reload the requirements.genmodel and
add a reference to the scenario.genmodel before clicking Finish . Right-click on
the requirements package root in the genmodel and regenerate the model, edit,
and editor code. If you're interested, launch and test the requirements editor,
adding a new Process to a Requirement instance. If you do, you'll notice that
no properties exist for the new Process element, which should remind you to
add the org.eclipse.scenario.Process input type to the diagram plug-ins
propertySections contribution. Otherwise, we move on to modify our
requirements diagram definition to allow new scenario diagram partitions.
Beginning with the requirements.gmfgraph model, we now create a new
BasicDiamond figure in our gallery. This is much the same as our
BasicDiamond figure in the bpmn.gmfgraph model, although it's smaller
because we intend to add it as a side-affixed node to our Requirement s circle.
Table 4-31 lists the additions.
Table 4-31
Diamond Figure Definition
Element
Property
Value
Canvas
Figure Gallery
Figure Descriptor
Name
BasicDiamond
Rectangle
Name
BasicDiamond
Fill
False
Outline
False
(continues)
 
Search WWH ::




Custom Search