if (activeEditorPart == part)
return;
activeEditorPart = part;
IActionBars actionBars = getActionBars();
if (actionBars != null) {
ITextEditor editor = (part instanceof ITextEditor) ? (ITextEditor) part : null;
actionBars.setGlobalActionHandler(
IWorkbenchActionConstants.DELETE,
getAction(editor, ITextEditorActionConstants.DELETE));
actionBars.setGlobalActionHandler(
IWorkbenchActionConstants.UNDO,
getAction(editor, ITextEditorActionConstants.UNDO));
actionBars.setGlobalActionHandler(
IWorkbenchActionConstants.REDO,
getAction(editor, ITextEditorActionConstants.REDO));
actionBars.setGlobalActionHandler(
IWorkbenchActionConstants.CUT,
getAction(editor, ITextEditorActionConstants.CUT));
actionBars.setGlobalActionHandler(
IWorkbenchActionConstants.COPY,
getAction(editor, ITextEditorActionConstants.COPY));
actionBars.setGlobalActionHandler(
IWorkbenchActionConstants.PASTE,
getAction(editor, ITextEditorActionConstants.PASTE));
actionBars.setGlobalActionHandler(
IWorkbenchActionConstants.SELECT_ALL,
getAction(editor, ITextEditorActionConstants.SELECT_ALL));
actionBars.setGlobalActionHandler(
IWorkbenchActionConstants.FIND,
getAction(editor, ITextEditorActionConstants.FIND));
actionBars.setGlobalActionHandler(
IWorkbenchActionConstants.BOOKMARK,
getAction(editor, ITextEditorActionConstants.BOOKMARK));
actionBars.updateActionBars();
}