This sample demonstrates how to dynamically create a new filter type using the extension point org.eclipse.hyades.ui.filterTypes.
If you have not already done so, create the example by File > New > Example... > Filter Type Sample.
The sample provides a filter type with id org.eclipse.tptp.filtertype.extension.sample.SampleFilterType defined in the plugin.xml file. This filter type has the standard tab implementation provided by org.eclipse.tptp.filtertype.extension.sample.filter.definitions.SampleFilterStandardTabUI and the advanced tab UI implementation provided by org.eclipse.tptp.filtertype.extension.sample.filter.definitions.SampleAdvancedTabAttributeSet. The sample also provides a simple view implemented in org.eclipse.tptp.filtertype.extension.sample.views.FilterTypeSampleView in which this sample filter type is applicable. The filter type is defined with the scope "FilterTypeSampleScope", as is the sample view which makes the filter applicable to the view.
This sample view shows a list of the packages for the object selected when it is opened. The view filtering can then be applied to this list of packages. The sample filter type definition has a simple standard tab with one text field for the package name and and an option to select whether or no the filter should be case sensitive. The advanced tab has three filter attributes defined. Two of these attributes are the method name and class name, if used the packages will be returned that contain these attributes. The third attribute visible in the advanced tab is a sample filter attribute. This sample filter attribute is provided by org.eclipse.tptp.filtertype.extension.sample.filter.definitions.SampleFilterAttribute.
The classes provided for implementing or extending the API required for view filtering are:
The following procedure outlines the steps required to view the sample filter type in the sample view:
(C) Copyright IBM Corporation 2005. All Rights Reserved.