/**
   * Runs a given resource via debugger API if it is available, or just opens the resource in a new
   * window.
   *
   * @param absoluteResourceUri absolute resource URI
   * @return {@code true} if the application was started successfully via debugger API, {@code
   *     false} if it was opened in a new window
   */
  public boolean runApplication(String absoluteResourceUri) {
    final String baseUri;

    // Check if the URI points to a local path.
    String workspaceBaseUri = ResourceUriUtils.getAbsoluteResourceBaseUri();
    if (absoluteResourceUri.startsWith(workspaceBaseUri + "/")) {
      baseUri = workspaceBaseUri;
    } else {
      baseUri = ResourceUriUtils.extractBaseUri(absoluteResourceUri);
    }

    SourceMapping sourceMapping = StaticSourceMapping.create(baseUri);
    return runApplication(sourceMapping, absoluteResourceUri);
  }
 /** @see #runApplication(String) */
 public boolean runApplication(PathUtil applicationPath) {
   String baseUri = ResourceUriUtils.getAbsoluteResourceBaseUri();
   SourceMapping sourceMapping = StaticSourceMapping.create(baseUri);
   return runApplication(sourceMapping, sourceMapping.getRemoteSourceUri(applicationPath));
 }