Java Reference
In-Depth Information
using the GMF tooling Software Development Kit (SDK). You can find discus-
sions on the differences between GEF and GMF throughout Chapter 9,
“Graphical Editing Framework”; Chapter 10, “Graphical Modeling Framework
Runtime”; and Chapter 11, “Graphical Modeling Framework Tooling.”
What are the prerequisites for GMF?
GMF depends on GEF, Eclipse Modeling Framework (EMF), the EMF
Transaction and Validation components, Model Development Tools Object
Constraint Language (MDT OCL) , and, when working with Scalable Vector
Graphics (SVG) figure support, Apache Batik and Xerces. Furthermore, the
Eclipse Packaging Project and Modeling Amalgam projects provide downloads
that include GMF and all its dependencies.
How can I contribute to GMF?
Okay, so this isn't a frequently asked question—but since it's here…. The
best way to contribute to GMF or any Eclipse project is to interact with project
Committers in the newsgroup and, after reaching an agreement, apply a patch to
a Bugzilla item. All contributions must go through Bugzilla, must be in the for-
mat of a CVS patch, and should have unit tests associated with the functionality
or fix.
12.2 Diagramming FAQs
The FAQs in this section relate to figures—how to change them dynamically,
alter their properties, and so on.
How do I change the figure of an existing element dynamically?
You can change the figure of an EditPart by configuring requests and exe-
cuting commands to first remove the existing view element and add the new one;
you must save the location information so that the new element is positioned
properly. This is done within the UML2 Tools project. A different approach relies
on the underlying diagram refresh method and layout invocation in Section
4.3.5, “Subtopic Figure.” Yet another approach is to use the runtime's extensi-
bility features, as illustrated in the scenario diagram customization of Section
10.9.1, “Scenario Diagram Custom View and Edit Providers.”
How can I change a figure's appearance based on a preference change?
The basic process involves adding a PreferencePropertyChange
Listener to the EditPart by overriding the addNotationalListeners()
method and invoking the change on the corresponding figure when the corre-
sponding PropertyChangeEvent is sent. Section 4.6.6, “Color Preferences,”
outlines an example of this.
 
Search WWH ::




Custom Search