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 GEF
3.3

org.eclipse.gef.ui.actions
Class ActionBarContributor

java.lang.Object
  extended by

org.eclipse.ui.part.EditorActionBarContributor
      extended by
org.eclipse.gef.ui.actions.ActionBarContributor
All Implemented Interfaces:
IEditorActionBarContributor

public abstract class ActionBarContributor
extends EditorActionBarContributor

Contributes actions to the workbench. !!Warning: This class is subject to change.


Constructor Summary
ActionBarContributor ()
           
 
Method Summary
protected  void addAction ( IAction action)
          Adds the given action to the action registry.
protected  void addGlobalActionKey (java.lang.String key)
          Indicates the existence of a global action identified by the specified key.
protected  void addRetargetAction ( RetargetAction action)
          Adds the specified RetargetAction to this contributors ActionRegistry.
protected abstract  void buildActions ()
          Creates and initializes Actions managed by this contributor.
protected abstract  void declareGlobalActionKeys ()
          Subclasses must implement to declare additional global actions IDs.
 void dispose ()
          Disposes the contributor.
protected   IAction getAction (java.lang.String id)
          Retrieves an action from the action registry using the given ID.
protected   ActionRegistry getActionRegistry ()
          returns this contributor's ActionRegsitry.
 void init ( IActionBars bars)
           
 void setActiveEditor ( IEditorPart editor)
           
 
Methods inherited from class org.eclipse.ui.part. EditorActionBarContributor
contributeToCoolBar, contributeToMenu, contributeToStatusLine, contributeToToolBar, getActionBars, getPage, init
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ActionBarContributor

public ActionBarContributor()
Method Detail

addAction

protected void addAction(
IAction action)
Adds the given action to the action registry.

Parameters:
action - the action to add

addGlobalActionKey

protected void addGlobalActionKey(java.lang.String key)
Indicates the existence of a global action identified by the specified key. This global action is defined outside the scope of this contributor, such as the Workbench's undo action, or an action provided by a workbench ActionSet. The list of global action keys is used whenever the active editor is changed ( setActiveEditor(IEditorPart)). Keys provided here will result in corresponding actions being obtained from the active editor's ActionRegistry, and those actions will be registered with the ActionBars for this contributor. The editor's action handler and the global action must have the same key.

Parameters:
key - the key identifying the global action

addRetargetAction

protected void addRetargetAction(
RetargetAction action)
Adds the specified RetargetAction to this contributors ActionRegistry. The RetargetAction is also added as a IPartListener of the contributor's page. Also, the retarget action's ID is flagged as a global action key, by calling addGlobalActionKey(String).

Parameters:
action - the retarget action being added

buildActions

protected abstract void buildActions()
Creates and initializes Actions managed by this contributor.


declareGlobalActionKeys

protected abstract void declareGlobalActionKeys()
Subclasses must implement to declare additional global actions IDs. Only IDs which were not already added directly or indirectly using addGlobalActionKey(String) need to be added.

See Also:
addGlobalActionKey(String)

dispose

public void dispose()
Disposes the contributor. Removes all RetargetActions that were IPartListeners on the IWorkbenchPage and disposes them. Also disposes the action registry.

Subclasses may extend this method to perform additional cleanup.

See Also:
EditorActionBarContributor.dispose()

getAction

protected 
IAction getAction(java.lang.String id)
Retrieves an action from the action registry using the given ID.

Parameters:
id - the ID of the sought action
Returns:
null or the action if found

getActionRegistry

protected 
ActionRegistry getActionRegistry()
returns this contributor's ActionRegsitry.

Returns:
the ActionRegistry

init

public void init(
IActionBars bars)
See Also:
EditorActionBarContributor.init(IActionBars)

setActiveEditor

public void setActiveEditor(
IEditorPart editor)
See Also:
IEditorActionBarContributor.setActiveEditor(IEditorPart)

Eclipse GEF
3.3

Copyright (c) IBM Corp. and others 2000, 2007. All Rights Reserved.

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