Class MarkerFilter
java.lang.Object
org.eclipse.ui.views.markers.internal.MarkerFilter
- All Implemented Interfaces:
Cloneable
- Direct Known Subclasses:
ProblemFilter
MarkerFilter is the class that defines a filter on markers in a
MarkerView.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanstatic final intConstant for any element.static final intConstant for any element in same container.static final intConstant for selected element and children.static final intConstant for any selected element only.static final intConstant for on working set.protected intprotected List<MarkerType> static final StringAttribute status true.protected List<MarkerType> static final StringThe tag for the scope.static final StringNew attribute to handle the selection status of marker types.protected IWorkingSet -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAllSubTypes(List<MarkerType> types) List all types known to this MarkerFilter.getMarkerType(String id) Find the typeModel entry that matches id.getName()Get the name of the receiverintMarkerFilter.ON_ANYif showing items associated with any resource.MarkerFilter.ON_SELECTED_ONLYif showing items associated with the selected resource within the workbench.MarkerFilter.ON_SELECTED_AND_CHILDRENif showing items associated with the selected resource within the workbench and its children.MarkerFilter.ON_ANY_OF_SAME_PROJECTif showing items in the same project as the selected resource within the workbench.MarkerFilter.ON_WORKING_SETif showing items in some working set.Warning: for internal package use only.Warning: for internal package use only.booleanMake a clone of the receiver.voidrestoreFilterSettings(IDialogSettings settings) Restore the state of the receiver in the supplied settings.protected voidrestoreFilterSettings(IMemento memento) Restore the state of the receiver in the supplied settings.final voidrestoreState(IMemento memento) Restore the state in the memento.voidsaveFilterSettings(IMemento settings) Save the filter settings for the receiver.booleanselect(ConcreteMarker marker) Return whether or not the receiver would select the marker.protected booleanselectMarker(ConcreteMarker marker) Subclasses should override to determine if the given marker passes the filter.voidsetFocusResource(IResource[] resources) Sets the focused resources.voidsetSelectedTypes(List<MarkerType> selectedTypes) Set the selected types.
-
Field Details
-
TAG_ON_RESOURCE
The tag for the scope.- See Also:
-
TAG_SELECTION_STATUS
New attribute to handle the selection status of marker types.- See Also:
-
SELECTED_FALSE
Attribute status true.- See Also:
-
ON_ANY
public static final int ON_ANYConstant for any element.- See Also:
-
ON_SELECTED_ONLY
public static final int ON_SELECTED_ONLYConstant for any selected element only.- See Also:
-
ON_SELECTED_AND_CHILDREN
public static final int ON_SELECTED_AND_CHILDRENConstant for selected element and children.- See Also:
-
ON_ANY_IN_SAME_CONTAINER
public static final int ON_ANY_IN_SAME_CONTAINERConstant for any element in same container.- See Also:
-
ON_WORKING_SET
public static final int ON_WORKING_SETConstant for on working set.- See Also:
-
rootTypes
-
selectedTypes
-
workingSet
-
onResource
protected int onResource -
enabled
protected boolean enabled
-
-
Method Details
-
addAllSubTypes
List all types known to this MarkerFilter.- Parameters:
types- list to be filled in with types
-
selectMarker
Subclasses should override to determine if the given marker passes the filter.- Parameters:
marker- unused, but can be used in overrides- Returns:
trueif the marker passes the filter andfalseotherwise
-
select
Return whether or not the receiver would select the marker.- Returns:
- boolean
-
getOnResource
public int getOnResource()MarkerFilter.ON_ANYif showing items associated with any resource.MarkerFilter.ON_SELECTED_ONLYif showing items associated with the selected resource within the workbench.MarkerFilter.ON_SELECTED_AND_CHILDRENif showing items associated with the selected resource within the workbench and its children.MarkerFilter.ON_ANY_OF_SAME_PROJECTif showing items in the same project as the selected resource within the workbench.MarkerFilter.ON_WORKING_SETif showing items in some working set.
- Returns:
- int
-
setFocusResource
Sets the focused resources. -
isEnabled
public boolean isEnabled()- Returns:
trueif the filter is enabled.falseif the filter is not enabled.
-
getRootTypes
Warning: for internal package use only. Return the root marker types.- Returns:
- the root marker types.
-
getSelectedTypes
Warning: for internal package use only. Return the selected types.- Returns:
- the selected marker types to be displayed.
-
getMarkerType
Find the typeModel entry that matches id.- Parameters:
id- the ID for a marker type- Returns:
- MarkerType or
nullif it is not found.
-
restoreState
Restore the state in the memento. -
restoreFilterSettings
Restore the state of the receiver in the supplied settings. This is kept for backwards compatibility with 3.1 dialog settings. -
restoreFilterSettings
Restore the state of the receiver in the supplied settings. -
saveFilterSettings
Save the filter settings for the receiver. -
getName
Get the name of the receiver- Returns:
- String
-
makeClone
Make a clone of the receiver.- Returns:
- MarkerFilter
- Throws:
CloneNotSupportedException
-
setSelectedTypes
Set the selected types.- Parameters:
selectedTypes- List of MarkerType.
-