com.ibm.lpex.alef
Class LpexContextContributor
java.lang.Object
|
+--org.eclipse.ui.part.EditorActionBarContributor
|
+--org.eclipse.ui.texteditor.BasicTextEditorActionContributor
|
+--com.ibm.lpex.alef.LpexContextContributor
- All Implemented Interfaces:
- org.eclipse.ui.IEditorActionBarContributor
- public class LpexContextContributor
- extends org.eclipse.ui.texteditor.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:
contributeToMenu
- extend to contribute to menu
contributeToToolBar
- extend to contribute to toolbar
contributeToStatusLine
- extend to contribute to status line
setActiveEditor
- extend to react to editor changes
Any extended method should also call its super.
equivalent.
Method Summary |
void |
contributeToMenu(org.eclipse.jface.action.IMenuManager menu)
Add the menus portion of this contribution. |
void |
contributeToToolBar(org.eclipse.jface.action.IToolBarManager tbm)
Add the tool bar portion of this contribution. |
void |
init(org.eclipse.ui.IActionBars bars)
Initialize our common actions, call all the contributeTo...() methods. |
void |
setActiveEditor(org.eclipse.ui.IEditorPart targetEditor)
Set the active editor for the contributor. |
Methods inherited from class org.eclipse.ui.texteditor.BasicTextEditorActionContributor |
getAction, getActiveEditorPart |
Methods inherited from class org.eclipse.ui.part.EditorActionBarContributor |
contributeToStatusLine, getActionBars |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LpexContextContributor
public LpexContextContributor()
init
public void init(org.eclipse.ui.IActionBars bars)
- Initialize our common actions, call all the contributeTo...() methods.
- Overrides:
init
in class org.eclipse.ui.part.EditorActionBarContributor
contributeToMenu
public void contributeToMenu(org.eclipse.jface.action.IMenuManager menu)
- Add the menus portion of this contribution.
- Overrides:
contributeToMenu
in class org.eclipse.ui.texteditor.BasicTextEditorActionContributor
- Parameters:
menu
- the manager that controls the menu
contributeToToolBar
public void contributeToToolBar(org.eclipse.jface.action.IToolBarManager tbm)
- Add the tool bar portion of this contribution.
- Overrides:
contributeToToolBar
in class org.eclipse.ui.part.EditorActionBarContributor
- Parameters:
tbm
- the manager that controls the workbench tool bar
setActiveEditor
public void setActiveEditor(org.eclipse.ui.IEditorPart targetEditor)
- Set 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.
- Overrides:
setActiveEditor
in class org.eclipse.ui.texteditor.BasicTextEditorActionContributor
- Parameters:
targetEditor
- the new editor target- See Also:
IEditorActionBarContributor.setActiveEditor(org.eclipse.ui.IEditorPart)