Java Reference
In-Depth Information
it is not as feature rich as the full runtime, it offers a core set of runtime capa-
bilities, including diagram properties, preferences, shortcuts, and validation. For
tooling, the lite runtime has its own set of Xpand templates for generation, found
in the org.eclipse.gmf.codegen.lite plug-in, available in the GMF
Experimental SDK feature.
4.2.2 GMF Tooling Component
As you will see, GMF was itself developed as a DSL Toolkit. From the beginning,
it was decided that the tooling for GMF would be as model driven and boot-
strapped as possible. In short, a diagram is defined using a collection of models
(DSLs) that drive code generators targeting either the full runtime or the lite run-
time. One of the remaining tasks to complete the story is to use Query/View/
Transformation (QVT) in the transformation from its mapping model to gener-
ation model, to considerably improve the extensibility of GMF's tooling.
Figure 4-1 illustrates the main components and models used on the tooling
side of GMF. To begin, a GMF project is created and references a domain model.
A graphical definition model designs the figures (nodes, links, compartments,
and so on) that will be used to represent domain model elements on the diagram
surface. A corresponding tooling definition model supports palette tool defini-
tion and other tooling for use in diagramming. The mapping model binds ele-
ments from the graphical and tooling definitions to the domain model. A
transformation from the mapping model to the generator model is followed by
the generation of a diagram plug-in.
Note that it is possible to design and run GMF diagrams without a domain
model, which can be useful for those who want to experiment with notation
design and not be burdened with mapping it to a domain. Each of these models
is described in some detail in the following sections, and Chapter 11, “Graphical
Modeling Framework Tooling,” includes a complete reference for each model.
Following the basic overview of each model, we turn to learning more about
them in the context of developing our sample application diagrams.
Graphical Definition Model
The graphical definition model consists of two parts and defines the graphical
elements found on a diagramming surface. The first part is a Figure Gallery,
which defines figures (shapes, labels, lines, and so on) that the Canvas elements
later reference to define nodes, connections, compartments, and diagram labels.
An important point is that figure galleries can be reused. Many diagrams require
similar-looking elements, such as a rounded rectangle with center label, or con-
nections that are a solid line with open arrowhead decoration on the target end.
Search WWH ::




Custom Search