Java Reference
In-Depth Information
A
Palette
element has a
Title
and a
Description
, although these
strings appear only in the generated user interface for creation tools. A
Default
element determines the active entry to be displayed when a stack of palette tools
is configured.
You can add a number of elements to the palette:
Icon Images
,
Palette
Separator
,
Tool Group
,
Palette
,
Standard Tool
,
Creation Tool
, and
Generic Tool
. At the palette level, the icon image selections are not used. Also
not currently used are the
Palette
,
Standard Tool
, and
Generic Tool
ele-
ments. This leaves
Tool Group
and
Separator
as valid elements to choose
from.
A
Tool Group
is meant to hold
Creation Tool
entries that make sense to
group together. Typically, a
Nodes
group and a
Links
group are created. The
Active
and
Stack
properties of a tool group are typically used together, but
they require a parent tool group to work properly. This means that there must
be a
Tool Group
element with its own child
Tool Group
. This second
Tool
Group
must have its
Stack
property set to
true
. In this case, the tool selected
as the palette's
Active
tool appears at the top of this stacked group by default.
If the
Collapsible
property is set, the “drawer” feature of the generated GEF
palette is enabled and the group collapses into a named drawer.
You can add a
Separator
anywhere between tool entries, resulting in a hor-
izontal line in the generated palette. This can be helpful in large groupings of
tools where a logical separation makes it easier to find tools but doesn't warrant
separate groups or drawers.
A
Creation Tool
has image child elements. Specifically, there are large and
small icon images that you can specify as either default or custom (bundle). If the
default icons are used, the generator uses the same icons as specified for the ele-
ment it creates. These typically are picked up from the Eclipse Modeling
Framework (EMF) edit code icons. If the bundle icon elements are used, the bun-
dle and path to the icon to be used must be entered. For example, if you want to
use the wrench icon used for the GMF tooling model root as an image icon for
your palette, you would enter
org.eclipse.gmf.tooldef.edit
for the
Bundle
property and
icons/full/obj16/GMFToolModelFile.gif
for the
Path
property.
The mapping model is the heart of GMF models and itself represents a dia-
gram. Until now, graphical definition and tooling models have been separate and
available for reuse. A mapping model is transformed to one or more generator
models that drive templates for code generation.
Search WWH ::
Custom Search