Package com.google.collide.json.shared

Examples of com.google.collide.json.shared.JsonStringSet


        //  ^^^^^^^^^  ^^-^-^^^^^^^^^^^^^^
        + " q:lang(no) {quotes: \"~\" \"~\";}\n"
        //  ^^^^^^^^^^
        ;

    JsonStringSet tags = JsonCollections.createStringSet("td", "p.dark-green", "a:hover",
        "[title~=hello]", "a.bad:visited", "b.sparse", "#para", "div#main", ".marked p",
        "p > i:first-child", "q:lang(no)");

    checkOutlineParser(text, tags);
  }
View Full Code Here


    searchLinks(query, linkSourceCandidates, result);
  }

  private void searchLinks(String query, JsonArray<CodeGraphProposalImpl> linkSourceCandidates,
      JsonArray<CodeGraphProposalImpl> result) {
    JsonStringSet visited = JsonCollections.createStringSet();

    while (!linkSourceCandidates.isEmpty()) {
      JsonArray<CodeGraphProposalImpl> newCandidates = JsonCollections.createArray();
      for (CodeGraphProposalImpl candidate : linkSourceCandidates.asIterable()) {
        CodeBlock codeBlock = candidate.codeBlock;
View Full Code Here

    }
  }

  public static <T extends AutocompleteProposal> JsonStringSet createNameSet(
      JsonArray<T> proposals) {
    JsonStringSet result = JsonCollections.createStringSet();
    for (int i = 0; i < proposals.size(); i++) {
      result.add(proposals.get(i).name);
    }
    return result;
  }
View Full Code Here

    }
    return result;
  }

  public static JsonStringSet createNameSet(AutocompleteProposals proposals) {
    JsonStringSet result = JsonCollections.createStringSet();
    for (int i = 0; i < proposals.size(); i++) {
      result.add(proposals.get(i).name);
    }
    return result;
  }
View Full Code Here

      }
    }

    // Now use the knowledge about current scope and calculate possible
    // shortcuts in code graph.
    JsonStringSet prefixes = scopeTrieBuilder.calculateScopePrefixes(context, cursorPosition);
    // Let language-specific modifications.
    addShortcutsTo(context, prefixes);

    PrefixIndex<CodeGraphProposal> codeGraphTrie = scopeTrieBuilder.getCodeGraphTrie();
    JsonArray<AutocompleteProposal> codeProposals = JsonCollections.createArray();
    // We're iterate found shortcuts...
    for (String prefix : prefixes.getKeys().asIterable()) {
      JsonArray<? extends CodeGraphProposal> proposals = codeGraphTrie.search(prefix + itemPrefix);
      // Distill raw proposals.
      int prefixLength = prefix.length();
      for (CodeGraphProposal proposal : proposals.asIterable()) {
        // Take part of string between prefix and period.
View Full Code Here

TOP

Related Classes of com.google.collide.json.shared.JsonStringSet

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.