cu= manager.getWorkingCopy(editor.getEditorInput()); } setEnabled(cu != null);
setEnabled(manager.getWorkingCopy(editor.getEditorInput()) != null); } else if (editor instanceof ClassFileEditor) { IEditorInput input= editor.getEditorInput(); IClassFile cf= null; if (input instanceof IClassFileEditorInput) { IClassFileEditorInput cfi= (IClassFileEditorInput)input; cf= cfi.getClassFile(); } setEnabled(cf != null && cf.exists()); } else setEnabled(editor != null);
	public void update() {		ITextEditor editor= getTextEditor();		boolean checked= (editor != null && editor.showsHighlightRangeOnly());		setChecked(checked);		ICompilationUnit cu= null;		if (editor != null) {			IWorkingCopyManager manager= JavaPlugin.getDefault().getWorkingCopyManager();			cu= manager.getWorkingCopy(editor.getEditorInput());		}		setEnabled(cu != null);	}