Delete Action [message #184071] |
Fri, 10 June 2005 04:23  |
Eclipse User |
|
|
|
Originally posted by: q5280338.mailstore.fernuni-hagen.de
I write a editor using a MultiPageEditorPart with different pages, which
are containing editors subclassing the GraphicalEditorWithPalette. I
register some global Actions in the MultiPageEditorContributor like this:
public void setActivePage(IEditorPart part) {
if (activeEditorPart == part)
return;
activeEditorPart = part;
IActionBars bars = this.getActionBars();
if (bars != null && part instanceof MyGraphicalEditorWithPalette) {
bars.setGlobalActionHandler(ActionFactory.UNDO.getId(),
((MyGraphicalEditorWithPalette) part)
.getAction(ActionFactory.UNDO.getId()));
bars.setGlobalActionHandler(ActionFactory.REDO.getId(),
((MyGraphicalEditorWithPalette) part)
.getAction(ActionFactory.REDO.getId()));
bars.setGlobalActionHandler(ActionFactory.DELETE.getId(),
((MyGraphicalEditorWithPalette) part)
.getAction(ActionFactory.DELETE.getId()));
bars.updateActionBars();
}
}
MyGraphicalEditorWithPalette contains a method getAction() which returns
"getActionRegistry().getAction(key)"
It works fine with UNDO and REDO. But I can't select and execute a
DELETE-Action e.g. for a children EditPart of the contents EditPart.
Thanks
Klaus
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.05509 seconds