Java Reference
In-Depth Information
Examples:
Following is an example of what the GMF tooling generates by default:
<extension-point=
"org.eclipse.gmf.runtime.emf.ui.modelingAssistantProviders">
<modelingAssistantProvider
class="org.eclipse.mindmap.diagram.providers.
MindmapModelingAssistantProvider">
<Priority name="Lowest"/>
</modelingAssistantProvider>
</extension>
The generated * ModelingAssistantProvider provides an example of
how to implement a provider for your model types.
API information:
The declared class is one that implements org.eclipse.gmf.runtime.
emf.ui.services.modelingassistant.IModelingAssistantProvider .
For convenience, the abstract class org.eclipse.gmf.runtime.
emf.ui.services.modelingassistant.ModelingAssistantProvider is
provided and supplies basic behavior.
10.4.10 LayoutService
The default toolbar and context menu provided for all GMF-generated diagrams
(those that target the full runtime) have an arrange action. A basic layout algo-
rithm is provided by default and can be overridden by using the LayoutService .
Your domain-specific diagram likely will require a domain-specific layout to com-
plement your notation and enhance its display of information.
The runtime supplies several layout providers for the LayoutService , as
shown in Figure 10-34. Furthermore, the mindmap diagram example in Section
4.3.5, “Adding Custom Layout,” gives an example of a layout provider contri-
bution.
LayoutProvider Extension-Point
Identifier: org.eclipse.gmf.runtime.diagram.ui.
layoutProviders
Description: This extension-point defines layout providers for the
LayoutService . The LayoutService allows for the arrangement of diagram
elements according to a specific layout style. Extensions to the service can pro-
vide additional layout behavior. For example, a new provider could implement a
specialized inheritance layout.
Search WWH ::




Custom Search