Bug 44443 [Tasks] Problems View should 'filter' more efficiently
bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/ActionDeleteCompleted.java
}
				}
			}, null);
		}
		catch (CoreException e) {
			ErrorDialog.openError(part.getSite().getShell(), Messages.getString("deleteCompletedTasks.errorMessage"), null, e.getStatus()); 
		}
	}
	
	private List getCompletedTasks() {
		List completed = new ArrayList();
		Object[] markers = registry.getElements();
		
		for (int i = 0; i < markers.length; i++) {
			IMarker marker = (IMarker) markers[i];
			if (Util.isEditable(marker) && marker.getAttribute(IMarker.DONE, false)) {
				completed.add(marker);
			}
		}
		
		return completed;
	}
	/* (non-Javadoc)
	 * @see org.eclipse.ui.actions.SelectionProviderAction#selectionChanged(org.eclipse.jface.viewers.IStructuredSelection)
	 */
	public void selectionChanged(IStructuredSelection selection) {
		setEnabled(!selection.isEmpty());
	}
}