for (IWorkbenchWindow window : windows) {
IEditorReference[] editorReferences = window.getActivePage().getEditorReferences();
for (IEditorReference editorReference : editorReferences) {
try {
if (editorReference.getEditorInput() instanceof TaskEditorInput) {
TaskEditorInput input = (TaskEditorInput) editorReference.getEditorInput();
if (input.getTask()!=null && (input.getTask()==task || input.getTask().getHandleIdentifier().equals(task.getHandleIdentifier()))) {
return true;
}
}
} catch (PartInitException e) {
// ignore