|
|
|
|
|
Re: extension passing messages to e4 UI, how to? [message #741051 is a reply to message #540197] |
Wed, 19 October 2011 02:14  |
Eclipse User |
|
|
|
Hi
Below link is a good reply
http://wiki.eclipse.org/E4/EAS/Progress_Service
I am unable to figure out what imports are needed
Inject Provider<StatusHandler> statusHandler;
@Inject Provider<RunnableContext> runnableContext;
IRunnable runnable = new Runnable("My long-running operation...") {
protected IStatus run() {
IProgressMonitor monitor = runnableContext.get().getProgressMonitor();
monitor.beginTask("foo", 100);
try {
doFirstHalfFoo();
monitor.worked(50);
doSecondHalfFoo();
} catch (FooException e) {
statusHandler.get().handle(e, "foo failure message", runnableContext.get().getStatusReportingService());
} finally {
monitor.done();
}
}
};
runnableContext.get().run(runnable);
Parvez Ahmad hakim
www.abobjects.com
|
|
|
Powered by
FUDForum. Page generated in 0.13627 seconds