Java Reference
In-Depth Information
Figure 4-22
Requirement ToolTip
4.4.6 Integrating EMF and GMF Editors
For our requirements diagram, we want it to be a page within a multipage edi-
tor rather than a standalone diagram. The reason is that it's more of a depend-
ency visualization diagram than a requirements editing environment, although it
does have editing capabilities. An Eclipse Corner article [47] provides much of
the detail on how to accomplish integrating EMF and GMF editors this way, so
we imitate that approach here.
Sharing File Extension
To begin, we need to open our requirements.gmfgen model and make some
changes, as shown in Figure 4-23. The Diagram File Extension property
should match the Domain File Extension —in this case, requirements .
Also, we need to change the Same File For Domain And Model property to
true .
Figure 4-23
Requirements GMF generator model
At this point, regenerate the diagram code and launch the runtime work-
bench. Create a new Requirements Diagram using the GMF-generated wizard
and populate it with some data. Right-click the . requirements file you created
and select Open With
Requirements Model Editor , which is the EMF-
generated editor. You'll find that the model has two roots: one for the domain
Search WWH ::




Custom Search