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);
  }
 protected IResourceResolver getResourceResolver(SDBGLaunchConfigWrapper launchConfig)
     throws CoreException {
   return launchConfig.getShouldLaunchFile()
       ? getResourceServer()
       : new LaunchConfigResourceResolver(launchConfig);
 }