LPEX
4.4.0

com.ibm.lpex.alef
Class LpexContextContributor

java.lang.Object
  extended by BasicTextEditorActionContributor
      extended by com.ibm.lpex.alef.LpexContextContributor

public class LpexContextContributor
extends BasicTextEditorActionContributor

Basic LPEX contributions to the Eclipse context.

Solution plugins using the LPEX plugin must extend this class in order to add their own Eclipse contributions. An LPEX-based editor plugin that has no contributions of its own must still use this class (or a class extending it) as the contributorClass in its plugin.xml (the editor definition of the "org.eclipse.ui.editors" extension point) in order to have the LPEX contributions appear in the workbench.

Subclasses may extend the following methods:

Any extended method should also call its super. equivalent.


Constructor Summary
LpexContextContributor()
           
 
Method Summary
protected  void activeWindowChanged()
          Notification from LpexAbstractTextEditor that a new LPEX window in the multiwindow of our active editor's viewer has become active.
 void contributeToMenu(IMenuManager menu)
          Adds the menus portion of this contribution.
 void contributeToToolBar(IToolBarManager tbm)
          Adds the tool bar portion of this contribution.
 void dispose()
          Disposes this contributor.
 void init(IActionBars bars)
          Initializes our common actions, calls all the contributeToXxx() methods.
 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

LpexContextContributor

public LpexContextContributor()
Method Detail

activeWindowChanged

protected void activeWindowChanged()
Notification from LpexAbstractTextEditor that a new LPEX window in the multiwindow of our active editor's viewer has become active. The editor scopes and the LPEX key-binding actions registered with Eclipse for the scopes have already been updated if there was any actual change.

This method updates our own record of the active LPEX view (it being the new subject view of our listeners), and updates the accelerators for those LPEX actions that we contribute in here.


init

public void init(IActionBars bars)
Initializes our common actions, calls all the contributeToXxx() methods.


contributeToMenu

public void contributeToMenu(IMenuManager menu)
Adds the menus portion of this contribution.

Parameters:
menu - the manager that controls the menu

contributeToToolBar

public void contributeToToolBar(IToolBarManager tbm)
Adds the tool bar portion of this contribution.

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

setActiveEditor

public void setActiveEditor(IEditorPart targetEditor)
Sets the active editor for the contributor. This method disconnects from the old editor, connects to the new editor, and updates the actions to reflect the new editor.

Parameters:
targetEditor - the new editor target
See Also:
IEditorActionBarContributor

dispose

public void dispose()
Disposes this contributor.

See Also:
IEditorActionBarContributor

LPEX
4.4.0

Copyright � 2016 IBM Corp. All Rights Reserved.

Note: This documentation is for part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.