|
|
Re: Convert accelerator to KeyStroke? [message #203337 is a reply to message #203315] |
Mon, 21 November 2005 18:59 |
Eclipse User |
|
|
|
Originally posted by: none.unknown.com
SelectAll works fine in the logic example. Are you declaring it as a global
action key in the ActionBarContributor?
"Felix L J Mayer" <felix.mayer@objectaid.com> wrote in message
news:dlsurc$ooa$1@news.eclipse.org...
> "Felix L J Mayer" <felix.mayer@objectaid.com> wrote in message
> news:dlsqvh$iut$1@news.eclipse.org...
> >I am using several retarget actions. I am setting the
> >commandId/definitionId on them, and their accelerators show properly in
the
> >context menu. But I still need to set the
> > accelerator in the KeyHandler in order for the keys to actually trigger
an
> > action. Is this supposed
> > to work automatically or should I get the accelerator from the action
and
> > put the appropriate KeyStroke with the action into the KeyHandler? In
the
> > latter case, is there a simple way to convert the accelerator into a
> > KeyStroke?
> >
>
> Let me clarify this a little. For several actions, the accelerators work
> fine, and I don't have to tell the KeyHandler about them (undo, redo,
> delete). But for selectAll and some others I have to put into the
KeyHandler
> with a KeyStroke, which means that the accelerator is hardcoded. So I am
not
> sure if I am missing something with the action or if I need convert the
> accelerator into a KeyStroke.
>
>
|
|
|
Re: Convert accelerator to KeyStroke? [message #203417 is a reply to message #203337] |
Mon, 21 November 2005 23:45 |
Felix L J Mayer Messages: 202 Registered: July 2009 |
Senior Member |
|
|
Thanks, with that I got selectAll to work.
Then I did the same thing for 'Open' and 'Open Type Hierarchy', but F3 and
F4 don't work. I created RetargetActions with ids JdtActionConstants.OPEN
and JdtActionConstants.OPEN_TYPE_HIERARCHY, and I set the definitionIds to
IJavaEditorActionDefinitionIds.OPEN_EDITOR and
IJavaEditorActionDefinitionIds.OPEN_TYPE_HIERARCHY on my actions. So
basically I did the same thing as with selectAll, but it doesn't work.
"Pratik Shah" <none@unknown.com> wrote in message
news:dlt5dr$36l$1@news.eclipse.org...
> SelectAll works fine in the logic example. Are you declaring it as a
> global
> action key in the ActionBarContributor?
>
> "Felix L J Mayer" <felix.mayer@objectaid.com> wrote in message
> news:dlsurc$ooa$1@news.eclipse.org...
>> "Felix L J Mayer" <felix.mayer@objectaid.com> wrote in message
>> news:dlsqvh$iut$1@news.eclipse.org...
>> >I am using several retarget actions. I am setting the
>> >commandId/definitionId on them, and their accelerators show properly in
> the
>> >context menu. But I still need to set the
>> > accelerator in the KeyHandler in order for the keys to actually trigger
> an
>> > action. Is this supposed
>> > to work automatically or should I get the accelerator from the action
> and
>> > put the appropriate KeyStroke with the action into the KeyHandler? In
> the
>> > latter case, is there a simple way to convert the accelerator into a
>> > KeyStroke?
>> >
>>
>> Let me clarify this a little. For several actions, the accelerators work
>> fine, and I don't have to tell the KeyHandler about them (undo, redo,
>> delete). But for selectAll and some others I have to put into the
> KeyHandler
>> with a KeyStroke, which means that the accelerator is hardcoded. So I am
> not
>> sure if I am missing something with the action or if I need convert the
>> accelerator into a KeyStroke.
>>
>>
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.03595 seconds