@Override protected IProject[] getBuildOrder(ILaunchConfiguration configuration, String mode) throws CoreException { // indicate which project to save before launch SDBGLaunchConfigWrapper launchConfig = new SDBGLaunchConfigWrapper(configuration); IResource resource = launchConfig.getApplicationResource(); if (resource != null) { return new IProject[] {resource.getProject()}; } if (launchConfig.getProject() != null) { return new IProject[] {launchConfig.getProject()}; } return null; }
protected String resolveLaunchUrl( IResourceResolver resourceResolver, SDBGLaunchConfigWrapper launchConfig) throws CoreException { String url; if (launchConfig.getShouldLaunchFile()) { IResource resource = launchConfig.getApplicationResource(); if (resource == null) { throw new CoreException( new Status( IStatus.ERROR, SDBGDebugCorePlugin.PLUGIN_ID, "HTML file could not be found")); } if (resource instanceof IFile) { url = resourceResolver.getUrlForResource(resource); } else { url = resource.getLocationURI().toString(); } } else { url = launchConfig.getUrl(); } return launchConfig.appendQueryParams(url); }