Package org.eclipse.ui.internal
Class EditorActionBars
java.lang.Object
org.eclipse.core.commands.common.EventManager
org.eclipse.ui.SubActionBars
org.eclipse.ui.SubActionBars2
org.eclipse.ui.internal.EditorActionBars
- All Implemented Interfaces:
IActionBars
,IActionBars2
The action bars for an editor.
-
Field Summary
Fields inherited from class org.eclipse.ui.SubActionBars
P_ACTION_HANDLERS
-
Constructor Summary
ConstructorDescriptionEditorActionBars
(WorkbenchPage page, IServiceLocator serviceLocator, String type) Constructs the EditorActionBars for an editor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
activate
(boolean forceVisibility) Activate the contributions.void
addRef()
Add one ref to the bars.protected SubMenuManager
createSubMenuManager
(IMenuManager parent) Returns a new sub menu manager.protected SubToolBarManager
Returns a new sub toolbar manager.void
deactivate
(boolean forceVisibility) Deactivate the contributions.void
dispose()
Dispose the contributions.Gets the editor contributorReturns the editor type.Gets the extension contributorReturns the expression used for action handler activation.getPage()
int
getRef()
Returns the reference count.Returns the tool bar manager.void
partChanged
(IWorkbenchPart part) Sets the target part for the action bars.void
Remove one ref to the bars.void
Sets the editor contributorvoid
Sets the extension contributorMethods inherited from class org.eclipse.ui.SubActionBars2
createSubCoolBarManager, getCastedParent, getCoolBarManager, setActive
Methods inherited from class org.eclipse.ui.SubActionBars
activate, addPropertyChangeListener, basicSetActive, clearGlobalActionHandlers, deactivate, fireActionHandlersChanged, firePropertyChange, getActive, getGlobalActionHandler, getGlobalActionHandlers, getMenuManager, getParent, getServiceLocator, getStatusLineManager, isSubMenuManagerCreated, isSubStatusLineManagerCreated, isSubToolBarManagerCreated, removePropertyChangeListener, setGlobalActionHandler, setServiceLocator, updateActionBars
Methods inherited from class org.eclipse.core.commands.common.EventManager
addListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObject
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.eclipse.ui.IActionBars
clearGlobalActionHandlers, getGlobalActionHandler, getMenuManager, getServiceLocator, getStatusLineManager, setGlobalActionHandler, updateActionBars
-
Constructor Details
-
EditorActionBars
Constructs the EditorActionBars for an editor.
-
-
Method Details
-
getPage
-
activate
public void activate(boolean forceVisibility) Activate the contributions.- Overrides:
activate
in classSubActionBars
- Parameters:
forceVisibility
- (is not used)
-
addRef
public void addRef()Add one ref to the bars. -
createSubMenuManager
Description copied from class:SubActionBars
Returns a new sub menu manager.- Overrides:
createSubMenuManager
in classSubActionBars
- Parameters:
parent
- the parent menu manager- Returns:
- the menu manager
-
createSubToolBarManager
Description copied from class:SubActionBars
Returns a new sub toolbar manager.- Overrides:
createSubToolBarManager
in classSubActionBars
- Parameters:
parent
- the parent toolbar manager- Returns:
- the tool bar manager
-
deactivate
public void deactivate(boolean forceVisibility) Deactivate the contributions.- Overrides:
deactivate
in classSubActionBars
- Parameters:
forceVisibility
- (not used)
-
dispose
public void dispose()Dispose the contributions.- Overrides:
dispose
in classSubActionBars2
-
getEditorContributor
Gets the editor contributor -
getEditorType
Returns the editor type. -
getExtensionContributor
Gets the extension contributor -
getRef
public int getRef()Returns the reference count. -
getToolBarManager
Returns the tool bar manager. If items are added or removed from the manager be sure to callupdateActionBars
. Overridden to support CoolBars.- Specified by:
getToolBarManager
in interfaceIActionBars
- Overrides:
getToolBarManager
in classSubActionBars
- Returns:
- the tool bar manager
-
partChanged
Sets the target part for the action bars. For views this is ignored because each view has its own action vector. For editors this is important because the action vector is shared by editors of the same type.- Overrides:
partChanged
in classSubActionBars
- Parameters:
part
- the part to be notified.
-
removeRef
public void removeRef()Remove one ref to the bars. -
setEditorContributor
Sets the editor contributor -
setExtensionContributor
Sets the extension contributor -
getHandlerExpression
Returns the expression used for action handler activation.- Returns:
- the expression used for action handler activation.
-