Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » Tracking every action in eclipse
Tracking every action in eclipse [message #335250] Fri, 27 March 2009 13:36 Go to next message
Eclipse UserFriend
Hello,

i want to create an action trace. This trace should fetch every user
action. I tried it with event filter such like this:

Display display = Display.getDefault();
display.addFilter(SWT.MouseDown, new EventListener("MouseDown Event"));

But these listeners dont give me the corresponding plugin, i get only
the mouse down information wihtout the consequence. Can you give me a
hint? I would be very glad about some help.

Greetings
Re: Tracking every action in eclipse [message #335260 is a reply to message #335250] Fri, 27 March 2009 18:39 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: n.n.nnn

On Fri, 27 Mar 2009 18:36:53 +0100, Jörg wrote:

> Hello,
>
> i want to create an action trace. This trace should fetch every user
> action. I tried it with event filter such like this:
>
> Display display = Display.getDefault(); display.addFilter(SWT.MouseDown,
> new EventListener("MouseDown Event"));
>
> But these listeners dont give me the corresponding plugin, i get only
> the mouse down information wihtout the consequence. Can you give me a
> hint? I would be very glad about some help.
>
> Greetings

Try implementing a base action class extending from

org.eclipse.jface.action.Action

and from there override one or more of the Action class
methods in the base to hook into the workbench. Finally
do the actual work of the action:

private Action traceMeAction;

traceMeAction = new ActionTracer("Trace Me") {
@Override
public void run() {
// trace this
super.run();

// now do the actual action work
// TODO
}
};
register(traceMeAction);

in ApplicationActionBarAdvisor().

--
// This is my opinion.
Re: Tracking every action in eclipse [message #335264 is a reply to message #335250] Sat, 28 March 2009 12:15 Go to previous messageGo to next message
Eclipse UserFriend
You can trace the commands by registering a command listener, but not sure
whether you can do that for actions.
http://blog.eclipse-tips.com/2009/01/commands-part-4-misc-it ems.html

- Prakash
--
http://blog.eclipse-tips.com
Re: Tracking every action in eclipse [message #335265 is a reply to message #335260] Sat, 28 March 2009 14:49 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: n.n.nnn

On Fri, 27 Mar 2009 22:39:12 +0000, jebblue wrote:

> private Action traceMeAction;
>
> traceMeAction = new ActionTracer("Trace Me") {
> @Override
> public void run() {
> // trace this
> super.run();
>
> // now do the actual action work
> // TODO
> }
> };
> register(traceMeAction);

PS Take out that register, throws an exception, works without it.

--
// This is my opinion.
Re: Tracking every action in eclipse [message #335294 is a reply to message #335265] Tue, 31 March 2009 06:49 Go to previous messageGo to next message
Eclipse UserFriend
Thanks for your reply, but this helps only by my own created actions.
Ist it possible to initialize a general actionlistner, which catches
every action in eclipse?

jebblue schrieb:
> On Fri, 27 Mar 2009 22:39:12 +0000, jebblue wrote:
>
>> private Action traceMeAction;
>>
>> traceMeAction = new ActionTracer("Trace Me") {
>> @Override
>> public void run() {
>> // trace this
>> super.run();
>>
>> // now do the actual action work
>> // TODO
>> }
>> };
>> register(traceMeAction);
>
> PS Take out that register, throws an exception, works without it.
>
Re: Tracking every action in eclipse [message #335295 is a reply to message #335264] Tue, 31 March 2009 07:04 Go to previous messageGo to next message
Eclipse UserFriend
Thanks this helped a little bit. actually the commands are only triggert
when a file is be deleted.

Prakash G.R. schrieb:
> You can trace the commands by registering a command listener, but not sure
> whether you can do that for actions.
> http://blog.eclipse-tips.com/2009/01/commands-part-4-misc-it ems.html
>
> - Prakash
Re: Tracking every action in eclipse [message #335315 is a reply to message #335294] Tue, 31 March 2009 17:24 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: n.n.nnn

On Tue, 31 Mar 2009 12:49:18 +0200, Jörg wrote:

> Thanks for your reply, but this helps only by my own created actions.
> Ist it possible to initialize a general actionlistner, which catches
> every action in eclipse?
>

I see your point, perhaps someone reading this thread is aware of the
best solution. Good luck!

--
// This is my opinion.
Re: Tracking every action in eclipse [message #335323 is a reply to message #335315] Wed, 01 April 2009 08:54 Go to previous message
Eclipse UserFriend
hi,

You might want to have a look on the Usage Data Collector component as that's what it's exactly doing AFAIK.

Cédric

jebblue wrote:

> On Tue, 31 Mar 2009 12:49:18 +0200, Jörg wrote:
>
>> Thanks for your reply, but this helps only by my own created actions.
>> Ist it possible to initialize a general actionlistner, which catches
>> every action in eclipse?
>>
>
> I see your point, perhaps someone reading this thread is aware of the
> best solution. Good luck!
>
Previous Topic:Debugging products without including extra plugins?
Next Topic:Team logical model
Goto Forum:
  


Current Time: Fri May 02 05:10:10 EDT 2025

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

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

Back to the top