public class MarkerFilter
extends java.lang.Object
implements java.lang.Cloneable
Modifier and Type | Field and Description |
---|---|
protected boolean |
enabled |
static int |
ON_ANY
Constant for any element.
|
static int |
ON_ANY_IN_SAME_CONTAINER
Constant for any element in same container.
|
static int |
ON_SELECTED_AND_CHILDREN
Constant for selected element and children.
|
static int |
ON_SELECTED_ONLY
Constant for any selected element only.
|
static int |
ON_WORKING_SET
Constant for on working set.
|
protected int |
onResource |
protected java.util.List |
rootTypes |
protected java.util.List |
selectedTypes |
protected org.eclipse.ui.IWorkingSet |
workingSet |
Modifier and Type | Method and Description |
---|---|
void |
addAllSubTypes(java.util.List types)
List all types known to this MarkerFilter.
|
MarkerType |
getMarkerType(java.lang.String id)
Find the typeModel entry that matches id.
|
java.lang.String |
getName()
Get the name of the receiver
|
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.
|
java.util.List |
getRootTypes()
Warning: for internal package use only.
|
java.util.List |
getSelectedTypes()
Warning: for internal package use only.
|
boolean |
isEnabled() |
MarkerFilter |
makeClone()
Make a clone of the receiver.
|
void |
restoreFilterSettings(org.eclipse.jface.dialogs.IDialogSettings settings)
Restore the state of the receiver in the supplied settings.
|
protected void |
restoreFilterSettings(org.eclipse.ui.IMemento memento)
Restore the state of the receiver in the supplied settings.
|
void |
restoreState(org.eclipse.ui.IMemento memento)
Restore the state in the memento.
|
void |
saveFilterSettings(org.eclipse.ui.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 |
setFocusSelection(java.lang.Object[] objects)
Sets the focused objects.
|
void |
setSelectedTypes(java.util.List selectedTypes)
Set the selected types.
|
public static final int ON_ANY
public static final int ON_SELECTED_ONLY
public static final int ON_SELECTED_AND_CHILDREN
public static final int ON_ANY_IN_SAME_CONTAINER
public static final int ON_WORKING_SET
protected java.util.List rootTypes
protected java.util.List selectedTypes
protected org.eclipse.ui.IWorkingSet workingSet
protected int onResource
protected boolean enabled
public void addAllSubTypes(java.util.List types)
types
- list to be filled in with typesprotected boolean selectMarker(ConcreteMarker marker)
marker
- true
if the marker passes the filter and false
otherwisepublic boolean select(ConcreteMarker marker)
marker
- 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.public void setFocusSelection(java.lang.Object[] objects)
objects
- public boolean isEnabled()
true
if the filter is enabled.false
if the filter is not enabled.public java.util.List getRootTypes()
public java.util.List getSelectedTypes()
public MarkerType getMarkerType(java.lang.String id)
id
- the ID for a marker typenull
if it is not found.public final void restoreState(org.eclipse.ui.IMemento memento)
memento
- public void restoreFilterSettings(org.eclipse.jface.dialogs.IDialogSettings settings)
settings
- protected void restoreFilterSettings(org.eclipse.ui.IMemento memento)
memento
- public void saveFilterSettings(org.eclipse.ui.IMemento settings)
settings
- public java.lang.String getName()
public MarkerFilter makeClone() throws java.lang.CloneNotSupportedException
java.lang.CloneNotSupportedException
public void setSelectedTypes(java.util.List selectedTypes)
selectedTypes
- List of MarkerType.