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>


<!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:

  1. context - The IElementFitlerContext in which filtering is to take place.
  2. contextObject - The context object stored within the IElementFilterContext.
  3. toTest - The element to test.



<!ELEMENT Priority EMPTY>

<!ATTLIST Priority

name (Lowest|Low|Medium|High|Highest) >

The description for the priority of the provider.



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:

   <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.