Examples of PathUtil


Examples of com.adobe.epubcheck.util.PathUtil

    Assert.assertTrue("Checker string isn't as expected", checker.toString().startsWith("com.adobe.epubcheck.tool.Checker"));

    HandlerUtil handlerUtil = new HandlerUtil();
    Assert.assertTrue("HandlerUtil string isn't as expected", handlerUtil.toString().startsWith("com.adobe.epubcheck.util.HandlerUtil"));

    PathUtil pathUtil = new PathUtil();
    Assert.assertTrue("PathUtil string isn't as expected", pathUtil.toString().startsWith("com.adobe.epubcheck.util.PathUtil"));

    CheckUtil checkUtil = new CheckUtil();
    Assert.assertTrue("CheckUtil string isn't as expected", checkUtil.toString().startsWith("com.adobe.epubcheck.util.CheckUtil"));

    ResourceUtil resourceUtil = new ResourceUtil();
View Full Code Here

Examples of com.google.collide.client.util.PathUtil

    }

    WorkspaceTreeUpdate msg = fileTreeModel.makeEmptyTreeUpdate();
    for (int i = 0, n = nodesToMove.size(); i < n; i++) {
      FileTreeNode nodeToMove = nodesToMove.get(i);
      PathUtil targetPath = new PathUtil.Builder().addPath(parentDirData.getNodePath())
          .addPathComponent(FileTreeUtils.allocateName(
              parentDirData.<DirInfoImpl>cast(), nodeToMove.getName())).build();
      msg.getMutations().add(FileTreeUtils.makeMutation(Mutation.Type.MOVE,
          nodeToMove.getNodePath(), targetPath, nodeToMove.isDirectory(),
          nodeToMove.getFileEditSessionKey()));
View Full Code Here

Examples of com.google.collide.client.util.PathUtil

   * @return the node if it was found, or null if it was not found or if this
   *         node is not a directory
   */
  public final FileTreeNode findChildNode(PathUtil path) {
    FileTreeNode closest = findClosestChildNode(path);
    PathUtil absolutePath = PathUtil.concatenate(getNodePath(), path);
    if (closest == null || !absolutePath.equals(closest.getNodePath())) {
      return null;
    }
    return closest;
  }
View Full Code Here

Examples of com.google.collide.client.util.PathUtil

      Log.warn(getClass(), "Attempting to add a node before the root is set", path);
      return;
    }

    // Find the parent directory of the node.
    final PathUtil parentDirPath = PathUtil.createExcludingLastN(path, 1);
    FileTreeNode parentDir = getWorkspaceRoot().findChildNode(parentDirPath);

    if (parentDir != null && parentDir.isComplete()) {
      // The parent directory is complete, so add the node.
      addNode(parentDir, newNode, workspaceRootId);
View Full Code Here

Examples of com.google.collide.client.util.PathUtil

        // Error already logged.
      }
    };

    // Request the target directory.
    final PathUtil parentDirPath = PathUtil.createExcludingLastN(newPath, 1);
    FileTreeNode parentDir = workspaceRoot.findChildNode(parentDirPath);
    if (parentDir == null || !parentDir.isComplete()) {
      if (oldNode == null) {
        // Early exit if neither the old node nor the target directory is loaded.       
        return;
View Full Code Here

Examples of com.google.collide.client.util.PathUtil

          editor.scrollTo(lineNumber, column);
        }
      });
    } else {
      currentPlace.fireChildPlaceNavigation(FileSelectedPlace.PLACE.createNavigationEvent(
          new PathUtil(path), lineNumber, column, false));
    }
  }
View Full Code Here

Examples of com.google.collide.client.util.PathUtil

      onNodeRemoved(oldParent, node.getRenderedTreeNode());
      // do not kill the back reference (as in onNodeRemoved)!
    }

    if (newNode != null) {
      PathUtil parentDirPath = PathUtil.createExcludingLastN(newPath, 1);
      onNodeAdded(parentDirPath, newNode);
    }
  }
View Full Code Here

Examples of com.google.collide.client.util.PathUtil

      }

      private void prepareForDraggingToOutside(
          TreeNodeElement<FileTreeNode> node, DragEvent event) {
        FileTreeNode fileTreeNode = node.getData();
        PathUtil nodePath = fileTreeNode.getNodePath();

        String downloadFileName = fileTreeNode.isDirectory() ? nodePath.getBaseName() + ".zip"
            : nodePath.getBaseName();

        Location location = elemental.client.Browser.getWindow().getLocation();
        String urlHttpHostPort = location.getProtocol() + "//" + location.getHost();

        String downloadUrl = "application/octet-stream:" + downloadFileName + ":"
View Full Code Here

Examples of com.google.collide.client.util.PathUtil

    return null;
  }

  @VisibleForTesting
  FileTreeNode findFileNode(String displayPath) {
    PathUtil lookupPath = new PathUtil(displayPath);
    if (!displayPath.startsWith("/")) {
      PathUtil contextDir = PathUtil.createExcludingLastN(new PathUtil(contextPath), 1);
      lookupPath = PathUtil.concatenate(contextDir, lookupPath);
    }
    return fileTreeModel.getWorkspaceRoot().findChildNode(lookupPath);
  }
View Full Code Here

Examples of com.google.collide.client.util.PathUtil

  /**
   * Sets the path and type that these breadcrumbs display.
   */
  public void setPath(ConflictedPath conflictedPath) {
    PathUtil newPath = new PathUtil(conflictedPath.getPath());
    JsonArray<Breadcrumb> newFilePath = JsonCollections.createArray();
    for (int i = 0, n = newPath.getPathComponentsCount(); i < n; i++) {
      if (i == n - 1 && conflictedPath.getNodeType() == TreeNodeInfo.FILE_TYPE) {
        newFilePath.add(getView().createBreadcrumb(newPath.getPathComponent(i), PathType.FILE));
      } else {
        newFilePath.add(getView().createBreadcrumb(newPath.getPathComponent(i), PathType.FOLDER));
      }
    }
    currentFilePath = newPath;
    changeBreadcrumbPath(newFilePath);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.