actionBars.setGlobalActionHandler(ITextEditorActionDefinitionIds.TOGGLE_SHOW_SELECTED_ELEMENT_ONLY, fTogglePresentation); actionBars.setGlobalActionHandler(IJavaEditorActionDefinitionIds.TOGGLE_MARK_OCCURRENCES, fToggleMarkOccurrencesAction);
	public void setActiveEditor(IEditorPart part) {		super.setActiveEditor(part);		ITextEditor textEditor= null;		if (part instanceof ITextEditor)			textEditor= (ITextEditor)part;		fTogglePresentation.setEditor(textEditor);		fToggleMarkOccurrencesAction.setEditor(textEditor);		fGotoMatchingBracket.setAction(getAction(textEditor, GotoMatchingBracketAction.GOTO_MATCHING_BRACKET));		fShowJavaDoc.setAction(getAction(textEditor, "ShowJavaDoc")); //$NON-NLS-1$		fShowOutline.setAction(getAction(textEditor, IJavaEditorActionDefinitionIds.SHOW_OUTLINE));		fOpenHierarchy.setAction(getAction(textEditor, IJavaEditorActionDefinitionIds.OPEN_HIERARCHY));		fOpenStructure.setAction(getAction(textEditor, IJavaEditorActionDefinitionIds.OPEN_STRUCTURE));		fStructureSelectEnclosingAction.setAction(getAction(textEditor, StructureSelectionAction.ENCLOSING));		fStructureSelectNextAction.setAction(getAction(textEditor, StructureSelectionAction.NEXT));		fStructureSelectPreviousAction.setAction(getAction(textEditor, StructureSelectionAction.PREVIOUS));		fStructureSelectHistoryAction.setAction(getAction(textEditor, StructureSelectionAction.HISTORY));		fGotoNextMemberAction.setAction(getAction(textEditor, GoToNextPreviousMemberAction.NEXT_MEMBER));		fGotoPreviousMemberAction.setAction(getAction(textEditor, GoToNextPreviousMemberAction.PREVIOUS_MEMBER));		fRemoveOccurrenceAnnotationsAction.setAction(getAction(textEditor, "RemoveOccurrenceAnnotations")); //$NON-NLS-1$		if (part instanceof JavaEditor) {			JavaEditor javaEditor= (JavaEditor) part;			javaEditor.getActionGroup().fillActionBars(getActionBars());			FoldingActionGroup foldingActions= javaEditor.getFoldingActionGroup();			if (foldingActions != null)				foldingActions.updateActionBars();		}		IActionBars actionBars= getActionBars();		IStatusLineManager manager= actionBars.getStatusLineManager();		manager.setMessage(null);		manager.setErrorMessage(null);				/** The global actions to be connected with editor actions */		IAction action= getAction(textEditor, ITextEditorActionConstants.NEXT);		actionBars.setGlobalActionHandler(ITextEditorActionDefinitionIds.GOTO_NEXT_ANNOTATION, action);		actionBars.setGlobalActionHandler(ITextEditorActionConstants.NEXT, action);		action= getAction(textEditor, ITextEditorActionConstants.PREVIOUS);		actionBars.setGlobalActionHandler(ITextEditorActionDefinitionIds.GOTO_PREVIOUS_ANNOTATION, action);		actionBars.setGlobalActionHandler(ITextEditorActionConstants.PREVIOUS, action);				// XXX: Workaround for Platform UI bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=137091		actionBars.setGlobalActionHandler(ITextEditorActionDefinitionIds.TOGGLE_SHOW_SELECTED_ELEMENT_ONLY, fTogglePresentation);		actionBars.setGlobalActionHandler(IJavaEditorActionDefinitionIds.TOGGLE_MARK_OCCURRENCES, fToggleMarkOccurrencesAction);			}