public Object run() { Integer result = IPlatformRunnable.EXIT_OK; if (PlatformUI.createAndRunWorkbench(display, workbenchAdvisor) == PlatformUI.RETURN_RESTART) { result = IPlatformRunnable.EXIT_RESTART; } return result; } });
public Object start(IApplicationContext context) throws Exception { Display display = PlatformUI.createDisplay(); try { int returnCode = PlatformUI.createAndRunWorkbench(display, new ApplicationWorkbenchAdvisor()); if (returnCode == PlatformUI.RETURN_RESTART) return IApplication.EXIT_RESTART; else return IApplication.EXIT_OK; } finally { display.dispose(); } }
public Object start(IApplicationContext context) { Display display = PlatformUI.createDisplay(); try { int returnCode = PlatformUI.createAndRunWorkbench(display, new ApplicationWorkbenchAdvisor()); if (returnCode == PlatformUI.RETURN_RESTART) { return IApplication.EXIT_RESTART; } return IApplication.EXIT_OK; } finally { display.dispose(); } }
/** * {@inheritDoc} */ @Override public Object start(IApplicationContext context) throws Exception { Display display = PlatformUI.createDisplay(); try { int returnCode = PlatformUI.createAndRunWorkbench(display, new ApplicationWorkbenchAdvisor()); if (returnCode == PlatformUI.RETURN_RESTART) { return IApplication.EXIT_RESTART; } return IApplication.EXIT_OK; } finally { display.dispose(); } }
@Override public Object start(IApplicationContext context) throws Exception { Display display = PlatformUI.createDisplay(); try { Shell shell = new Shell(display, SWT.ON_TOP); shell.dispose(); // create the workbench with this advisor and run it until it exits // N.B. createWorkbench remembers the advisor, and also registers // the workbench globally so that all UI plug-ins can find it using // PlatformUI.getWorkbench() or AbstractUIPlugin.getWorkbench() PlatformUI.createAndRunWorkbench(display, new AntRunnerWorkbenchAdvisor(context.getArguments().get(IApplicationContext.APPLICATION_ARGS))); return EXIT_OK; } finally { if (display != null) { display.dispose(); } } }
int returnCode = PlatformUI.createAndRunWorkbench(display, new IDEWorkbenchAdvisor(processor));