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.
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ e4-dev mailing list [email protected] https://dev.eclipse.org/mailman/listinfo/e4-dev
