@Override public void setActiveEditor(IEditorPart part) { IEditorPart activeNestedEditor = null; if (part instanceof MultiPageEditorPart) { activeNestedEditor = ((MultiPageEditorPart) part).getActiveEditor(); } setActivePage(activeNestedEditor); }
/** * Notifies action bar contributor about page change. * * @param pageIndex * the index of the new page */ protected void updateActionBarContributor(int pageIndex) { // this is to enable the undo/redo actions before a page change has // occurred IEditorActionBarContributor contributor = getEditorSite() .getActionBarContributor(); if (contributor != null && contributor instanceof MultiPageEditorActionBarContributor) { ((MultiPageEditorActionBarContributor) contributor) .setActivePage(getEditor(pageIndex)); } }
/** * Notifies action bar contributor about page change. * * @param pageIndex * the index of the new page */ protected void updateActionBarContributor(int pageIndex) { // this is to enable the undo/redo actions before a page change has // occurred IEditorActionBarContributor contributor = getEditorSite() .getActionBarContributor(); if (contributor != null && contributor instanceof MultiPageEditorActionBarContributor) { ((MultiPageEditorActionBarContributor) contributor) .setActivePage(getEditor(pageIndex)); } }
&& contributor instanceof MultiPageEditorActionBarContributor) { ((MultiPageEditorActionBarContributor) contributor) .setActivePage(activeEditor);
&& contributor instanceof MultiPageEditorActionBarContributor) { ((MultiPageEditorActionBarContributor) contributor) .setActivePage(activeEditor);