void startDefaultApp(boolean delayError) throws ApplicationException { // find the default application String applicationId = getDefaultAppId(); EclipseAppDescriptor defaultDesc = null; Map args = new HashMap(2); args.put(EclipseAppDescriptor.APP_DEFAULT, Boolean.TRUE); if (applicationId == null && !delayError) { // the application id is not set; use a descriptor that will throw an exception args.put(ErrorApplication.ERROR_EXCEPTION, new RuntimeException(Messages.application_noIdFound)); defaultDesc = getAppDescriptor(EXT_ERROR_APP); } else { defaultDesc = getAppDescriptor(applicationId); if (defaultDesc == null && !delayError) { // the application id is not available in the registry; use a descriptor that will throw an exception args.put(ErrorApplication.ERROR_EXCEPTION, new RuntimeException(NLS.bind(Messages.application_notFound, applicationId, getAvailableAppsMsg()))); defaultDesc = getAppDescriptor(EXT_ERROR_APP); } } if (delayError && defaultDesc == null) { // could not find the application; but we want to delay the error. // another bundle may get installed that provides the application // before we actually try to launch it. missingApp = true; return; } if (defaultDesc != null) defaultDesc.launch(args); else throw new ApplicationException(ApplicationException.APPLICATION_INTERNAL_ERROR, Messages.application_noIdFound); }
void startDefaultApp(boolean delayError) throws ApplicationException { // find the default application String applicationId = getDefaultAppId(); EclipseAppDescriptor defaultDesc = null; Map args = new HashMap(2); args.put(EclipseAppDescriptor.APP_DEFAULT, Boolean.TRUE); if (applicationId == null && !delayError) { // the application id is not set; use a descriptor that will throw an exception args.put(ErrorApplication.ERROR_EXCEPTION, new RuntimeException(Messages.application_noIdFound)); defaultDesc = getAppDescriptor(EXT_ERROR_APP); } else { defaultDesc = getAppDescriptor(applicationId); if (defaultDesc == null && !delayError) { // the application id is not available in the registry; use a descriptor that will throw an exception args.put(ErrorApplication.ERROR_EXCEPTION, new RuntimeException(NLS.bind(Messages.application_notFound, applicationId, getAvailableAppsMsg()))); defaultDesc = getAppDescriptor(EXT_ERROR_APP); } } if (delayError && defaultDesc == null) { // could not find the application; but we want to delay the error. // another bundle may get installed that provides the application // before we actually try to launch it. missingApp = true; return; } if (defaultDesc != null) defaultDesc.launch(args); else throw new ApplicationException(ApplicationException.APPLICATION_INTERNAL_ERROR, Messages.application_noIdFound); }
void startDefaultApp(boolean delayError) throws ApplicationException { // find the default application String applicationId = getDefaultAppId(); EclipseAppDescriptor defaultDesc = null; Map args = new HashMap(2); args.put(EclipseAppDescriptor.APP_DEFAULT, Boolean.TRUE); if (applicationId == null && !delayError) { // the application id is not set; use a descriptor that will throw an exception args.put(ErrorApplication.ERROR_EXCEPTION, new RuntimeException(Messages.application_noIdFound)); defaultDesc = getAppDescriptor(EXT_ERROR_APP); } else { defaultDesc = getAppDescriptor(applicationId); if (defaultDesc == null && !delayError) { // the application id is not available in the registry; use a descriptor that will throw an exception args.put(ErrorApplication.ERROR_EXCEPTION, new RuntimeException(NLS.bind(Messages.application_notFound, applicationId, getAvailableAppsMsg()))); defaultDesc = getAppDescriptor(EXT_ERROR_APP); } } if (delayError && defaultDesc == null) { // could not find the application; but we want to delay the error. // another bundle may get installed that provides the application // before we actually try to launch it. missingApp = true; return; } if (defaultDesc != null) defaultDesc.launch(args); else throw new ApplicationException(ApplicationException.APPLICATION_INTERNAL_ERROR, Messages.application_noIdFound); }
private IConfigurationElement getConfiguration() { IExtension applicationExtension = ((EclipseAppDescriptor) getApplicationDescriptor()).getContainerManager().getAppExtension(getApplicationDescriptor().getApplicationId()); if (applicationExtension == null) throw new RuntimeException(NLS.bind(Messages.application_notFound, getApplicationDescriptor().getApplicationId(), ((EclipseAppDescriptor) getApplicationDescriptor()).getContainerManager().getAvailableAppsMsg())); IConfigurationElement[] configs = applicationExtension.getConfigurationElements(); if (configs.length == 0) throw new RuntimeException(NLS.bind(Messages.application_invalidExtension, getApplicationDescriptor().getApplicationId())); return configs[0]; }
private IConfigurationElement getConfiguration() { IExtension applicationExtension = ((EclipseAppDescriptor) getApplicationDescriptor()).getContainerManager().getAppExtension(getApplicationDescriptor().getApplicationId()); if (applicationExtension == null) throw new RuntimeException(NLS.bind(Messages.application_notFound, getApplicationDescriptor().getApplicationId(), ((EclipseAppDescriptor) getApplicationDescriptor()).getContainerManager().getAvailableAppsMsg())); IConfigurationElement[] configs = applicationExtension.getConfigurationElements(); if (configs.length == 0) throw new RuntimeException(NLS.bind(Messages.application_invalidExtension, getApplicationDescriptor().getApplicationId())); return configs[0]; }
private IConfigurationElement getConfiguration() { IExtension applicationExtension = ((EclipseAppDescriptor) getApplicationDescriptor()).getContainerManager().getAppExtension(getApplicationDescriptor().getApplicationId()); if (applicationExtension == null) throw new RuntimeException(NLS.bind(Messages.application_notFound, getApplicationDescriptor().getApplicationId(), ((EclipseAppDescriptor) getApplicationDescriptor()).getContainerManager().getAvailableAppsMsg())); IConfigurationElement[] configs = applicationExtension.getConfigurationElements(); if (configs.length == 0) throw new RuntimeException(NLS.bind(Messages.application_invalidExtension, getApplicationDescriptor().getApplicationId())); return configs[0]; }