logUnresolvedBundles(context.getBundles());
if (context != null) logUnresolvedBundles(context.getBundles());
	public static Object run(String[] args, Runnable endSplashHandler) throws Exception {		if (Profile.PROFILE && Profile.STARTUP)			Profile.logEnter("EclipseStarter.run()", null); //$NON-NLS-1$		if (running)			throw new IllegalStateException(EclipseAdaptorMsg.ECLIPSE_STARTUP_ALREADY_RUNNING);		boolean startupFailed = true;		try {			startup(args, endSplashHandler);			startupFailed = false;			if (Boolean.valueOf(FrameworkProperties.getProperty(PROP_IGNOREAPP)).booleanValue())				return null;			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, FrameworkLogEntry.ERROR, 0, startupFailed ? EclipseAdaptorMsg.ECLIPSE_STARTUP_STARTUP_ERROR : EclipseAdaptorMsg.ECLIPSE_STARTUP_APP_ERROR, 1, e, null);			if (log != null) {				log.log(logEntry);				logUnresolvedBundles(context.getBundles());			} else				// TODO desperate measure - ideally, we should write this to disk (a la Main.log)				e.printStackTrace();		} finally {			try {				if (!Boolean.valueOf(FrameworkProperties.getProperty(PROP_NOSHUTDOWN)).booleanValue())					shutdown();			} catch (Throwable e) {				FrameworkLogEntry logEntry = new FrameworkLogEntry(FrameworkAdaptor.FRAMEWORK_SYMBOLICNAME, FrameworkLogEntry.ERROR, 0, EclipseAdaptorMsg.ECLIPSE_STARTUP_SHUTDOWN_ERROR, 1, e, null);				if (log != null)					log.log(logEntry);				else					// TODO desperate measure - ideally, we should write this to disk (a la Main.log)					e.printStackTrace();			}			if (Profile.PROFILE && Profile.STARTUP)				Profile.logExit("EclipseStarter.run()"); //$NON-NLS-1$			if (Profile.PROFILE) {				String report = Profile.getProfileLog();				// avoiding writing to the console if there is nothing to print				if (report != null && report.length() > 0)					System.out.println(report);			}		}		// first check to see if the framework is forcing a restart		if (Boolean.valueOf(FrameworkProperties.getProperty(PROP_FORCED_RESTART)).booleanValue()) {			FrameworkProperties.setProperty(PROP_EXITCODE, "23"); //$NON-NLS-1$			return null;		}		// we only get here if an error happened		FrameworkProperties.setProperty(PROP_EXITCODE, "13"); //$NON-NLS-1$		FrameworkProperties.setProperty(PROP_EXITDATA, NLS.bind(EclipseAdaptorMsg.ECLIPSE_STARTUP_ERROR_CHECK_LOG, log == null ? null : log.getFile().getPath()));		return null;	}