Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Command.execute will not be called
Command.execute will not be called [message #155309] Sat, 23 October 2004 21:15 Go to next message
Andreas Herz is currently offline Andreas HerzFriend
Messages: 196
Registered: July 2009
Senior Member
Hi,

I have installed the key handler for the DEL Command of an EditPArt in GEF...
.....the delete of objects has be worked fine - but after some code changes the
MyDeleteCommand.execute() will not be called!!


If I select an EditPart (Figure) in the GEF the "call history" of my programm
looks like:

(the root edit part) 1. > FormElementEditPart.getDragTracker

(my edit policy) 2. > ComponentEditPolicyForwardDelete.getDeleteCommand
3. > GroupComponentEditPolicy.createDeleteCommand
4. > ComponentEditPolicyForwardDelete.getParentDeleteCommand
5. > XYLayoutEditPolicyFormImpl.getDeleteDependantCommand
(delete of the slec. object)6. > DeleteGroupCommand.DeleteGroupCommand
7. > XYLayoutEditPolicyGroupImpl.getDeleteDependantCommand

8. > DeleteGroupCommand.DeleteGroupCommand

I can see, that the right delete command has been created.
But the execute method will not be called if i press the DEL
key.


Greetings

Andreas
Re: Command.execute will not be called [message #155778 is a reply to message #155309] Tue, 26 October 2004 21:19 Go to previous message
Pratik Shah is currently offline Pratik ShahFriend
Messages: 1077
Registered: July 2009
Senior Member
If you have a global DeleteAction registered, you don't need the KeyHandler
to do this.

Regarding this problem, does the CompoundCommand's canExecute() method
return true?


"FreeGroup" <a.herz@FreeGroup.de> wrote in message
news:cleh46$adj$1@eclipse.org...
> Hi,
>
> I have installed the key handler for the DEL Command of an EditPArt in
GEF...
> ....the delete of objects has be worked fine - but after some code changes
the
> MyDeleteCommand.execute() will not be called!!
>
>
> If I select an EditPart (Figure) in the GEF the "call history" of my
programm
> looks like:
>
> (the root edit part) 1. > FormElementEditPart.getDragTracker
>
> (my edit policy) 2. >
ComponentEditPolicyForwardDelete.getDeleteCommand
> 3. >
GroupComponentEditPolicy.createDeleteCommand
> 4. >
ComponentEditPolicyForwardDelete.getParentDeleteCommand
> 5. >
XYLayoutEditPolicyFormImpl.getDeleteDependantCommand
> (delete of the slec. object)6. > DeleteGroupCommand.DeleteGroupCommand
> 7. >
XYLayoutEditPolicyGroupImpl.getDeleteDependantCommand
>
> 8. > DeleteGroupCommand.DeleteGroupCommand
>
> I can see, that the right delete command has been created.
> But the execute method will not be called if i press the DEL
> key.
>
>
> Greetings
>
> Andreas
>
Previous Topic:Connection behind node
Next Topic:A Question Regarding UpdateManager
Goto Forum:
  


Current Time: Thu Jan 16 03:13:47 GMT 2025

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

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

Back to the top