Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Enable delete on figures in GEF
Enable delete on figures in GEF [message #57464] Thu, 23 January 2003 00:53 Go to next message
Alex Cozzi is currently offline Alex CozziFriend
Messages: 27
Registered: July 2009
Junior Member
I am trying to enable the "DEL" key to delete the selected figure in a
GEF application. I have looked the logic example but I was not able to
figure it out.

I have installed a COMPONENT_ROLE edit policy that provides the delete
command, and I also added the delete key in the keyHandler in the editor
as in the logic example, but the delete in the edit menu stays
deactivated and the del key does nothing. No requests or getCommand get
called on my EditPart.

I am probably a little confused and I can't figure out what the magic is
in Logic that makes the menu be activated.

PS: GEF is great. Thanks!
Re: Enable delete on figures in GEF [message #57920 is a reply to message #57464] Fri, 24 January 2003 20:18 Go to previous message
Alex Cozzi is currently offline Alex CozziFriend
Messages: 27
Registered: July 2009
Junior Member
Alex Cozzi wrote:
> I am trying to enable the "DEL" key to delete the selected figure in a
> GEF application. I have looked the logic example but I was not able to
> figure it out.
>
> I have installed a COMPONENT_ROLE edit policy that provides the delete
> command, and I also added the delete key in the keyHandler in the editor
> as in the logic example, but the delete in the edit menu stays
> deactivated and the del key does nothing. No requests or getCommand get
> called on my EditPart.
>
> I am probably a little confused and I can't figure out what the magic is
> in Logic that makes the menu be activated.
>
> PS: GEF is great. Thanks!
>

I found out the problem: I was overriding init in GraphicalEditor
without calling the super.init() method. This failed to register the
proper hooks with the editor. The examples on wiky web also do this. I
thik they should be corrected.
Previous Topic:GEF example I20030121
Next Topic:LightweightSystem in SWT
Goto Forum:
  


Current Time: Wed Jul 17 09:48:01 GMT 2024

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

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

Back to the top