F2 key problem!!! [message #188971] |
Mon, 25 July 2005 09:40 |
Eclipse User |
|
|
|
Originally posted by: gautamn.iitk.ac.in
Hi,
my direct edit is working fine when I double click a figure but when I
press F2 key CellEditLocator doesn't appears. I have put all the necessary
code.What do to??
Regards,
Nitin.
|
|
|
Re: F2 key problem!!! [message #189008 is a reply to message #188971] |
Mon, 25 July 2005 15:12 |
Eclipse User |
|
|
|
Originally posted by: none.unknown.com
I suppose you have a GraphicalViewerKeyHandler that handles that keystroke.
Set a breakpoint in its keyPressed() method to see why it's not being
handled properly.
"Nitin Gautam" <gautamn@iitk.ac.in> wrote in message
news:5a91bd9ba269a17e43f715b81dc1dc9d$1@www.eclipse.org...
>
> Hi,
> my direct edit is working fine when I double click a figure but when I
> press F2 key CellEditLocator doesn't appears. I have put all the necessary
> code.What do to??
> Regards,
> Nitin.
>
>
|
|
|
Re: F2 key problem!!! [message #190312 is a reply to message #189008] |
Wed, 03 August 2005 10:44 |
Eclipse User |
|
|
|
Originally posted by: gautamn.iitk.ac.in
While I debugged my code using Sys.out.println I found that no event is
generated when I pressed F2 key..What to do???
Regards,
Nitin.
|
|
|
Re: F2 key problem!!! [message #190391 is a reply to message #190312] |
Wed, 03 August 2005 18:00 |
Eclipse User |
|
|
|
Originally posted by: none.unknown.com
That's not possible; you're most likely doing something wrong. Are you
using the GraphicalViewerKeyHandler and adding a KeyStroke to it for
handling F2?
"Nitin Gautam" <gautamn@iitk.ac.in> wrote in message
news:c2648f50057846bbee223543e7437a73$1@www.eclipse.org...
>
>
> While I debugged my code using Sys.out.println I found that no event is
> generated when I pressed F2 key..What to do???
> Regards,
> Nitin.
>
|
|
|
Re: F2 key problem!!! [message #190481 is a reply to message #190391] |
Thu, 04 August 2005 05:11 |
Eclipse User |
|
|
|
Originally posted by: gautamn.iitk.ac.in
Yes I am ....In configure viewer method .... I worte the following code
/*********************************************************** ****************/
ScrollingGraphicalViewer
viewer=(ScrollingGraphicalViewer)getGraphicalViewer();
viewer.setKeyHandler(new
GraphicalViewerKeyHandler(viewer).setParent(getCommonKeyHand ler()));
/*********************************************************** ***************/
and the following method for enabling F2 key...
/*********************************************************** ***************/
protected KeyHandler getCommonKeyHandler() {
if (sharedKeyHandler == null){
System.out.println("In shared ky hander");
sharedKeyHandler = new KeyHandler();
sharedKeyHandler.put(
KeyStroke.getPressed(SWT.F2, 0),
getActionRegistry().getAction (GEFActionConstants.DIRECT_EDIT));
}
return sharedKeyHandler;
}
/*********************************************************** *************/
I want to catch events fired when I press some key.I do not know what to
do in this situation. Kindly, suggest something...
Regards,
Nitin Gautam.
|
|
|
Re: F2 key problem!!! [message #190699 is a reply to message #190481] |
Fri, 05 August 2005 16:09 |
Eclipse User |
|
|
|
Originally posted by: none.unknown.com
You're saying keyPressed() is never called in the key handler? Set a
breakpoint in that method. If it's not getting called set a breakpoint in
DomainEventDispatcher#dispatchMousePressed() and step into the code to see
why it doesn't get to the key handler. Compare it to the execution in the
logic example to see how it's supposed to work.
"Nitin Gautam" <gautamn@iitk.ac.in> wrote in message
news:ef0549dfc05a91a417af8c45a782829c$1@www.eclipse.org...
>
> Yes I am ....In configure viewer method .... I worte the following code
>
>
/*********************************************************** ****************
/
> ScrollingGraphicalViewer
> viewer=(ScrollingGraphicalViewer)getGraphicalViewer();
>
> viewer.setKeyHandler(new
> GraphicalViewerKeyHandler(viewer).setParent(getCommonKeyHand ler()));
>
>
/*********************************************************** ***************/
> and the following method for enabling F2 key...
>
>
/*********************************************************** ***************/
> protected KeyHandler getCommonKeyHandler() {
>
> if (sharedKeyHandler == null){
> System.out.println("In shared ky hander");
> sharedKeyHandler = new KeyHandler();
> sharedKeyHandler.put(
> KeyStroke.getPressed(SWT.F2, 0),
> getActionRegistry().getAction (GEFActionConstants.DIRECT_EDIT));
> }
> return sharedKeyHandler;
> }
>
> /*********************************************************** *************/
>
> I want to catch events fired when I press some key.I do not know what to
> do in this situation. Kindly, suggest something...
> Regards,
> Nitin Gautam.
>
>
>
>
>
|
|
|
|
Powered by
FUDForum. Page generated in 0.04381 seconds