blob: c15582317f2eaa0f2aa97264c6695a3927500085 [file] [log] [blame]
<?xml version='1.0' encoding='UTF-8'?>
<!-- Schema file written by PDE -->
<schema targetNamespace="org.eclipse.gmf.runtime.common.ui.services.action">
<annotation>
<appInfo>
<meta.schema plugin="org.eclipse.gmf.runtime.common.ui.services.action" id="actionFilterProviders" name="Action Filter Providers Extension Point"/>
</appInfo>
<documentation>
&lt;P&gt;
This extension point is used to configure providers for the action filter service (&lt;TT&gt;org.eclipse.gmf.runtime.common.ui.services.action.filter.ActionFilterService&lt;/TT&gt;).
&lt;/P&gt;
&lt;P&gt;
This service allows action filter attributes to be added to existing types, so long as they adapt to IActionFilter by returning the ActionFilterService. These action filter attributes can then be used inside the objectState element for enablement or visibility of static action contributions. It also permits the entire workbench selection to be considered so that an action can be enabled if it is supported on one or more elements in the selection.
&lt;/P&gt;
&lt;P&gt;The action filter service will select a provider using one of the following criteria:
&lt;OL&gt;
&lt;LI&gt;by provider descriptor, which uses static XML to determine whether a provider provides the attribute test operation. A given provider can declare, in XML, that it supports zero or more name/value pairs (attribute elements); if the name/value of a given action expression matches any of these, its is assumed to provide the operation.&lt;/LI&gt;
&lt;LI&gt;by provider policy. If no name/value pairs are specified in XML for a given provider, the service will try to load a policy for the provider (using the standard mechanism), if one is specified, and ask the policy if it provides the operation.&lt;/LI&gt;
&lt;LI&gt;by the provider itself. If no name/value pairs and no policy have been specified, the service will load the provider itself and ask it if it provides the operation. Typically, it is preferred to make use of one of the first two criteria for providers.&lt;/LI&gt;
&lt;/OL&gt;
&lt;/P&gt;
&lt;P&gt;
Note that the value attribute is optional. When available in the provider&apos;s XML, the value will be used in conjunction with the name attribute to determine if that provider should be considered. When not available, only the name will be used to make the decision. For example, the value attribute for objectState elements of action expressions is sometimes set to either &quot;enablement&quot; or &quot;visibility&quot;. Some action filter providers use this information to determine whether the criteria is being tested to determine enablement or visibility for a contribution.
&lt;/P&gt;
</documentation>
</annotation>
<element name="extension">
<complexType>
<sequence>
<element ref="ActionFilterProvider"/>
</sequence>
<attribute name="point" type="string" use="required">
<annotation>
<documentation>
a fully qualified identifier of the target extension point, in this case, &lt;tt&gt;org.eclipse.gmf.runtime.common.ui.services.action.actionFilterProviders&lt;/tt&gt;.
</documentation>
</annotation>
</attribute>
<attribute name="id" type="string">
<annotation>
<documentation>
an optional identifier of the extension instance
</documentation>
</annotation>
</attribute>
<attribute name="name" type="string">
<annotation>
<documentation>
an optional human readable name of the extension instance
</documentation>
</annotation>
</attribute>
</complexType>
</element>
<element name="ActionFilterProvider">
<annotation>
<documentation>
This element is used to describe an action filter provider that will contribute action filter attributes to be used inside objectState elements for enablement or visibility of static action contributions.
</documentation>
</annotation>
<complexType>
<sequence>
<element ref="Priority"/>
<element ref="Attribute" minOccurs="0" maxOccurs="unbounded"/>
<element ref="Policy" minOccurs="0" maxOccurs="1"/>
</sequence>
<attribute name="class" type="string" use="required">
<annotation>
<documentation>
the name of a fully qualified class that implements the the &lt;tt&gt;org.eclipse.gmf.runtime.common.ui.services.action.filter.IActionFilterProvider&lt;/tt&gt; and &lt;tt&gt;org.eclipse.gmf.runtime.common.core.service.IProvider&lt;/tt&gt; interfaces
</documentation>
<appInfo>
<meta.attribute kind="java" basedOn="org.eclipse.gmf.runtime.common.ui.services.action.filter.AbstractActionFilterProvider"/>
</appInfo>
</annotation>
</attribute>
</complexType>
</element>
<element name="Priority">
<annotation>
<documentation>
This element is used to specify the priority that this provider has relative to other action filter providers that are registered to handle the same action filter attribute. When such a conflict occurs, the provider with the highest priority will be selected to provide the action filter.
</documentation>
</annotation>
<complexType>
<attribute name="name" use="required">
<annotation>
<documentation>
the name of the provider priority, one of &lt;tt&gt;Lowest&lt;/tt&gt;, &lt;tt&gt;Low&lt;/tt&gt;, &lt;tt&gt;Medium&lt;/tt&gt;, &lt;tt&gt;High&lt;/tt&gt;, or &lt;tt&gt;Highest&lt;/tt&gt;
</documentation>
</annotation>
<simpleType>
<restriction base="string">
<enumeration value="Lowest">
</enumeration>
<enumeration value="Low">
</enumeration>
<enumeration value="Medium">
</enumeration>
<enumeration value="High">
</enumeration>
<enumeration value="Highest">
</enumeration>
</restriction>
</simpleType>
</attribute>
</complexType>
</element>
<element name="Attribute">
<annotation>
<documentation>
This element is used to describe a new action filter attribute.
</documentation>
</annotation>
<complexType>
<attribute name="name" type="string" use="required">
<annotation>
<documentation>
the name of the action filter attribute, which is used to identify the provider that should perform the test for objectState elements used in action enablement or visibility criteria
</documentation>
</annotation>
</attribute>
<attribute name="value" type="string">
<annotation>
<documentation>
the optional value of the action filter attribute. When provided it is also used to identify the provider that should perform the test for objectState elements use in action enablement or visibility criteria.
</documentation>
</annotation>
</attribute>
</complexType>
</element>
<element name="Policy">
<annotation>
<documentation>
This element can be used to specify a policy used to determine whether or not this provider should be asked to test an action filter attribute. The policy is only used if there are no attribute elements defined for the provider.
To delay plugin loading, the recommended strategy for policies is to define them in a separate package and add the package to the Eclipse-LazyStart in the Manifest.MF so that loading the policy class does not load the plug-in.
</documentation>
</annotation>
<complexType>
<attribute name="class" type="string">
<annotation>
<documentation>
the fully qualified name of the class that implements &lt;TT&gt;org.eclipse.gmf.runtime.common.core.service.IProviderPolicy&lt;/TT&gt;
</documentation>
<appInfo>
<meta.attribute kind="java" basedOn="org.eclipse.gmf.runtime.common.core.service.IProviderPolicy"/>
</appInfo>
</annotation>
</attribute>
</complexType>
</element>
<annotation>
<appInfo>
<meta.section type="examples"/>
</appInfo>
<documentation>
The following is an example of an action filter provider extension:
&lt;pre&gt;
&lt;extension
id=&quot;actionFilterProviders&quot;
name=&quot;%ext.actionFilterProviders&quot;
point=&quot;org.eclipse.gmf.runtime.common.ui.services.action.actionFilterProviders&quot;&gt;
&lt;ActionFilterProvider
class=&quot;org.eclipse.test.project.ui.providers.action.AllAreElementsActionFilterProvider&quot;&gt;
&lt;Priority
name=&quot;Highest&quot;&gt;
&lt;/Priority&gt;
&lt;Attribute
name=&quot;AllAreElements&quot;
value=&quot;enablement&quot;&gt;
&lt;/Attribute&gt;
&lt;Attribute
name=&quot;AllAreElements&quot;
value=&quot;visibility&quot;&gt;
&lt;/Attribute&gt;
&lt;/ActionFilterProvider&gt;
&lt;/extension&gt;
&lt;/pre&gt;
</documentation>
</annotation>
<annotation>
<appInfo>
<meta.section type="apiInfo"/>
</appInfo>
<documentation>
The value of the &lt;tt&gt;class&lt;/tt&gt; attribute must be a fully qualified name of a Java class that implements both the &lt;tt&gt;org.eclipse.gmf.runtime.common.ui.services.action.filter.IActionFilterProvider&lt;/tt&gt; and &lt;tt&gt;org.eclipse.gmf.runtime.common.core.service.IProvider&lt;/tt&gt; interfaces. For convenience, this can be a subclass of &lt;tt&gt;org.eclipse.gmf.runtime.common.ui.services.action.filter.AbstractActionFilterProvider&lt;/tt&gt;.
</documentation>
</annotation>
<annotation>
<appInfo>
<meta.section type="implementation"/>
</appInfo>
<documentation>
</documentation>
</annotation>
<annotation>
<appInfo>
<meta.section type="copyright"/>
</appInfo>
<documentation>
Copyright (c) 2003, 2005 IBM Corporation and others.&lt;br&gt;
All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Public License v1.0
which accompanies this distribution, and is available at
&lt;a href=&quot;http://www.eclipse.org/legal/epl-v10.html&quot;&gt;http://www.eclipse.org/legal/epl-v10.html&lt;/a&gt;
</documentation>
</annotation>
</schema>