logUnresolvedBundles(context.getBundles()); }
	public static Object run(String[] args, Runnable endSplashHandler) throws Exception {		if (running)			throw new IllegalStateException(EclipseAdaptorMsg.formatter.getString("ECLIPSE_STARTUP_ALREADY_RUNNING")); //$NON-NLS-1$		boolean startupFailed = true;		try {			startup(args, endSplashHandler);			startupFailed = false;			return run(null);		} catch (Throwable e) {			// ensure the splash screen is down			if (endSplashHandler != null)				endSplashHandler.run();			// may use startupFailed to understand where the error happened			FrameworkLogEntry logEntry = new FrameworkLogEntry(FrameworkAdaptor.FRAMEWORK_SYMBOLICNAME, startupFailed ? EclipseAdaptorMsg.formatter.getString("ECLIPSE_STARTUP_STARTUP_ERROR") : EclipseAdaptorMsg.formatter.getString("ECLIPSE_STARTUP_APP_ERROR"), 1, e, null); //$NON-NLS-1$//$NON-NLS-2$			if (log != null)				log.log(logEntry);			else				// TODO desperate measure - ideally, we should write this to disk (a la Main.log)				e.printStackTrace();		} finally {			try {				shutdown();			} catch (Throwable e) {				FrameworkLogEntry logEntry = new FrameworkLogEntry(FrameworkAdaptor.FRAMEWORK_SYMBOLICNAME, EclipseAdaptorMsg.formatter.getString("ECLIPSE_STARTUP_SHUTDOWN_ERROR"), 1, e, null); //$NON-NLS-1$				if (log != null)					log.log(logEntry);				else					// TODO desperate measure - ideally, we should write this to disk (a la Main.log)					e.printStackTrace();			}		}		// we only get here if an error happened		System.getProperties().put(PROP_EXITCODE, "13"); //$NON-NLS-1$		System.getProperties().put(PROP_EXITDATA, EclipseAdaptorMsg.formatter.getString("ECLIPSE_STARTUP_ERROR_CHECK_LOG", log.getFile().getPath())); //$NON-NLS-1$		return null;	}