Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 


Eclipse Platform
Release 3.5

org.eclipse.ui.part
Class EditorActionBarContributor

java.lang.Object
  extended by 
org.eclipse.ui.part.EditorActionBarContributor
All Implemented Interfaces:
IEditorActionBarContributor
Direct Known Subclasses:
BasicTextEditorActionContributor, MultiPageEditorActionBarContributor

public class EditorActionBarContributor
extends Object
implements IEditorActionBarContributor

Standard implementation of IEditorActionBarContributor.

If instantiated and used as-is, nothing is contribututed. Clients should subclass in order to contribute to some or all of the action bars.

Subclasses may reimplement the following methods:

  • contributeToMenu - reimplement to contribute to menu
  • contributeToToolBar - reimplement to contribute to tool bar
  • contributeToStatusLine - reimplement to contribute to status line
  • setActiveEditor - reimplement to react to editor changes


Constructor Summary
EditorActionBarContributor ()
          Creates an empty editor action bar contributor.
 
Method Summary
 void contributeToCoolBar ( ICoolBarManager coolBarManager)
          Contributes to the given cool bar.
 void contributeToMenu ( IMenuManager menuManager)
          Contributes to the given menu.
 void contributeToStatusLine ( IStatusLineManager statusLineManager)
          Contributes to the given status line.
 void contributeToToolBar ( IToolBarManager toolBarManager)
          Contributes to the given tool bar.
 void dispose ()
          The EditorActionBarContributor implementation of this IEditorActionBarContributor method does nothing, subclasses may override.
  IActionBars getActionBars ()
          Returns this contributor's action bars.
  IWorkbenchPage getPage ()
          Returns this contributor's workbench page.
 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 init ( IActionBars bars, IWorkbenchPage page)
          The EditorActionBarContributor implementation of this IEditorActionBarContributor method remembers the page then forwards the call to init(IActionBars) for backward compatibility
 void setActiveEditor ( IEditorPart targetEditor)
          Sets the active editor for the contributor.
 
Methods inherited from class java.lang. Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EditorActionBarContributor

public EditorActionBarContributor()
Creates an empty editor action bar contributor. The action bars are furnished later via the init method.

Method Detail

contributeToMenu

public void contributeToMenu(
IMenuManager menuManager)
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.

Parameters:
menuManager - the manager that controls the menu

contributeToStatusLine

public void contributeToStatusLine(
IStatusLineManager statusLineManager)
Contributes to the given status line.

The EditorActionBarContributor implementation of this method does nothing. Subclasses may reimplement to add to the status line portion of this contribution.

Parameters:
statusLineManager - the manager of the status line

contributeToToolBar

public void contributeToToolBar(
IToolBarManager toolBarManager)
Contributes to the given tool bar.

The EditorActionBarContributor implementation of this method does nothing. Subclasses may reimplement to add to the tool bar portion of this contribution.

Parameters:
toolBarManager - the manager that controls the workbench tool bar

contributeToCoolBar

public void contributeToCoolBar(
ICoolBarManager coolBarManager)
Contributes to the given cool bar.

The EditorActionBarContributor implementation of this method does nothing. Subclasses may reimplement to add to the cool bar portion of this contribution. There can only be contributions from a cool bar or a tool bar.

Parameters:
coolBarManager - the manager that controls the workbench cool bar.
Since:
3.0

getActionBars

public 
IActionBars getActionBars()
Returns this contributor's action bars.

Returns:
the action bars

getPage

public 
IWorkbenchPage getPage()
Returns this contributor's workbench page.

Returns:
the workbench page

dispose

public void dispose()
The EditorActionBarContributor implementation of this IEditorActionBarContributor method does nothing, subclasses may override.

Specified by:
dispose in interface IEditorActionBarContributor

init

public void init(
IActionBars bars,
                 
IWorkbenchPage page)
The EditorActionBarContributor implementation of this IEditorActionBarContributor method remembers the page then forwards the call to init(IActionBars) for backward compatibility

Specified by:
init in interface IEditorActionBarContributor
Parameters:
bars - the action bars
page - the workbench page for this contributor

init

public 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.

Parameters:
bars - the action bars

setActiveEditor

public void setActiveEditor(
IEditorPart targetEditor)
Sets the active editor for the contributor.

The EditorActionBarContributor implementation of this method does nothing. Subclasses may reimplement. This generally entails disconnecting from the old editor, connecting to the new editor, and updating the actions to reflect the new editor.

Specified by:
setActiveEditor in interface IEditorActionBarContributor
Parameters:
targetEditor - the new target editor

Eclipse Platform
Release 3.5

Guidelines for using Eclipse APIs.

Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire