# Class ProblemFilter

java.lang.Object
org.eclipse.ui.views.markers.internal.MarkerFilter
org.eclipse.ui.views.markers.internal.ProblemFilter

All Implemented Interfaces:
  `Cloneable`

public class ProblemFilter extends MarkerFilter
ProblemFilters are the filters used in the problems view.

## Field Summary

Fields
Modifier and Type
Field
Description
`static final int`
`SEVERITY_ERROR`
Severity for errors
`static final int`
`SEVERITY_INFO`
Severity for infos
`static final int`
`SEVERITY_WARNING`
Severity for warnings
`static final String`
`TAG_CONTAINS`
Tag for contains boolean
`static final String`
`TAG_DESCRIPTION`
Tag for contains description.
`static final String`
`TAG_SEVERITY`
Tag for the severity value

### Fields inherited from class 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

Constructors
Constructor
Description
`ProblemFilter(String filterName)`
Create a new instance of the receiver with name filterName.

## Method Summary

Modifier and Type
Method
Description
`boolean`
`getContains()`
Get the value for if there is a check for containing a phrase.
`String`
`getDescription()`
Get the value for the description.
`String`
`getId()`
Get the id of the filter.
`boolean`
`getSelectBySeverity()`
Get the value for if there is a check for severity.
`int`
`getSeverity()`
Get the value for if there is a severity.
`boolean`
`isEnabled()`
`boolean`
`isFilteredOutByActivity()`
Return whether or not the receiver will be filtered out due to an activity match.
`void`
`resetState()`
`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 severity
`void`
`setSeverity(int severity)`
Set the value for the severity to match against.

### Methods inherited from class MarkerFilter

`addAllSubTypes, getMarkerType, getName, getOnResource, getRootTypes, getSelectedTypes, makeClone, restoreState, select, setFocusResource, setSelectedTypes`

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### TAG_CONTAINS

public static final String TAG_CONTAINS
Tag for contains boolean

See Also:
  - Constant Field Values

### TAG_DESCRIPTION

public static final String TAG_DESCRIPTION
Tag for contains description.

See Also:
  - Constant Field Values

### TAG_SEVERITY

public static final String TAG_SEVERITY
Tag for the severity value

See Also:
  - Constant Field Values

### SEVERITY_ERROR

public static final int SEVERITY_ERROR
Severity for errors

See Also:
  - Constant Field Values

### SEVERITY_WARNING

public static final int SEVERITY_WARNING
Severity for warnings

See Also:
  - Constant Field Values

### SEVERITY_INFO

public static final int SEVERITY_INFO
Severity for infos

See Also:
  - Constant Field Values

## Constructor Details

### ProblemFilter

public ProblemFilter(String filterName)
Create a new instance of the receiver with name filterName.

Parameters:
  `filterName` - A human readable name for the filter.

## Method Details

### selectMarker

public boolean selectMarker(ConcreteMarker marker)
Description copied from class: `MarkerFilter`
Subclasses should override to determine if the given marker passes the filter.

Overrides:
  `selectMarker` in class `MarkerFilter`
Parameters:
  `marker` - unused, but can be used in overrides
Returns:
  `true` if the marker passes the filter and `false` otherwise

### getContains

public boolean getContains()
Get the value for if there is a check for containing a phrase.

Returns:
  boolean

### getDescription

public String 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

public void setDescription(String description)
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

public void restoreFilterSettings(IDialogSettings settings)
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 class `MarkerFilter`

### restoreFilterSettings

protected void restoreFilterSettings(IMemento memento)
Description copied from class: `MarkerFilter`
Restore the state of the receiver in the supplied settings.

Overrides:
  `restoreFilterSettings` in class `MarkerFilter`

### saveFilterSettings

public void saveFilterSettings(IMemento settings)
Description copied from class: `MarkerFilter`
Save the filter settings for the receiver.

Overrides:
  `saveFilterSettings` in class `MarkerFilter`

### getId

public String 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 class `MarkerFilter`
Returns:
  - `true` if the filter is enabled.
  - `false` if the filter is not enabled.