Java Reference
In-Depth Information
Do I have to use the tooling component to use GMF?
No. As described in Section 10.8, “Developing a Diagram,” you can develop
a diagram manually using the provided extension-points and APIs. Using the
tooling to get started is generally recommended because you can generate a lot
of the code you need to write from its models.
How can I include a diagram as one page in a multipage editor?
The process for doing this is currently long and involved, although it even-
tually might become easier if the generation of both EMF and GMF is modified
to facilitate this common request. You can refer to an Eclipse Corner article on
this topic (see Section 4.4.6, “Integrating EMF and GMF Editors”).
How can I get nodes to stick to the border of a parent?
In the Node element of the graphical definition model, set the Affixed Parent
Side property to something other than NONE. Based on the Node mapping for
the parent, or the domain element that has a containment reference that holds
instances of the child, the generated EditPart has a BorderItemSelection
EditPolicy installed for its EditPolicy.LAYOUT_ROLE . Section 4.5.6,
“Requirement to Scenario Partition,” illustrates this.
Why does GMF have its own version of Xpand?
Historically, GMF adopted Xpand to replace Java Emitter Templates (JET)
as the primary template engine, but Xpand had some IP cleanliness issues. The
GMF team refactored Xpand to use the LALR Parser Generator (LPG) parser
generator, in addition to some other enhancements. Currently, additional refac-
toring is underway to replace Xtend with Object Constraint Language
(OCL)/QVT Operational (QVTO), so this variant of Xpand likely will migrate
to the Model-to-Text Transformation (M2T) project as a distinct, though simi-
lar, alternative to the original Xpand. Furthermore, the Xpand team is working
to implement its next version, based on Xtext.
12.4 Summary
In this chapter, we look into some typical FAQs about the GMF runtime and
tooling. While not exhaustive, many other FAQs can be found on the project
website.
 
Search WWH ::




Custom Search