Java Reference
In-Depth Information
made in the diagram editor plug-in does not include the raw EMF model types
in our model. We need to add them, as shown here:
<extension
point="org.eclipse.ui.views.properties.tabbed.propertySections">
<?gmfgen generated="
false
"?>
<propertySections contributorId="org.eclipse.requirements.diagram">
<!-- ... -->
<propertySection
id="property.section.domain"
tab="property.tab.domain"
class="org.eclipse.requirements.diagram.sheet.
RequirementsPropertySection">
<input type="org.eclipse.gmf.runtime.notation.View"/>
<input type="org.eclipse.gef.EditPart"/>
<!-- ... -->
<input type="org.eclipse.requirements.Model"/>
<input type="org.eclipse.requirements.Requirement"/>
<input type="org.eclipse.requirements.RequirementGroup"/>
<input type="org.eclipse.requirements.Comment"/>
<input type="org.eclipse.requirements.Version"/>
</propertySection>
</propertySections>
</extension>
TIP
GMF's code generation provides merge capabilities for
plugin.xml
and
MANIFEST.MF
files in addition to
*.java
files, so be sure to mark mod-
ified sections accordingly to prevent overwrite.We changed the generated
attribute of the gmfgen processing instruction to
false
, with the other
alternative being to remove it altogether. This is analogous to adding
@generated NOT
to Java code that is modified.
While we're here, let's remove the
org.eclipse.ui.editors
contribution
from our diagram plug-in manifest because we no longer need it.
Menus and Toolbar
To address the issues with menus and toolbars, we can add two classes pro-
vided in the article to our
org.eclipse.requirements.presentation
package:
RequirementsMultiPageActionBarContributor
and
SubAction
BarsExt
. These are slightly refactored from the originals and are not covered
Search WWH ::
Custom Search