Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Delete Action
Delete Action [message #184071] Fri, 10 June 2005 08:23 Go to next message
Eclipse UserFriend
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
Delete Action supplement [message #184367 is a reply to message #184071] Mon, 13 June 2005 10:14 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: q5280338.mailstore.fernuni-hagen.de

Maybe the problem is to find the right EditPolicy? I've studied the flow
example and I think the EditPoliy responsible for enabling a Delete
Action must subclass the ComponentEditPolicy? I've done all this but it
don't works?

regards
Klaus
Re: Delete Action supplement [message #184511 is a reply to message #184367] Tue, 14 June 2005 10:46 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: alex.massi.xxxxxxxxxx.com

give a look here I solved this way:

http://dev.eclipse.org/newslists/news.eclipse.platform/msg29 053.html

bye
Alex
Re: Delete Action supplement [message #184591 is a reply to message #184511] Tue, 14 June 2005 18:33 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: q5280338.mailstore.fernuni-hagen.de

Alex wrote:
> give a look here I solved this way:
>
> http://dev.eclipse.org/newslists/news.eclipse.platform/msg29 053.html
>
> bye
> Alex
>
Thanks for the hint. I made it that way and it works fine with EVRYTHING
like UNDO, REDO, PRINT... but doesn't with DELETE?

I found that the List returning by "getSelectionActions()" contains
"delete" (so in principle DELETE must be possible) but the DELETE-Action
isn't enabled...

I think there must be some trouble with my EditPolicies...

Klaus
YEAH! SOLVED TOO! [message #184768 is a reply to message #184511] Thu, 16 June 2005 18:13 Go to previous message
Eclipse UserFriend
Originally posted by: q5280338.mailstore.fernuni-hagen.de

Alex wrote:
> give a look here I solved this way:
>
> http://dev.eclipse.org/newslists/news.eclipse.platform/msg29 053.html
>
> bye
> Alex
>

Now I solved too this way. Took a lot of time...

Thanx
Previous Topic:Drag & Drop Feedback
Next Topic:Feedback layer whacky with ScrollingGraphicalViewer
Goto Forum:
  


Current Time: Sat Apr 27 05:05:15 GMT 2024

Powered by FUDForum. Page generated in 0.03221 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top