Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » How to execute a Handler by id?
How to execute a Handler by id? [message #985901] Fri, 16 November 2012 10:52 Go to next message
Alex Kipling is currently offline Alex Kipling
Messages: 250
Registered: July 2012
Senior Member
Is there a way to execute a concrete Handler by id?
Re: How to execute a Handler by id? [message #985959 is a reply to message #985901] Fri, 16 November 2012 16:06 Go to previous messageGo to next message
Sopot Cela is currently offline Sopot Cela
Messages: 597
Registered: December 2010
Senior Member

No through any service AFAIK.

You can do a ContextInjectionFactory.invoke(handler.getObject(), Execute.class, context); where handler is your MHandler and context is the context your handler will use as an injection supplier (where the values will come from) but I am not sure it is a good idea to use it this way although it depends on the specific case.
Re: How to execute a Handler by id? [message #986005 is a reply to message #985959] Sat, 17 November 2012 06:18 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas Schindl
Messages: 5282
Registered: July 2009
Senior Member
EHandlerService#execute

Tom

Am 16.11.12 22:06, schrieb Sopot Cela:
> No through any service AFAIK.
> You can do a ContextInjectionFactory.invoke(handler.getObject(),
> Execute.class, context); where handler is your MHandler and context is
> the context your handler will use as an injection supplier (where the
> values will come from) but I am not sure it is a good idea to use it
> this way although it depends on the specific case.
Re: How to execute a Handler by id? [message #986011 is a reply to message #986005] Sat, 17 November 2012 08:08 Go to previous messageGo to next message
Sopot Cela is currently offline Sopot Cela
Messages: 597
Registered: December 2010
Senior Member

Thomas Schindl wrote on Sat, 17 November 2012 12:18
EHandlerService#execute

Tom

Am 16.11.12 22:06, schrieb Sopot Cela:
> No through any service AFAIK.
> You can do a ContextInjectionFactory.invoke(handler.getObject(),
> Execute.class, context); where handler is your MHandler and context is
> the context your handler will use as an injection supplier (where the
> values will come from) but I am not sure it is a good idea to use it
> this way although it depends on the specific case.


There's no such method. The executeHandler expects a ParametrizedCommand, not a MHandler

[Updated on: Sat, 17 November 2012 08:09]

Report message to a moderator

Re: How to execute a Handler by id? [message #986759 is a reply to message #986011] Wed, 21 November 2012 09:47 Go to previous message
Lars Vogel is currently offline Lars Vogel
Messages: 1048
Registered: July 2009
Senior Member

See Eclipse Command Service for an example.

[Updated on: Wed, 21 November 2012 09:47]

Report message to a moderator

Previous Topic:How to implement empty grey part-area in e4?
Next Topic:How to pass Keyboard Events to the MPart?
Goto Forum:
  


Current Time: Fri Aug 22 06:00:03 EDT 2014

Powered by FUDForum. Page generated in 0.19085 seconds