Package com.google.collide.dto.client.DtoClientImpls

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


        .setChildren(JsoArray.<CodeBlock>from(aFoo))
        .setStartLineNumber(0)
        .setStartColumn(0)
        .setEndLineNumber(0)
        .setEndColumn(19);
    CodeGraphImpl codeGraph = createCodeGraph(fileCodeBlock);
    CodeGraphResponseImpl response = DtoClientImpls.MockCodeGraphResponseImpl.make();
    response.setFreshness(createFreshness("0", "1", "0"));
    response.setFullGraphJson(codeGraph.serialize());

    // This will immediately fire api call
    helper.cubeClient.setPath("/foo.js");
    assertEquals("one api call after setDocument", 1,
        helper.cubeClient.api.collectedCallbacks.size());
View Full Code Here


  CodeGraph constructCodeGraph() {
    CubeData data = cubeClient.getData();
    hasUpdate = false;

    CodeGraphImpl result = CodeGraphImpl.make();
    result.setCodeBlockMap(JsoStringMap.<CodeBlock>create());
    result.setInheritanceAssociations(JsoArray.<InheritanceAssociation>create());
    result.setTypeAssociations(JsoArray.<TypeAssociation>create());
    result.setImportAssociations(JsoArray.<ImportAssociation>create());

    CodeGraph fullGraph = data.getFullGraph();
    CodeGraph workspaceTree = data.getWorkspaceTree();
    CodeBlock fileTree = data.getFileTree();
    CodeGraph libsSubgraph = data.getLibsSubgraph();

    if (fullGraph != null) {
      mergeCodeGraph(fullGraph, result);
    }
    if (workspaceTree != null) {
      mergeCodeGraph(workspaceTree, result);
    }
    if (fileTree != null) {
      result.getCodeBlockMap().put(fileTree.getId(), fileTree);
    }
    if (libsSubgraph != null) {
      mergeCodeGraph(libsSubgraph, result);
    }
    return result;
View Full Code Here

  /**
   * Constructs {@link CodeGraphImpl} consisting given {@link CodeBlock}.
   */
  public static CodeGraphImpl createCodeGraph(CodeBlock fileBlock) {
    CodeGraphImpl result = CodeGraphImpl.make();
    JsoStringMap<CodeBlock> codeBlocks = JsoStringMap.create();
    codeBlocks.put("/foo.js", fileBlock);
    result.setCodeBlockMap(codeBlocks);
    return result;
  }
View Full Code Here

TOP

Related Classes of com.google.collide.dto.client.DtoClientImpls.CodeGraphImpl

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.