Java Reference
In-Depth Information
<!ELEMENT Policy EMPTY>
<!ATTLIST Policy
class CDATA #IMPLIED>
This element can specify a policy to determine whether this provider should
be asked to test an ActionFilter attribute. The policy is used only if no attribute
elements are defined for the provider. To delay plug-in loading, the recommended
strategy for policies is to define them in a separate package and add Bundle-
ActivationPolicy: lazy in the MANIFEST.MF so that loading the policy
class does not load the plug-in.
class —The fully qualified name of the class that implements org.
eclipse.gmf.runtime.common.core.service.IProviderPolicy .
Examples:
The following is an example of an ActionFilterProvider extension:
<extension-point="
org.eclipse.gmf.runtime.common.ui.services.action.
actionFilterProviders">
<ActionFilterProvider class="
org.eclipse.test.project.ui.providers.action.
AllAreElementsActionFilterProvider">
<Priority name="Highest"/>
<Attribute name="AllAreElements" value="enablement"/>
<Attribute name="AllAreElements" value="visibility"/>
</ActionFilterProvider>
</extension>
API information:
For convenience, the provider can be a subclass of org.eclipse.gmf.
runtime.common.ui.services.action.filter.AbstractActionFilter
Provider . Additionally, org.eclipse.gmf.runtime.emf.ui.services.
action.AbstractModelActionFilterProvider is available and wraps
queries on this provider in the context of a read action using a Transac-
tionalEditingDomain .
Notes:
Diagrams generated using the GMF tooling do not currently use this
extension-point.
A LogicActionFilterProvider is used in the logic diagram example,
although it seems to be a temporary workaround for a platform bug. Never-
theless, it illustrates how to filter the Add Circuit and Add Half Adder pop-up
menu contributions from elements that are not ContainerElement types.
Search WWH ::




Custom Search