setEnabled(editor != null);
ICompilationUnit cu= null; if (editor != null) { IWorkingCopyManager manager= JavaPlugin.getDefault().getWorkingCopyManager(); cu= manager.getWorkingCopy(editor.getEditorInput()); } setEnabled(cu != null);
	public void update() {		ITextEditor editor= getTextEditor();		boolean checked= (editor != null && editor.showsHighlightRangeOnly());		setChecked(checked);		setEnabled(editor != null);	}