Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » How to get Eclipse context(to execute a command programmatically)
How to get Eclipse context [message #1076533] Wed, 31 July 2013 10:50 Go to next message
Ludwig Moser is currently offline Ludwig Moser
Messages: 328
Registered: July 2009
Senior Member
Hello,

i've been searching up and down the web for executing Handlers in e4 programmatically.
this artivle shows how to execute one, but you needs eclipseCtx to gain the services.
and i cant find the part where i can get the eclipseCtx from.

any suggestions for executing a Handler with parameters are welcome.

PS: i also had a look on Vogella's list of tutorials (aside many others)
Re: How to get Eclipse context [message #1076576 is a reply to message #1076533] Wed, 31 July 2013 11:40 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas Schindl
Messages: 5296
Registered: July 2009
Senior Member
class MyBean {
@Inject
IEclipseContext context;
}

On 31.07.13 16:50, Ludwig Moser wrote:
> Hello,
>
> i've been searching up and down the web for executing Handlers in e4
> programmatically.
> http://wiki.eclipse.org/E4/Snippets#Execute_Command.2FHandler_manually
> artivle shows how to execute one, but you needs eclipseCtx to gain the
> services.
> and i cant find the part where i can get the eclipseCtx from.
>
> any suggestions for executing a Handler with parameters are welcome.
>
> PS: i also had a look on Vogella's list of tutorials (aside many others)
Re: How to get Eclipse context [message #1077019 is a reply to message #1076576] Thu, 01 August 2013 02:24 Go to previous message
Ludwig Moser is currently offline Ludwig Moser
Messages: 328
Registered: July 2009
Senior Member
bam, that simple.
Thanks
Previous Topic:Plugin / class reference in e4 Application
Next Topic:Closing a window seems to remove it from the model
Goto Forum:
  


Current Time: Sat Aug 30 20:24:25 EDT 2014

Powered by FUDForum. Page generated in 0.01639 seconds