public Object addingService(ServiceReference reference) { ApplicationLauncher appLauncher; ParameterizedRunnable appRunnable; synchronized (this) { appLauncher = (ApplicationLauncher) context.getService(reference); // see if there is a default main threaded application waiting to run appRunnable = defaultMainThreadAppHandle; // null out so we do not attempt to start this handle again defaultMainThreadAppHandle = null; if (appRunnable == null && missingApp) { missingAppLauncher = new MainApplicationLauncher(this); appRunnable = missingAppLauncher; missingApp = false; } } if (appRunnable != null) // found a main threaded app; start it now that the app launcher is available appLauncher.launch(appRunnable, appRunnable instanceof EclipseAppHandle ? ((EclipseAppHandle) appRunnable).getArguments().get(IApplicationContext.APPLICATION_ARGS) : null); return appLauncher; }
public void stop() { // force the application to quit ApplicationRunnable handle = getMainHandle(); if (handle != null) handle.stop(); }
curDefaultApplicationListener.launch(appHandle); else if (curMissingAppLauncher != null) curMissingAppLauncher.launch(appHandle); else appLauncher.launch(appHandle, appHandle.getArguments().get(IApplicationContext.APPLICATION_ARGS)); curMissingAppLauncher.launch(curDefaultApplicationListener); else appLauncher.launch(curDefaultApplicationListener, null);
curDefaultApplicationListener.launch(appHandle); else if (curMissingAppLauncher != null) curMissingAppLauncher.launch(appHandle); else appLauncher.launch(appHandle, appHandle.getArguments().get(IApplicationContext.APPLICATION_ARGS)); curMissingAppLauncher.launch(curDefaultApplicationListener); else appLauncher.launch(curDefaultApplicationListener, null);
@Override public void stop() { // force the application to quit ApplicationRunnable handle = getMainHandle(); if (handle != null) handle.stop(); }
public Object addingService(ServiceReference reference) { ApplicationLauncher appLauncher; ParameterizedRunnable appRunnable; synchronized (this) { appLauncher = (ApplicationLauncher) context.getService(reference); // see if there is a default main threaded application waiting to run appRunnable = defaultMainThreadAppHandle; // null out so we do not attempt to start this handle again defaultMainThreadAppHandle = null; if (appRunnable == null && missingApp) { missingAppLauncher = new MainApplicationLauncher(this); appRunnable = missingAppLauncher; missingApp = false; } } if (appRunnable != null) // found a main threaded app; start it now that the app launcher is available appLauncher.launch(appRunnable, appRunnable instanceof EclipseAppHandle ? ((EclipseAppHandle) appRunnable).getArguments().get(IApplicationContext.APPLICATION_ARGS) : null); return appLauncher; }
curDefaultApplicationListener.launch(appHandle); else if (curMissingAppLauncher != null) curMissingAppLauncher.launch(appHandle); else appLauncher.launch(appHandle, appHandle.getArguments().get(IApplicationContext.APPLICATION_ARGS)); curMissingAppLauncher.launch(curDefaultApplicationListener); else appLauncher.launch(curDefaultApplicationListener, null);
public void stop() { // force the application to quit ApplicationRunnable handle = getMainHandle(); if (handle != null) handle.stop(); }
@Override public Object addingService(ServiceReference reference) { ApplicationLauncher appLauncher; ParameterizedRunnable appRunnable; synchronized (this) { appLauncher = (ApplicationLauncher) context.getService(reference); // see if there is a default main threaded application waiting to run appRunnable = defaultMainThreadAppHandle; // null out so we do not attempt to start this handle again defaultMainThreadAppHandle = null; if (appRunnable == null && missingApp) { missingAppLauncher = new MainApplicationLauncher(this); appRunnable = missingAppLauncher; missingApp = false; } } if (appRunnable != null) // found a main threaded app; start it now that the app launcher is available appLauncher.launch(appRunnable, appRunnable instanceof EclipseAppHandle ? ((EclipseAppHandle) appRunnable).getArguments().get(IApplicationContext.APPLICATION_ARGS) : null); return appLauncher; }
public Object run(Object context) throws Exception { appContainer.startDefaultApp(false); ApplicationRunnable mainHandle = getMainHandle(); if (mainHandle != null) return mainHandle.run(context); throw new ApplicationException(ApplicationException.APPLICATION_INTERNAL_ERROR, Messages.application_noIdFound); }
@Override public Object run(Object context) throws Exception { appContainer.startDefaultApp(false); ApplicationRunnable mainHandle = getMainHandle(); if (mainHandle != null) return mainHandle.run(context); throw new ApplicationException(ApplicationException.APPLICATION_INTERNAL_ERROR, Messages.application_noIdFound); }
public Object run(Object context) throws Exception { appContainer.startDefaultApp(false); ApplicationRunnable mainHandle = getMainHandle(); if (mainHandle != null) return mainHandle.run(context); throw new ApplicationException(ApplicationException.APPLICATION_INTERNAL_ERROR, Messages.application_noIdFound); }