F2 key not working!!! [message #186051] |
Fri, 01 July 2005 04:53  |
Eclipse User |
|
|
|
Originally posted by: gautamn.iitk.ac.in
I enabled my keyboard for editing GEF figures using following code:
/*********************************************************** ****************/
protected KeyHandler getCommonKeyHandler(){
KeyHandler sharedKeyHandler = new KeyHandler();
sharedKeyHandler.put(KeyStroke.getPressed(SWT.DEL, 127, 0),
getActionRegistry().getAction(
GEFActionConstants.DELETE));
sharedKeyHandler.put(KeyStroke.getPressed(SWT.F2, 0),
getActionRegistry().getAction(
GEFActionConstants.DIRECT_EDIT));
return sharedKeyHandler;
}
/*********************************************************** ****************/
the delete key is working fine but F2 is working for direct editing....Can
anyone suggest something.
Regards,
Nitin.
|
|
|
|
|
Re: F2 key not working!!! [message #186152 is a reply to message #186144] |
Sat, 02 July 2005 07:29  |
Eclipse User |
|
|
|
Nitin Gautam schrieb am 02.07.2005 07:12:
> i have already put that in the code..but still it is not working...can
> you suggest something different.
> regards,
> Nitin.
>
Did you create and installed a DirectEditPolicy on the targeted Editpart?
Did you overwrote the performRequest()-Method of the targeted Editpart
and respond to a DirectEdit-Request?
Did you implement a DirectEditManger?
Did you implement a DirectEditCellLocator?
Did you impement a DirectEdit-Command and return it for the
DirectEdit-Request?
You see, you have a lot of stuff to do, to make an EditPart
directeditable (and I'm quite sure, that I forgot a step ;-) ).
Search for a post in this newsgroup. The title is "old thread: direct
edit tutorial/examples? (Andreas Holtz recommends good incremental GEF
tutorial)".
There you will find a small example where you can see, how DirectEdit is
implemented (without the functionality of a bigger example).
I hope this time I could help more :-)
Andreas
|
|
|
Powered by
FUDForum. Page generated in 0.04635 seconds