Hi Thanks for your reply. It didn't solved problem. I see huge errors. regards Ahmad
On Tue, Oct 25, 2011 at 5:35 AM, Brian de Alwis <[email protected]> wrote: > On 21-Oct-2011, at 3:26 PM, Parvez Ahmad wrote: >> what is equivalent of PlatformUI.getWorkbench().restart() n E4 >> Since in E4 we do not create workbench , so how to port old code > > @Inject org.eclipse.e4.ui.workbench.IWorkbench workbench; > > Eclipse 4 doesn't provide a way to restart as you could have multiple E4 > applications running within the same OSGi instance. If you really want to do > a restart, you need to talk to the OSGi framework. I have a method in my > bundle activator that does something like the following: > > try { > FrameworkProperties.setProperty("osgi.forcedRestart", > Boolean.toString(true)); > > bundleContext.getBundle(0).stop(org.osgi.framework.Bundle.STOP_TRANSIENT); > } catch(BundleException e) { > logger.error("Unable to restart system.bundle", e); > } > > Hope that helps. > > Brian. > _______________________________________________ > e4-dev mailing list > [email protected] > https://dev.eclipse.org/mailman/listinfo/e4-dev > > _______________________________________________ e4-dev mailing list [email protected] https://dev.eclipse.org/mailman/listinfo/e4-dev
