Examples of GetDirectoryImpl


Examples of com.google.collide.dto.client.DtoClientImpls.GetDirectoryImpl

    reloadDirectory(invalidatedPath);
  }

  private void reloadDirectory(final PathUtil invalidatedPath) {
    GetDirectoryImpl request = GetDirectoryImpl.make().setRootId(
        fileTreeModel.getLastAppliedTreeMutationRevision())
        .setDepth(FrontendConstants.DEFAULT_FILE_TREE_DEPTH);

    // Fetch the parent directory of the file
    request.setPath(invalidatedPath.toString());

    appContext.getFrontendApi().GET_DIRECTORY.send(request,
        new ApiCallback<GetDirectoryResponse>() {

          @Override
View Full Code Here

Examples of com.google.collide.dto.client.DtoClientImpls.GetDirectoryImpl

          /*
           * TODO: We should revisit deep linking in the file tree and possible only show
           * the directory that is deep linked. Otherwise, we may have to load a lot of parent
           * directories when deep linking to a very deep directory.
           */
          GetDirectoryImpl getDirectoryAndPath = GetDirectoryImpl.make()
              .setPath(dirPath.getPathString())
              .setDepth(FrontendConstants.DEFAULT_FILE_TREE_DEPTH)
              .setRootId(fileTreeModel.getLastAppliedTreeMutationRevision());
              // Include the root path so we load parent directories leading up to the file.
              //.setRootPath(closest.getNodePath().getPathString());
View Full Code Here

Examples of com.google.collide.dto.client.DtoClientImpls.GetDirectoryImpl

     */
    void requestDirectoryChildren(
        final FileTreeModel fileTreeModel, FileTreeNode node, final NodeRequestCallback callback) {
      Preconditions.checkArgument(node.isDirectory(), "Cannot request children of a file");
      final PathUtil path = node.getNodePath();
      GetDirectoryImpl getDirectory = GetDirectoryImpl.make()
          .setPath(path.getPathString())
          .setDepth(FrontendConstants.DEFAULT_FILE_TREE_DEPTH)
          .setRootId(fileTreeModel.getLastAppliedTreeMutationRevision());
      appContext.getFrontendApi().GET_DIRECTORY.send(getDirectory,
          new ApiCallback<GetDirectoryResponse>() {
View Full Code Here

Examples of com.google.collide.dto.client.DtoClientImpls.GetDirectoryImpl

    reloadDirectory(invalidatedPath);
  }

  private void reloadDirectory(final PathUtil invalidatedPath) {
    GetDirectoryImpl request = GetDirectoryImpl.make().setRootId(
        fileTreeModel.getLastAppliedTreeMutationRevision())
        .setDepth(FrontendConstants.DEFAULT_FILE_TREE_DEPTH);

    // Fetch the parent directory of the file
    request.setPath(invalidatedPath.toString());

    fileTreeController.getDirectory(request,
        new ApiCallback<GetDirectoryResponse>() {

          @Override
View Full Code Here

Examples of com.google.collide.dto.client.DtoClientImpls.GetDirectoryImpl

          /*
           * TODO: We should revisit deep linking in the file tree and possible only show
           * the directory that is deep linked. Otherwise, we may have to load a lot of parent
           * directories when deep linking to a very deep directory.
           */
          GetDirectoryImpl getDirectoryAndPath = GetDirectoryImpl.make()
              .setPath(dirPath.getPathString())
              .setDepth(FrontendConstants.DEFAULT_FILE_TREE_DEPTH)
              .setRootId(fileTreeModel.getLastAppliedTreeMutationRevision());
              // Include the root path so we load parent directories leading up to the file.
              //.setRootPath(closest.getNodePath().getPathString());
View Full Code Here

Examples of com.google.collide.dto.client.DtoClientImpls.GetDirectoryImpl

     */
    void requestDirectoryChildren(
        final FileTreeModel fileTreeModel, FileTreeNode node, final NodeRequestCallback callback) {
      Preconditions.checkArgument(node.isDirectory(), "Cannot request children of a file");
      final PathUtil path = node.getNodePath();
      GetDirectoryImpl getDirectory = GetDirectoryImpl.make()
          .setPath(path.getPathString())
          .setDepth(FrontendConstants.DEFAULT_FILE_TREE_DEPTH)
          .setRootId(fileTreeModel.getLastAppliedTreeMutationRevision());
      fileTreeController.getDirectory(getDirectory,
          new ApiCallback<GetDirectoryResponse>() {
View Full Code Here

Examples of com.google.collide.dto.server.DtoServerImpls.GetDirectoryImpl

   * Replies to the requester with the File Tree rooted at the path requested by the requester.
   */
  class FileTreeGetter implements Handler<Message<JsonObject>> {
    @Override
    public void handle(Message<JsonObject> message) {
      GetDirectoryImpl request = GetDirectoryImpl.fromJsonString(Dto.get(message));
      final GetDirectoryResponseImpl response = GetDirectoryResponseImpl.make();
      synchronized (FileTree.this.lock) {
        response.setRootId(Long.toString(currentTreeVersion));
        PathUtils.walk(request.getPath(), "/", new PathVisitor() {
          @Override
          public void visit(String path, String name) {
            // Special case root.
            if ("/".equals(path)) {
              response.setBaseDirectory(root);
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.