|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.ui.part.EditorActionBarContributor
org.eclipse.ui.part.MultiPageEditorActionBarContributor
org.eclipse.emf.edit.ui.action.EditingDomainActionBarContributor
public class EditingDomainActionBarContributor
This is a contributor for an editor, multi-page or otherwise,
that implements IEditingDomainProvider
.
It automatically hooks up the Undo, Redo, Cut, Copy, Paste, and Delete actions on the Edit menu
to the corresponding commands supported by the EditingDomain
.
The editor site'selection provider is used to keep the Cut, Copy, Paste, and Delete actions up-to-date.
The actions are also refreshed every time the editor fires to its IPropertyListener
s.
Another very useful feature of this contributor is that it can be used as follows:
((IMenuListener)((IEditorSite)getSite()).getActionBarContributor()).menuAboutToShow(menuManager);to contribute the Edit menu actions to a pop-up menu.
Field Summary | |
---|---|
protected IEditorPart |
activeEditor
This keeps track of the current editor part. |
static int |
ADDITIONS_LAST_STYLE
This style bit indicates that the "additions" separator should come after the "edit" separator. |
protected ControlAction |
controlAction
This is the action used to control or uncontrol a contained object. |
protected CopyAction |
copyAction
This is the action used to implement copy. |
protected CutAction |
cutAction
This is the action used to implement cut. |
protected DeleteAction |
deleteAction
This is the action used to implement delete. |
protected LoadResourceAction |
loadResourceAction
This is the action used to load a resource. |
protected PasteAction |
pasteAction
This is the action used to implement paste. |
protected RedoAction |
redoAction
This is the action used to implement redo. |
protected int |
style
This is used to encode the style bits. |
protected UndoAction |
undoAction
This is the action used to implement undo. |
protected ValidateAction |
validateAction
This is the action used to perform validation. |
Constructor Summary | |
---|---|
EditingDomainActionBarContributor()
This creates an instance of the contributor. |
|
EditingDomainActionBarContributor(int style)
This creates an instance of the contributor. |
Method Summary | |
---|---|
void |
activate()
|
protected void |
addGlobalActions(IMenuManager menuManager)
This inserts global actions before the "additions-end" separator. |
void |
contributeToMenu(IMenuManager menuManager)
|
void |
contributeToStatusLine(IStatusLineManager statusLineManager)
|
void |
contributeToToolBar(IToolBarManager toolBarManager)
|
protected CopyAction |
createCopyAction()
Returns the action used to implement copy. |
protected CutAction |
createCutAction()
Returns the action used to implement cut. |
protected DeleteAction |
createDeleteAction()
Returns the action used to implement delete. |
protected PasteAction |
createPasteAction()
Returns the action used to implement paste. |
protected RedoAction |
createRedoAction()
Returns the action used to implement redo. |
protected UndoAction |
createUndoAction()
Returns the action used to implement undo. |
void |
deactivate()
|
IEditorPart |
getActiveEditor()
|
void |
init(IActionBars actionBars)
|
void |
menuAboutToShow(IMenuManager menuManager)
This implements IMenuListener to help fill the context menus with contributions from the Edit menu. |
void |
propertyChanged(java.lang.Object source,
int id)
|
protected boolean |
removeAllReferencesOnDelete()
This determines whether or not the delete action should clean up all references to the deleted objects. |
void |
setActiveEditor(IEditorPart part)
|
void |
setActivePage(IEditorPart part)
|
void |
setActiveView(IViewPart part)
Deprecated. |
void |
shareGlobalActions(IPage page,
IActionBars actionBars)
|
void |
update()
|
Methods inherited from class org.eclipse.ui.part.EditorActionBarContributor |
---|
contributeToCoolBar, dispose, getActionBars, getPage, init |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected IEditorPart activeEditor
protected DeleteAction deleteAction
protected CutAction cutAction
protected CopyAction copyAction
protected PasteAction pasteAction
protected UndoAction undoAction
protected RedoAction redoAction
protected LoadResourceAction loadResourceAction
protected ControlAction controlAction
protected ValidateAction validateAction
public static final int ADDITIONS_LAST_STYLE
protected int style
Constructor Detail |
---|
public EditingDomainActionBarContributor()
public EditingDomainActionBarContributor(int style)
Method Detail |
---|
public void init(IActionBars actionBars)
init
in class EditorActionBarContributor
protected DeleteAction createDeleteAction()
deleteAction
protected CutAction createCutAction()
cutAction
protected CopyAction createCopyAction()
copyAction
protected PasteAction createPasteAction()
pasteAction
protected UndoAction createUndoAction()
undoAction
protected RedoAction createRedoAction()
redoAction
protected boolean removeAllReferencesOnDelete()
public void contributeToMenu(IMenuManager menuManager)
contributeToMenu
in class EditorActionBarContributor
public void contributeToStatusLine(IStatusLineManager statusLineManager)
contributeToStatusLine
in class EditorActionBarContributor
public void contributeToToolBar(IToolBarManager toolBarManager)
contributeToToolBar
in class EditorActionBarContributor
public void shareGlobalActions(IPage page, IActionBars actionBars)
@Deprecated public void setActiveView(IViewPart part)
public IEditorPart getActiveEditor()
public void setActiveEditor(IEditorPart part)
setActiveEditor
in interface IEditorActionBarContributor
setActiveEditor
in class MultiPageEditorActionBarContributor
public void setActivePage(IEditorPart part)
setActivePage
in class MultiPageEditorActionBarContributor
public void deactivate()
public void activate()
public void update()
public void menuAboutToShow(IMenuManager menuManager)
IMenuListener
to help fill the context menus with contributions from the Edit menu.
menuAboutToShow
in interface IMenuListener
protected void addGlobalActions(IMenuManager menuManager)
public void propertyChanged(java.lang.Object source, int id)
propertyChanged
in interface IPropertyListener
|
Copyright 2001-2006 IBM Corporation and others. All Rights Reserved. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |