Package com.google.collide.dto

Examples of com.google.collide.dto.WorkspaceTreeUpdate


    // TODO: Figure out if we are pasting on top of files that already
    // exist with the same name. If we do, we need to handle that via a prompted
    // replace.

    Mutation.Type mutationType = copiedNodesAreCut ? Mutation.Type.MOVE : Mutation.Type.COPY;
    WorkspaceTreeUpdate msg = fileTreeModel.makeEmptyTreeUpdate();
    for (int i = 0, n = copiedNodes.size(); i < n; i++) {
      FileTreeNode copiedNode = copiedNodes.get(i);
      PathUtil targetPath = new PathUtil.Builder().addPath(parentDirData.getNodePath())
          .addPathComponent(FileTreeUtils.allocateName(
              parentDirData.<DirInfoImpl>cast(), copiedNode.getName())).build();
      msg.getMutations().add(FileTreeUtils.makeMutation(
          mutationType, copiedNode.getNodePath(), targetPath, copiedNode.isDirectory(),
          copiedNode.getFileEditSessionKey()));
    }

    // Cut nodes can only be pasted once.
View Full Code Here

TOP

Related Classes of com.google.collide.dto.WorkspaceTreeUpdate

Copyright © 2018 www.massapicom. 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.