Working with the Filter Type sample
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
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
The classes provided for implementing or extending the API required for view filtering are:
- org.eclipse.tptp.filtertype.extension.sample.filter.definitions.SampleFilterStandardTabUI extends
- org.eclipse.tptp.filtertype.extension.sample.filter.definitions.SampleAdvancedTabAttributeSet implements
- org.eclipse.tptp.filtertype.extension.sample.filter.definitions.SampleFilterAttribute implements
- org.eclipse.tptp.filtertype.extension.sample.views.FilterTypeSampleView implements
The following procedure outlines the steps required to view the sample filter type
in the sample view:
- Launch an instance of a runtime workbench by selecting Run
> Run As > Eclipse Application.
- Populate the Profiling Monitor view by either profiling
an application or importing a profiling file.
- Right click on an item in the view and select Open With then
select Open Filter Type Sample View to open the sample view.
- At the top of the view, the filter action is available. Filters of this
sample filter type can be created and selected from the drop down menu in the view.
(C) Copyright IBM Corporation 2005. All Rights