|
Re: IAction vs. EditorActionDelegate [message #167160 is a reply to message #166529] |
Sun, 06 February 2005 07:41 |
Pratik Shah Messages: 1077 Registered: July 2009 |
Senior Member |
|
|
Hmm, I had never heard of this class before. Had to look it up when I saw
this post. You should be able to use this class. If GEF is consuming the
keystrokes, you might want to take a look at what's going on. Set a
breakpoint in DomainEventDispatcher.dispatchKeyPressed(). However, you
should realize that ActionDelegates are only updated when selection changes,
and so you won't be able to update them at other incidents (such as command
stack change).
I guess the general rule is that stick with the tried and true methods
whenever you can. BTW, you can use key bindings to register actions (or
commands, it seems). That's how GEF registers Ctrl + =/- with the zoom
actions. Look at GEF plugin's plugin.xml.
"Florian Georg" <FGeorg@gmx.de> wrote in message
news:cto3sv$i09$1@www.eclipse.org...
> I'm wondering about the different roles of IActions and ActionDelegates.
> GEF Editors seem to use an ActionRegistry that contains IAction instances.
> However, I tried to add EditorActionDelegates via the corresponding
> extension point to my Editor.
>
> However, the editor seem to eat e.g. the key accelerators, so that the
> commands/ActionDelegates that are associated with the editor actions are
> never executed.
>
> Only IActions in an ActionRegistry can be attached to acceleretors - at
> least that's what I got working by now....
> Do I have to re-implement (or adapt somehow) IAction classes w.r.t. my
> editor actions ?
>
> So, what's the best practice here ? Where to use IAction vs.
> EditorActionDelegates ?
>
> I'm a bit confused about that, sorry.
>
> thanks
> Florian
|
|
|
Powered by
FUDForum. Page generated in 0.02757 seconds