Class ProblemFilter
java.lang.Object
org.eclipse.ui.views.markers.internal.MarkerFilter
org.eclipse.ui.views.markers.internal.ProblemFilter
- All Implemented Interfaces:
Cloneable
ProblemFilters are the filters used in the problems view.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
Severity for errorsstatic final int
Severity for infosstatic final int
Severity for warningsstatic final String
Tag for contains booleanstatic final String
Tag for contains description.static final String
Tag for the severity valueFields inherited from class org.eclipse.ui.views.markers.internal.MarkerFilter
enabled, ON_ANY, ON_ANY_IN_SAME_CONTAINER, ON_SELECTED_AND_CHILDREN, ON_SELECTED_ONLY, ON_WORKING_SET, onResource, rootTypes, SELECTED_FALSE, selectedTypes, TAG_ON_RESOURCE, TAG_SELECTION_STATUS, workingSet
-
Constructor Summary
ConstructorDescriptionProblemFilter
(String filterName) Create a new instance of the receiver with name filterName. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Get the value for if there is a check for containing a phrase.Get the value for the description.getId()
Get the id of the filter.boolean
Get the value for if there is a check for severity.int
Get the value for if there is a severity.boolean
boolean
Return whether or not the receiver will be filtered out due to an activity match.void
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.void
saveFilterSettings
(IMemento settings) Save the filter settings for the receiver.boolean
selectMarker
(ConcreteMarker marker) Subclasses should override to determine if the given marker passes the filter.void
setContains
(boolean contains) Set the value for if there is a check for containing a phrase.void
setDescription
(String description) Set the value for the description.void
setSelectBySeverity
(boolean selectBySeverity) Set the value for if there is a check for severityvoid
setSeverity
(int severity) Set the value for the severity to match against.Methods inherited from class org.eclipse.ui.views.markers.internal.MarkerFilter
addAllSubTypes, getMarkerType, getName, getOnResource, getRootTypes, getSelectedTypes, makeClone, restoreState, select, setFocusResource, setSelectedTypes
-
Field Details
-
TAG_CONTAINS
Tag for contains boolean- See Also:
-
TAG_DESCRIPTION
Tag for contains description.- See Also:
-
TAG_SEVERITY
Tag for the severity value- See Also:
-
SEVERITY_ERROR
public static final int SEVERITY_ERRORSeverity for errors- See Also:
-
SEVERITY_WARNING
public static final int SEVERITY_WARNINGSeverity for warnings- See Also:
-
SEVERITY_INFO
public static final int SEVERITY_INFOSeverity for infos- See Also:
-
-
Constructor Details
-
ProblemFilter
Create a new instance of the receiver with name filterName.- Parameters:
filterName
- A human readable name for the filter.
-
-
Method Details
-
selectMarker
Description copied from class:MarkerFilter
Subclasses should override to determine if the given marker passes the filter.- Overrides:
selectMarker
in classMarkerFilter
- Parameters:
marker
- unused, but can be used in overrides- Returns:
true
if the marker passes the filter andfalse
otherwise
-
getContains
public boolean getContains()Get the value for if there is a check for containing a phrase.- Returns:
- boolean
-
getDescription
Get the value for the description.- Returns:
- boolean
-
getSelectBySeverity
public boolean getSelectBySeverity()Get the value for if there is a check for severity.- Returns:
- boolean
-
getSeverity
public int getSeverity()Get the value for if there is a severity.- Returns:
- boolean
-
setContains
public void setContains(boolean contains) Set the value for if there is a check for containing a phrase. -
setDescription
Set the value for the description. -
setSelectBySeverity
public void setSelectBySeverity(boolean selectBySeverity) Set the value for if there is a check for severity -
setSeverity
public void setSeverity(int severity) Set the value for the severity to match against. -
resetState
public void resetState() -
restoreFilterSettings
Description copied from class:MarkerFilter
Restore the state of the receiver in the supplied settings. This is kept for backwards compatibility with 3.1 dialog settings.- Overrides:
restoreFilterSettings
in classMarkerFilter
-
restoreFilterSettings
Description copied from class:MarkerFilter
Restore the state of the receiver in the supplied settings.- Overrides:
restoreFilterSettings
in classMarkerFilter
-
saveFilterSettings
Description copied from class:MarkerFilter
Save the filter settings for the receiver.- Overrides:
saveFilterSettings
in classMarkerFilter
-
getId
Get the id of the filter.null
if the filter is user defined.- Returns:
- String
-
isFilteredOutByActivity
public boolean isFilteredOutByActivity()Return whether or not the receiver will be filtered out due to an activity match.- Returns:
- boolean
true
if it is filtered out.
-
isEnabled
public boolean isEnabled()- Overrides:
isEnabled
in classMarkerFilter
- Returns:
true
if the filter is enabled.false
if the filter is not enabled.
-