Package org.eclipse.ui.part
Class MultiPageEditorActionBarContributor
java.lang.Object
org.eclipse.ui.part.EditorActionBarContributor
org.eclipse.ui.part.MultiPageEditorActionBarContributor
- All Implemented Interfaces:
IEditorActionBarContributor
Abstract base class for managing the installation/deinstallation of global
actions for multi-page editors.
Subclasses must implement setActivePage
, and may reimplement any
of the following methods:
contributeToMenu
- reimplement to contribute to menucontributeToToolBar
- reimplement to contribute to tool barcontributeToStatusLine
- reimplement to contribute to status line
-
Constructor Summary
ModifierConstructorDescriptionprotected
Creates a multi-page editor action contributor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
setActiveEditor
(IEditorPart part) Sets the active editor for the contributor.abstract void
setActivePage
(IEditorPart activeEditor) Sets the active page of the the multi-page editor to be the given editor.Methods inherited from class org.eclipse.ui.part.EditorActionBarContributor
contributeToCoolBar, contributeToMenu, contributeToStatusLine, contributeToToolBar, dispose, getActionBars, getPage, init, init
-
Constructor Details
-
MultiPageEditorActionBarContributor
protected MultiPageEditorActionBarContributor()Creates a multi-page editor action contributor.
-
-
Method Details
-
setActiveEditor
Description copied from class:EditorActionBarContributor
Sets the active editor for the contributor.The
EditorActionBarContributor
implementation of this method does nothing. Subclasses may reimplement. This generally entails disconnecting from the old editor, connecting to the new editor, and updating the actions to reflect the new editor.- Specified by:
setActiveEditor
in interfaceIEditorActionBarContributor
- Overrides:
setActiveEditor
in classEditorActionBarContributor
- Parameters:
part
- the new target editor
-
setActivePage
Sets the active page of the the multi-page editor to be the given editor. Redirect actions to the given editor if actions are not already being sent to it.This method is called whenever the page changes. Subclasses must implement this method to redirect actions to the given editor (if not already directed to it).
- Parameters:
activeEditor
- the new active editor, ornull
if there is no active page, or if the active page does not have a corresponding editor
-