Execute a command from code [message #327168] |
Sat, 12 April 2008 12:42 |
Eclipse User |
|
|
|
Originally posted by: tom.eiswind.de
HI,
guess I have a edit command on my view toolbar.
Now I want that command to be executed on a double click on the views
selection. Command.execute needs an ExecutionEvent, is there an
appropriate way to construct such Event ?
Thanks for helping me
Thomas
|
|
|
Re: Execute a command from code [message #327169 is a reply to message #327168] |
Sat, 12 April 2008 16:26 |
Eclipse User |
|
|
|
Originally posted by: tom.eiswind.de
What I mean is that I only have the DoubleClickEvent that doesnt help.
How would you solve this ?
Thomas schrieb:
> HI,
>
> guess I have a edit command on my view toolbar.
> Now I want that command to be executed on a double click on the views
> selection. Command.execute needs an ExecutionEvent, is there an
> appropriate way to construct such Event ?
>
> Thanks for helping me
> Thomas
|
|
|
|
Re: Execute a command from code [message #327267 is a reply to message #327180] |
Tue, 15 April 2008 05:45 |
Eclipse User |
|
|
|
Originally posted by: tom.eiswind.de
HI Paul,
I thought of that, but the handler needs a proper ExecutionEvent !
Paul Webster schrieb:
> IHandlerService hs
> = (IHandlerService) getSite().getService(IHandlerService.class);
> hs.executeCommand("command.id", null);
>
>
>
|
|
|
Re: Execute a command from code [message #327272 is a reply to message #327267] |
Tue, 15 April 2008 06:43 |
Eclipse User |
|
|
|
Originally posted by: tom.eiswind.de
Tried it works like a charm. Thought I needed an event !
Thomas schrieb:
> HI Paul,
>
> I thought of that, but the handler needs a proper ExecutionEvent !
>
> Paul Webster schrieb:
>> IHandlerService hs
>> = (IHandlerService) getSite().getService(IHandlerService.class);
>> hs.executeCommand("command.id", null);
>>
>>
>>
|
|
|
Powered by
FUDForum. Page generated in 0.03812 seconds