Bug 44443 [Tasks] Problems View should 'filter' more efficiently
bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/TaskFilter.java
final static String DEFAULT_DESCRIPTION = ""; 	
	final static boolean DEFAULT_DONE = false;
	final static int DEFAULT_PRIORITY = 0;
	final static boolean DEFAULT_SELECT_BY_DONE = false;
	final static boolean DEFAULT_SELECT_BY_PRIORITY = false;
	
	final static int PRIORITY_HIGH = 1 << 2;
	final static int PRIORITY_NORMAL = 1 << 1;
	final static int PRIORITY_LOW = 1 << 0;
	private boolean contains;
	private String description;
	private boolean done;
	private int priority;
	private boolean selectByPriority;
	private boolean selectByDone;
	public TaskFilter() {
		super(new String[] { IMarker.TASK });
	}
	
	public boolean select(Object item) {
		return isEnabled() ? super.select(item) && selectByDescription(item) && selectByDone(item) && selectByPriority(item) : true;
	}
	
	private boolean selectByDescription(Object item) {
		if (!(item instanceof IMarker) || description == null || description.equals("")) 
			return true;
		
		IMarker marker = (IMarker) item;
		String markerDescription = marker.getAttribute(IMarker.MESSAGE, DEFAULT_DESCRIPTION); 
		int index = markerDescription.indexOf(description);