Package org.eclipse.ui.editors.text
Class TextEditorActionContributor
java.lang.Object
org.eclipse.ui.part.EditorActionBarContributor
org.eclipse.ui.texteditor.BasicTextEditorActionContributor
org.eclipse.ui.editors.text.TextEditorActionContributor
- All Implemented Interfaces:
IEditorActionBarContributor
Manages the installation and de-installation of global actions for the default text editor.
If instantiated and used as-is, this contributor connects the following global actions:
- Add Bookmark
- Add Task
- Change Encoding
- Quick Assist
- Since:
- 2.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcontributeToMenu(IMenuManager menu) Contributes to the given menu.voiddispose()TheEditorActionBarContributorimplementation of thisIEditorActionBarContributormethod does nothing, subclasses may override.voidinit(IActionBars bars) This method calls:contributeToMenuwithbars' menu managercontributeToToolBarwithbars' tool bar managercontributeToCoolBarwithbars' cool bar manager ifIActionBarsis of extended typeIActionBars2contributeToStatusLinewithbars' status line manager The given action bars are also remembered and made accessible viagetActionBars.voidsetActiveEditor(IEditorPart part) TheBasicTextEditorActionContributorimplementation of thisIEditorActionBarContributormethod installs the global action handler for the given text editor by calling a private helper method.Methods inherited from class org.eclipse.ui.texteditor.BasicTextEditorActionContributor
contributeToStatusLine, getAction, getActiveEditorPartMethods inherited from class org.eclipse.ui.part.EditorActionBarContributor
contributeToCoolBar, contributeToToolBar, getActionBars, getPage, init
-
Constructor Details
-
TextEditorActionContributor
public TextEditorActionContributor()Creates a new contributor.
-
-
Method Details
-
contributeToMenu
Description copied from class:EditorActionBarContributorContributes to the given menu.The
EditorActionBarContributorimplementation of this method does nothing. Subclasses may reimplement to add to the menu portion of this contribution.- Overrides:
contributeToMenuin classBasicTextEditorActionContributor- Parameters:
menu- the manager that controls the menu
-
setActiveEditor
Description copied from class:BasicTextEditorActionContributorTheBasicTextEditorActionContributorimplementation of thisIEditorActionBarContributormethod installs the global action handler for the given text editor by calling a private helper method.Subclasses may extend.
- Specified by:
setActiveEditorin interfaceIEditorActionBarContributor- Overrides:
setActiveEditorin classBasicTextEditorActionContributor- Parameters:
part- the new target editor
-
dispose
public void dispose()Description copied from class:EditorActionBarContributorTheEditorActionBarContributorimplementation of thisIEditorActionBarContributormethod does nothing, subclasses may override.- Specified by:
disposein interfaceIEditorActionBarContributor- Overrides:
disposein classBasicTextEditorActionContributor
-
init
Description copied from class:EditorActionBarContributorThis method calls:contributeToMenuwithbars' menu managercontributeToToolBarwithbars' tool bar managercontributeToCoolBarwithbars' cool bar manager ifIActionBarsis of extended typeIActionBars2contributeToStatusLinewithbars' status line manager
getActionBars.- Overrides:
initin classEditorActionBarContributor- Parameters:
bars- the action bars
-