Java Reference
In-Depth Information
<!ELEMENT context EMPTY>
<!ATTLIST context
editparts CDATA #IMPLIED>
This element defines a context that the EditPolicyProvider supports that
contains the EditPart s that this provider supports.
editparts —A comma-separated list of EditPart IDs (from the provider
XML definition) that this provider supports.
Examples:
This is an example of a basic EditPolicyProvider extension-point con-
tribution:
<extension
point="org.eclipse.gmf.runtime.diagram.ui.editpolicyProviders">
<editpolicyProvider class=
"org.eclipse.mindmap.diagram.providers.MindmapEditPolicyProvider">
<Priority name="Lowest"/>
</editpolicyProvider>
</extension>
API information:
The fully qualified class should implement the interface org.eclipse.gmf.
runtime.diagram.ui.services.editpolicy.IEditPolicyProvider .
Notes:
Diagrams generated using the GMF tooling do not currently use this
extension-point. EditPolicies are added to generated EditPart s within the
createDefaultEditPolicies() method.
10.4.4 Palette Service
You saw in Section 9.2, “GEF,” that configuring a palette is straightforward.
GMF adds a PaletteService to allow for palette definition using extension-
point and service provider implementation, as shown in Figure 10-28.
Contributions can be added or overridden by extender plug-ins, providing
flexibility in palette definition and makeup. The runtime provides a
DefaultPaletteProvider class, which is satisfactory for most diagrams. The
only code that is required is to provide a palette factory, which links creation
tools to model element types.
PaletteProviders can provide drawers, groups, separators, a palette tool,
and template items using the extension-point, as defined next.
Search WWH ::




Custom Search