Element Filter Providers
Identifier:
com.ibm.xtools.common.ui.reduction.elementFilterProviders
Since:
This extension point is new to Version 7.0.5.
Description:
Element filter providers are used to accept or reject items through the element filter service. Element filter providers registered with the service will be ignored accordingly based on eclipse activities / capabilities.
When the element filter service is queried, if any one of the element filter providers accept the object to test, then the object is accepted; if all element filters providers reject the object to test, then the object is rejected.
Configuration Markup:
<!ELEMENT extension (elementFilterProvider+)>
<!ATTLIST extension
point CDATA #REQUIRED
id CDATA #IMPLIED
name CDATA #IMPLIED>
- point - The identifier of the extension point.
- id - The identifier of the extension.
- name - The name of the extension.
<!ELEMENT elementFilterProvider (Priority , enablement?)>
<!ATTLIST elementFilterProvider
class CDATA #REQUIRED>
Specifies an element filter provider which rejects or accepts elements. The enablement element has three variables to work with:
- context - The IElementFitlerContext in which filtering is to take place.
- contextObject - The context object stored within the IElementFilterContext.
- toTest - The element to test.
- class - Specifies a concrete implementation of IElementFilterProvider.
<!ELEMENT Priority EMPTY>
<!ATTLIST Priority
name (Lowest|Low|Medium|High|Highest) >
The description for the priority of the provider.
- name - The priority of the provider. It can be one of the following values:
. Consideration of dependencies has to be done when choosing the priority. A provider at a higher priority will take a chance first at deciding provision.
Examples:
The enablement expression context object is an instance of com.ibm.xtools.common.ui.reduction.filters.ElementFilterOperation. There are two variables which may be used in the expression:
- context - an instance of com.ibm.xtools.common.ui.reduction.filters.IElementFilterContext; this variable may be null
- toTest - the object to accept or reject
<extension
point="com.ibm.xtools.common.ui.reduction.elementFilterProviders">
<elementFilterProvider
class="com.ibm.xtools.examples.filters.MyElementFilterProvider">
<Priority
name="Lowest">
</Priority>
<enablement>
<with
variable="toTest">
<or>
<instanceof
value="com.ibm.xtools.examples.MyClass">
</instanceof>
</or>
</with>
</enablement>
</elementFilterProvider>
</extension>
Supplied Implementation:
The platform itself does not have any predefined elementFilterProviders. Particular product installs may include elementFilterProviders as required.
Licensed Materials - Property of IBM
Copyright IBM Corp. 2007, 2008. All Rights Reserved.
US Government Users Restricted Rights - Use, duplication or disclosure
restricted by GSA ADP Schedule Contract with IBM Corp.