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
Answertopia.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
Interface IEditorActionBarContributor

All Known Implementing Classes:
BasicTextEditorActionContributor, EditorActionBarContributor, MultiPageEditorActionBarContributor, TextEditorActionContributor

public interface IEditorActionBarContributor

A editor action bar contributor defines the actions for one or more editors.

Within the workbench there may be more than one open editor of a particular type. For instance, there may be 1 or more open Java Editors. To avoid the creation of duplicate actions and action images the editor concept has been split into two. An action contributor is responsable for the creation of actions. The editor is responsible for action implementation. Furthermore, the contributor is shared by each open editor. As a result of this design there is only 1 set of actions for 1 or more open editors.

The relationship between editor and contributor is defined by the org.eclipse.ui.editors extension point in the plugin registry. For each extension an editor class and a contributor class must be defined.

This interface should not be implemented directly. An implementation of this interface has been created in EditorActionBarContributor. Implementors should subclass this and specialize as required.

See Also:
IEditorActionBarContributor

Method Summary
 void dispose ()
          Disposes this contributor.
 void init ( IActionBars bars, IWorkbenchPage page)
          Initializes this contributor, which is expected to add contributions as required to the given action bars and global action handlers.
 void setActiveEditor ( IEditorPart targetEditor)
          Sets the active editor for the contributor.
 

Method Detail

init

void init(
IActionBars bars,
          
IWorkbenchPage page)
Initializes this contributor, which is expected to add contributions as required to the given action bars and global action handlers.

The page is passed to support the use of RetargetAction by the contributor. In this case the init method implementors should:

  • 1) set retarget actions as global action handlers
  • 2) add the retarget actions as part listeners
  • 3) get the active part and if not null call partActivated on the retarget actions

And in the dispose method the retarget actions should be removed as part listeners.

Parameters:
bars - the action bars
page - the workbench page for this contributor
Since:
2.0

setActiveEditor

void setActiveEditor(
IEditorPart targetEditor)
Sets the active editor for the contributor. Implementors should disconnect from the old editor, connect to the new editor, and update the actions to reflect the new editor.

Parameters:
targetEditor - the new editor target

dispose

void dispose()
Disposes this contributor.

Since:
2.0

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