Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Capturing Eclipse actions
Capturing Eclipse actions [message #308893] Sun, 08 October 2006 17:15 Go to next message
Eclipse UserFriend
Originally posted by: zurowska_kar.poczta.onet.pl

Hello,

I would like to write a plugin that counts number of invoked actions: by
selecting key shortcuts and by selecting menu item (from menu bar, popup
menus and by selecting icon in toolbar). I know that I can listen to
invoked command by adding ExecuctionListener to all commands. Can I do
something like this to actions invoked by selecting menu items or toolbar
items?

Thanks for help.
Re: Capturing Eclipse actions [message #308913 is a reply to message #308893] Tue, 10 October 2006 00:03 Go to previous messageGo to next message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

Karolina wrote:
> Hello,
>
> I would like to write a plugin that counts number of invoked actions: by
> selecting key shortcuts and by selecting menu item (from menu bar, popup
> menus and by selecting icon in toolbar). I know that I can listen to
> invoked command by adding ExecuctionListener to all commands. Can I do
> something like this to actions invoked by selecting menu items or
> toolbar items?


Like you noticed, you can add an IExecutionListener to the
ICommandService to be notified about command execution.

For menus (etc) you can't capture those in 3.1 or 3.2 (without somehow
digging down to low-level SWT events). A more Command oriented approach
will be available in 3.3.

Later,
PW


Re: Capturing Eclipse actions [message #309026 is a reply to message #308913] Fri, 13 October 2006 21:18 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: Xavier.Decoret.imag.fr

Paul Webster a écrit :
> Karolina wrote:
>> Hello,
>>
>> I would like to write a plugin that counts number of invoked actions:
>> by selecting key shortcuts and by selecting menu item (from menu bar,
>> popup menus and by selecting icon in toolbar). I know that I can
>> listen to invoked command by adding ExecuctionListener to all
>> commands. Can I do something like this to actions invoked by selecting
>> menu items or toolbar items?
>
>
> Like you noticed, you can add an IExecutionListener to the
> ICommandService to be notified about command execution.
>
> For menus (etc) you can't capture those in 3.1 or 3.2 (without somehow
> digging down to low-level SWT events). A more Command oriented approach
> will be available in 3.3.


Does this mean that it will be possible to do Eclipse-level macros, much
in the style of Emacs. It is the feature I am missing the most from
Eclipse. Actually, I use Eclipse to develop but often open up an Emacs
when I need to do "similar" editing on many lines (recording a macro and
replaying it is so comfortable for that).

But maybe I just have'nt found the good plugin to do this in Eclipse. I
once understood it was not possible...

>
> Later,
> PW
Re: Capturing Eclipse actions [message #309042 is a reply to message #309026] Sat, 14 October 2006 19:17 Go to previous message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

Xavier Décoret wrote:
>
>
> Does this mean that it will be possible to do Eclipse-level macros, much
> in the style of Emacs. It is the feature I am missing the most from
> Eclipse. Actually, I use Eclipse to develop but often open up an Emacs
> when I need to do "similar" editing on many lines (recording a macro and
> replaying it is so comfortable for that).

It will be possible to run a sequence of commands over again.

So while it would be possible to run a macro like "Format, then Save"
you would not be able to capture things like "find the next 'void test'
and then select the next 7 lines". At least, not easily.

Later,
PW


Previous Topic:Use fragment to patch a plug-in with MANIFEST.MF
Next Topic:Section Forms bug ?
Goto Forum:
  


Current Time: Sat Jul 27 16:16:10 GMT 2024

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

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

Back to the top