Package org.eclipse.ui.internal
Class EditorActionBuilder.ExternalContributor
java.lang.Object
org.eclipse.ui.internal.EditorActionBuilder.ExternalContributor
- All Implemented Interfaces:
IEditorActionBarContributor
- Enclosing class:
- EditorActionBuilder
public static class EditorActionBuilder.ExternalContributor
extends Object
implements IEditorActionBarContributor
Helper class that will populate the menu and toolbar with the external editor
contributions.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
dispose()
Disposes this contributor.void
init
(IActionBars bars, IWorkbenchPage page) Initializes this contributor, which is expected to add contributions as required to the given action bars and global action handlers.void
setActiveEditor
(IEditorPart editor) Sets the active editor for the contributor.
-
Constructor Details
-
ExternalContributor
-
-
Method Details
-
dispose
public void dispose()Description copied from interface:IEditorActionBarContributor
Disposes this contributor.- Specified by:
dispose
in interfaceIEditorActionBarContributor
-
getExtendedActions
-
init
Description copied from interface:IEditorActionBarContributor
Initializes this contributor, which is expected to add contributions as required to the given action bars and global action handlers.The page is passed to support the use of
RetargetAction
by the contributor. In this case the init method implementors should:- set retarget actions as global action handlers
- add the retarget actions as part listeners
- get the active part and if not
null
call partActivated on the retarget actions
And in the dispose method the retarget actions should be removed as part listeners.
- Specified by:
init
in interfaceIEditorActionBarContributor
- Parameters:
bars
- the action barspage
- the workbench page for this contributor
-
setActiveEditor
Description copied from interface:IEditorActionBarContributor
Sets the active editor for the contributor. Implementors should disconnect from the old editor, connect to the new editor, and update the actions to reflect the new editor.- Specified by:
setActiveEditor
in interfaceIEditorActionBarContributor
- Parameters:
editor
- the new editor target
-