Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » F2 key problem!!!
F2 key problem!!! [message #188971] Mon, 25 July 2005 09:40 Go to next message
Eclipse UserFriend
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 Go to previous messageGo to next message
Eclipse UserFriend
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 Go to previous messageGo to next message
Eclipse UserFriend
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 Go to previous messageGo to next message
Eclipse UserFriend
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 Go to previous messageGo to next message
Eclipse UserFriend
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 Go to previous messageGo to next message
Eclipse UserFriend
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.
>
>
>
>
>
Re: F2 key problem!!! [message #190978 is a reply to message #190699] Mon, 08 August 2005 09:03 Go to previous message
Eclipse UserFriend
Originally posted by: gautamn.iitk.ac.in

Now its working fine ....i not entered directedit it in create actions
method...
thanx
Nitin.
Previous Topic:Grid without ScalableFreeformRootEditPart
Next Topic:How to expend the tree in GEF TreeViewer
Goto Forum:
  


Current Time: Thu Dec 26 16:56:02 GMT 2024

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

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

Back to the top