org.eclipse.cdt.internal.ui.filters
Class FilterDescriptor

java.lang.Object
  extended by org.eclipse.cdt.internal.ui.filters.FilterDescriptor
All Implemented Interfaces:
java.lang.Comparable

public class FilterDescriptor
extends java.lang.Object
implements java.lang.Comparable

Represents a custom filter which is provided by the "org.eclipse.jdt.ui.javaElementFilters" extension point. since 2.0


Method Summary
 int compareTo(java.lang.Object o)
           
 org.eclipse.jface.viewers.ViewerFilter createViewerFilter()
          Creates a new ViewerFilter.
 java.lang.String getDescription()
          Returns the filter's description.
static FilterDescriptor[] getFilterDescriptors()
          Returns all contributed Java element filters.
static FilterDescriptor[] getFilterDescriptors(java.lang.String targetId)
          Returns all Java element filters which are contributed to the given view.
 java.lang.String getId()
          Returns the filter's id.
 java.lang.String getName()
          Returns the filter's name.
 java.lang.String getPattern()
          Returns the filter's pattern.
 java.lang.String getTargetId()
          Returns the filter's viewId.
 boolean isCustomFilter()
           
 boolean isEnabled()
          Returns true if the filter is initially enabled.
 boolean isPatternFilter()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getFilterDescriptors

public static FilterDescriptor[] getFilterDescriptors()
Returns all contributed Java element filters.


getFilterDescriptors

public static FilterDescriptor[] getFilterDescriptors(java.lang.String targetId)
Returns all Java element filters which are contributed to the given view.


createViewerFilter

public org.eclipse.jface.viewers.ViewerFilter createViewerFilter()
Creates a new ViewerFilter. This method is only valid for viewer filters.


getId

public java.lang.String getId()
Returns the filter's id.

This attribute is mandatory for custom filters. The ID for pattern filters is PATTERN_FILTER_ID_PREFIX plus the pattern itself.


getName

public java.lang.String getName()
Returns the filter's name.

If the name of a pattern filter is missing then the pattern is used as its name.


getPattern

public java.lang.String getPattern()
Returns the filter's pattern.

Returns:
the pattern string or null if it's not a pattern filter

getTargetId

public java.lang.String getTargetId()
Returns the filter's viewId.

Returns:
the view ID or null if the filter is for all views
Since:
3.0

getDescription

public java.lang.String getDescription()
Returns the filter's description.

Returns:
the description or null if no description is provided

isPatternFilter

public boolean isPatternFilter()
Returns:
true if this filter is a custom filter.

isCustomFilter

public boolean isCustomFilter()
Returns:
true if this filter is a pattern filter.

isEnabled

public boolean isEnabled()
Returns true if the filter is initially enabled. This attribute is optional and defaults to true.


compareTo

public int compareTo(java.lang.Object o)
Specified by:
compareTo in interface java.lang.Comparable