Java Reference
In-Depth Information
Figure 3-7
Requirements domain model
3.4.1 Requirements Generator Model
We create a requirements.genmodel in the usual manner, using the new
Domain Generator Model ( Ctrl+3
Domain Gen ) wizard and selecting our
requirements.ecore model as the input. We'll make some adjustments to this
genmodel and to the generated Edit code because we intend to use the generated
EMF editor as part of our solution.
For the display string of a requirement in the editor selection tree, we want
to have it be id (major.minor.service):title , where major , minor , and
service are from the contained Version element. We'll be using the Properties
view to edit the details of the requirement, so we'll have plenty of horizontal
space to use in the editor, allowing even longer requirement titles to fit. Another
option is to navigate using the Project Explorer view, but this is narrow and does
not allow for much information display. Furthermore, we'll have a second tab in
the editor to display a requirements dependency diagram, which will also require
a bit of editor space. To accomplish the task, we'll select the requirement element
in the genmodel and change its Edit Label Feature to be our id:EString
attribute. Unfortunately, we cannot set two attributes to display for the label, as
we can for GMF diagrams. This means we have to modify the generated code.
Search WWH ::




Custom Search