public class TextEditorActionContributor extends BasicTextEditorActionContributor
If instantiated and used as-is, this contributor connects the following global actions:
Constructor and Description |
---|
TextEditorActionContributor()
Creates a new contributor.
|
Modifier and Type | Method and Description |
---|---|
void |
contributeToMenu(IMenuManager menu)
Contributes to the given menu.
|
void |
dispose()
The
EditorActionBarContributor implementation of this
IEditorActionBarContributor method does nothing,
subclasses may override. |
void |
init(IActionBars bars)
This method calls:
contributeToMenu with bars ' menu manager
contributeToToolBar with bars ' tool bar
manager
contributeToCoolBar with bars ' cool bar
manager if IActionBars is of extended type IActionBars2
contributeToStatusLine with bars ' status line
manager
The given action bars are also remembered and made accessible via
getActionBars . |
void |
setActiveEditor(IEditorPart part)
The
BasicTextEditorActionContributor implementation of this
IEditorActionBarContributor method installs the global
action handler for the given text editor by calling a private helper
method. |
contributeToStatusLine, getAction, getActiveEditorPart
contributeToCoolBar, contributeToToolBar, getActionBars, getPage, init
public TextEditorActionContributor()
public void contributeToMenu(IMenuManager menu)
EditorActionBarContributor
The EditorActionBarContributor
implementation of this method
does nothing. Subclasses may reimplement to add to the menu portion of this
contribution.
contributeToMenu
in class BasicTextEditorActionContributor
menu
- the manager that controls the menupublic void setActiveEditor(IEditorPart part)
BasicTextEditorActionContributor
BasicTextEditorActionContributor
implementation of this
IEditorActionBarContributor
method installs the global
action handler for the given text editor by calling a private helper
method.
Subclasses may extend.
setActiveEditor
in interface IEditorActionBarContributor
setActiveEditor
in class BasicTextEditorActionContributor
part
- the new target editorpublic void dispose()
EditorActionBarContributor
EditorActionBarContributor
implementation of this
IEditorActionBarContributor
method does nothing,
subclasses may override.dispose
in interface IEditorActionBarContributor
dispose
in class BasicTextEditorActionContributor
public void init(IActionBars bars)
EditorActionBarContributor
contributeToMenu
with bars
' menu managercontributeToToolBar
with bars
' tool bar
managercontributeToCoolBar
with bars
' cool bar
manager if IActionBars
is of extended type IActionBars2
contributeToStatusLine
with bars
' status line
managergetActionBars
.init
in class EditorActionBarContributor
bars
- the action bars
Copyright (c) 2000, 2015 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.