|
Re: Tracking every action in eclipse [message #335260 is a reply to message #335250] |
Fri, 27 March 2009 22:39 |
Eclipse User |
|
|
|
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 #335265 is a reply to message #335260] |
Sat, 28 March 2009 18:49 |
Eclipse User |
|
|
|
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 #335315 is a reply to message #335294] |
Tue, 31 March 2009 21:24 |
Eclipse User |
|
|
|
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 |
Cedric Brun 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.
|
|
|
Powered by
FUDForum. Page generated in 0.03772 seconds