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
Modifier and TypeFieldDescriptionprotected boolean
static final int
Constant for any element.static final int
Constant for any element in same container.static final int
Constant for selected element and children.static final int
Constant for any selected element only.static final int
Constant for on working set.protected int
protected List<MarkerType>
static final String
Attribute status true.protected List<MarkerType>
static final String
The tag for the scope.static final String
New attribute to handle the selection status of marker types.protected IWorkingSet
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addAllSubTypes
(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 receiverint
MarkerFilter.ON_ANY
if showing items associated with any resource.MarkerFilter.ON_SELECTED_ONLY
if showing items associated with the selected resource within the workbench.MarkerFilter.ON_SELECTED_AND_CHILDREN
if showing items associated with the selected resource within the workbench and its children.MarkerFilter.ON_ANY_OF_SAME_PROJECT
if showing items in the same project as the selected resource within the workbench.MarkerFilter.ON_WORKING_SET
if showing items in some working set.Warning: for internal package use only.Warning: for internal package use only.boolean
Make a clone of the receiver.void
restoreFilterSettings
(IDialogSettings settings) Restore the state of the receiver in the supplied settings.protected void
restoreFilterSettings
(IMemento memento) Restore the state of the receiver in the supplied settings.final void
restoreState
(IMemento memento) Restore the state in the memento.void
saveFilterSettings
(IMemento settings) Save the filter settings for the receiver.boolean
select
(ConcreteMarker marker) Return whether or not the receiver would select the marker.protected boolean
selectMarker
(ConcreteMarker marker) Subclasses should override to determine if the given marker passes the filter.void
setFocusResource
(IResource[] resources) Sets the focused resources.void
setSelectedTypes
(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:
true
if the marker passes the filter andfalse
otherwise
-
select
Return whether or not the receiver would select the marker.- Returns:
- boolean
-
getOnResource
public int getOnResource()MarkerFilter.ON_ANY
if showing items associated with any resource.MarkerFilter.ON_SELECTED_ONLY
if showing items associated with the selected resource within the workbench.MarkerFilter.ON_SELECTED_AND_CHILDREN
if showing items associated with the selected resource within the workbench and its children.MarkerFilter.ON_ANY_OF_SAME_PROJECT
if showing items in the same project as the selected resource within the workbench.MarkerFilter.ON_WORKING_SET
if showing items in some working set.
- Returns:
- int
-
setFocusResource
Sets the focused resources. -
isEnabled
public boolean isEnabled()- Returns:
true
if the filter is enabled.false
if 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
null
if 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.
-