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
public class TextEditorActionContributor extends BasicTextEditorActionContributor
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 Constructor Description TextEditorActionContributor()
Creates a new contributor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
contributeToMenu(IMenuManager menu)
Contributes to the given menu.void
dispose()
TheEditorActionBarContributor
implementation of thisIEditorActionBarContributor
method does nothing, subclasses may override.void
init(IActionBars bars)
This method calls:contributeToMenu
withbars
' menu managercontributeToToolBar
withbars
' tool bar managercontributeToCoolBar
withbars
' cool bar manager ifIActionBars
is of extended typeIActionBars2
contributeToStatusLine
withbars
' status line manager The given action bars are also remembered and made accessible viagetActionBars
.void
setActiveEditor(IEditorPart part)
TheBasicTextEditorActionContributor
implementation of thisIEditorActionBarContributor
method 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, getActiveEditorPart
-
Methods inherited from class org.eclipse.ui.part.EditorActionBarContributor
contributeToCoolBar, contributeToToolBar, getActionBars, getPage, init
-
-
-
-
Method Detail
-
contributeToMenu
public void contributeToMenu(IMenuManager menu)
Description copied from class:EditorActionBarContributor
Contributes to the given menu.The
EditorActionBarContributor
implementation of this method does nothing. Subclasses may reimplement to add to the menu portion of this contribution.- Overrides:
contributeToMenu
in classBasicTextEditorActionContributor
- Parameters:
menu
- the manager that controls the menu
-
setActiveEditor
public void setActiveEditor(IEditorPart part)
Description copied from class:BasicTextEditorActionContributor
TheBasicTextEditorActionContributor
implementation of thisIEditorActionBarContributor
method installs the global action handler for the given text editor by calling a private helper method.Subclasses may extend.
- Specified by:
setActiveEditor
in interfaceIEditorActionBarContributor
- Overrides:
setActiveEditor
in classBasicTextEditorActionContributor
- Parameters:
part
- the new target editor
-
dispose
public void dispose()
Description copied from class:EditorActionBarContributor
TheEditorActionBarContributor
implementation of thisIEditorActionBarContributor
method does nothing, subclasses may override.- Specified by:
dispose
in interfaceIEditorActionBarContributor
- Overrides:
dispose
in classBasicTextEditorActionContributor
-
init
public void init(IActionBars bars)
Description copied from class:EditorActionBarContributor
This method calls:contributeToMenu
withbars
' menu managercontributeToToolBar
withbars
' tool bar managercontributeToCoolBar
withbars
' cool bar manager ifIActionBars
is of extended typeIActionBars2
contributeToStatusLine
withbars
' status line manager
getActionBars
.- Overrides:
init
in classEditorActionBarContributor
- Parameters:
bars
- the action bars
-
-