F3 Action [message #200068] |
Thu, 20 October 2005 16:20 |
Eclipse User |
|
|
|
Originally posted by: ingo.koch[nospam].sap.com
Hi,
I want to implement a "Navigate into" - like functionality in my editor,
which means, if you press F3, you can navigate into the selected editpart
(opens another editor).
But
sharedKeyHandler.put(KeyStroke.getPressed(SWT.F3,0),
getActionRegistry().getAction(NavigateIntoAction.ID));
doesn
|
|
|
|
Re: F3 Action [message #200214 is a reply to message #200068] |
Fri, 21 October 2005 03:23 |
Eclipse User |
|
|
|
Originally posted by: none.us.ibm.com
FYI, F3 is defined as open selection (in another editor). Navigate->Go Into
has no assigned default keybinding.
But, to find out if the workbench is stealing the key, you could reassign
the Open Selection keybinding to anything else and see if that helps. You
could also print out the KeyEvent to see if it is what you expected. You may
be registering the wrong keystroke.
"Ingo Koch" <ingo.koch[nospam]@sap.com> wrote in message
news:dj8g4t$87i$1@news.eclipse.org...
> Hi,
>
> I want to implement a "Navigate into" - like functionality in my editor,
> which means, if you press F3, you can navigate into the selected editpart
> (opens another editor).
>
> But
>
> sharedKeyHandler.put(KeyStroke.getPressed(SWT.F3,0),
> getActionRegistry().getAction(NavigateIntoAction.ID));
>
> doesn
|
|
|
Re: F3 Action [message #200258 is a reply to message #200156] |
Fri, 21 October 2005 08:10 |
Eclipse User |
|
|
|
Originally posted by: ingo.koch[nospam].sap.com
Yes, I did, otherwise, any key would not work.
"Felix L J Mayer" <felix.mayer@objectaid.com> wrote in message
news:dj90ph$vj4$1@news.eclipse.org...
> Did you register your KeyHandler in
> GraphicalEditor#configureGraphicalViewer()?
> I have something like
> viewer.setKeyHandler( new GraphicalViewerKeyHandler(
> viewer ).setParent( sharedKeyHandler ) );
>
>
> "Ingo Koch" <ingo.koch[nospam]@sap.com> wrote in message
> news:dj8g4t$87i$1@news.eclipse.org...
> > Hi,
> >
> > I want to implement a "Navigate into" - like functionality in my editor,
> > which means, if you press F3, you can navigate into the selected
editpart
> > (opens another editor).
> >
> > But
> >
> > sharedKeyHandler.put(KeyStroke.getPressed(SWT.F3,0),
> > getActionRegistry().getAction(NavigateIntoAction.ID));
> >
> > doesn
|
|
|
Re: F3 Action resolved [message #200273 is a reply to message #200214] |
Fri, 21 October 2005 09:30 |
Eclipse User |
|
|
|
Originally posted by: ingo.koch[nospam].sap.com
Ok, two lines of code did the trick:
1. navigationAction.setAccelerator(SWT.F3);
2. getEditorSite().getActionBars().
setGlobalActionHandler("org.eclipse.jdt.ui.actions.Open",
getActionRegistry().getAction(NavigationAction.ID));
While testing, I couldn
|
|
|
Re: F3 Action resolved [message #200360 is a reply to message #200273] |
Fri, 21 October 2005 19:32 |
Eclipse User |
|
|
|
Originally posted by: none.us.ibm.com
"Ingo Koch" <ingo.koch[nospam]@sap.com> wrote in message
news:djacg6$gse$1@news.eclipse.org...
> Ok, two lines of code did the trick:
>
> 1. navigationAction.setAccelerator(SWT.F3);
> 2. getEditorSite().getActionBars().
> setGlobalActionHandler("org.eclipse.jdt.ui.actions.Open",
> getActionRegistry().getAction(NavigationAction.ID));
>
> While testing, I couldn
|
|
|
|
|
|
Re: F3 Action resolved [message #200607 is a reply to message #200565] |
Tue, 25 October 2005 16:59 |
Eclipse User |
|
|
|
Originally posted by: none.us.ibm.com
That's not the only problem. For example, you should not be setting the
accelerator explicitly. Instead, set the Command ID and let the workbench
set the appropriate accelerator, which may have been changed by the user.
"Felix L J Mayer" <felix.mayer@objectaid.com> wrote in message
news:djldvc$571$1@news.eclipse.org...
> Thanks, now I got it to work. It looks to like you did the right thing
> (except maybe for not using the constant in JdtActionConstants ;).
>
> "Ingo Koch" <ingo.koch[nospam]@sap.com> wrote in message
> news:djkrvp$8ul$1@news.eclipse.org...
|
|
|
|
Powered by
FUDForum. Page generated in 0.03028 seconds