Bug 78317 Compare plug-in gets loaded by LocalHistoryActionGroup
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/compare/JavaAddElementFromHistory.java
}
		}
		
		
		return -1;
	}
		
	protected boolean isEnabled(ISelection selection) {
		
		if (selection.isEmpty()) {
			JavaEditor editor= getEditor();
			if (editor != null) {
				
				IEditorInput editorInput= editor.getEditorInput();
				IWorkingCopyManager manager= JavaPlugin.getDefault().getWorkingCopyManager();
				return manager.getWorkingCopy(editorInput) != null;
			}
			return false;
		}
		
		if (selection instanceof IStructuredSelection) {
			Object o= ((IStructuredSelection)selection).getFirstElement();
			if (o instanceof ICompilationUnit)
				return true;
		}
		
		return super.isEnabled(selection);
	}
}