Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » global action (registration) listener
global action (registration) listener [message #335321] Wed, 01 April 2009 10:45 Go to next message
Oelerink is currently offline OelerinkFriend
Messages: 129
Registered: July 2009
Senior Member
Hello,

i want to track every called action in an eclipse application. is it
possible to add a action listener on every action? Where is the best
point to look at? every hint could help me.

Greetings
Re: global action (registration) listener [message #335332 is a reply to message #335321] Wed, 01 April 2009 18:57 Go to previous message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

Your best bet is to use the ICommandService and
org.eclipse.ui.commands.ICommandService.addExecutionListener (IExecutionListener)

This will notify about all commands executed (command contributions and
keybindings) as well as all actions that have set their
actionDefinitionId to a matching command.

There's no similar hook in the action system, although you could
probably hack something into a display filter on SWT.Selection (but even
that's only part of the story)

PW

--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/ganymede/index.jsp?topic=/org.eclips e.platform.doc.isv/guide/workbench.htm


Previous Topic:Displsxing message of marker at caret position in status line
Next Topic:Commands and Context Menus
Goto Forum:
  


Current Time: Wed Jul 17 21:48:57 GMT 2024

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

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

Back to the top