コード例 #1
0
ファイル: PubServeMainTab.java プロジェクト: kuhmuh/sdbg
  @Override
  public void initializeFrom(ILaunchConfiguration configuration) {
    SDBGLaunchConfigWrapper dartLauncher = new SDBGLaunchConfigWrapper(configuration);

    htmlText.setText(dartLauncher.appendQueryParams(dartLauncher.getApplicationName()));
    argumentText.setText(dartLauncher.getArguments());
  }
コード例 #2
0
  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);
  }