Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Tracking every action in eclipse
Tracking every action in eclipse [message #335250] Fri, 27 March 2009 17:36 Go to next message
Oelerink is currently offline OelerinkFriend
Messages: 129
Registered: July 2009
Senior Member
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 22: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 16:15 Go to previous messageGo to next message
Prakash G.R. is currently offline Prakash G.R.Friend
Messages: 621
Registered: July 2009
Senior Member
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 18: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 10:49 Go to previous messageGo to next message
Oelerink is currently offline OelerinkFriend
Messages: 129
Registered: July 2009
Senior Member
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 11:04 Go to previous messageGo to next message
Oelerink is currently offline OelerinkFriend
Messages: 129
Registered: July 2009
Senior Member
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 21: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 12:54 Go to previous message
Cedric Brun is currently offline Cedric BrunFriend
Messages: 431
Registered: July 2009
Senior Member
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!
>


http://cedric.brun.io news and articles on eclipse and eclipse modeling.
Previous Topic:Debugging products without including extra plugins?
Next Topic:Team logical model
Goto Forum:
  


Current Time: Wed Apr 24 15:22:45 GMT 2024

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

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

Back to the top