Filtering Contributions to the Model

Standard Eclipse extension points can be used to contribute to the iSeries Project Perspective, the two most common ones might be the eclipse.ui.popupMenus and the org.eclipse.ui.propertyPages extension points. Both of these extension points support the concept of "filtering". Filtering is used to narrow down the scope of a given contribution. For example, in the case of iSeries Projects Perspective, you can use filtering to contribute actions to all source physical files that happen to be local, and have a specific name (RPGLE for example). The iSeries Projects Perspective model supports all the base Eclipse filtering in addition to a few iSeries specific tags. Here is a list of all supported tags (attribute values):

Base Eclipse IResource Filters:

(check the org.eclipse.ui.IResourceActionFilter class for details on what each attribute key means)
 

Base Eclipse IProject Filters:

(check the org.eclipse.ui.IProjectActionFilter class for details on what each attribute key means)

iSeries specific Resource Filters:

(check the com.ibm.etools.iseries.perspective.model.IISeriesResourceActionFilter class for details on what each attribute key means) All these values are defined in the com.ibm.etools.iseries.perspective.model.IISeriesResourceActionFilter class as described in this class hierarchy.
 
 

Here is a sample on how to use filtering elements:

     <!-- all resources that are source physical files.  -->
     <objectContribution
            objectClass="com.ibm.etools.iseries.perspective.model.AbstractISeriesResource"
            id="com.ibm.etools.iseries.perspective.isv.sample3.contribution5">
         <filter
               name="isSourceFile"
               value="true">
         </filter>
         <action
               label="FILTER: name=isSourceFile value=true"
               class="com.ibm.etools.iseries.perspective.isv.sample3.EmptyAction"
               enablesFor="1"
               id="emptyaction5">
         </action>
     </objectContribution>
 
 

The above snippet is taken from one of the samples included with the iSeries Project perspective. You can check the Installing and Running the Samples section for details about this sample.