Package org.eclim.plugin.core.command.complete

Examples of org.eclim.plugin.core.command.complete.CodeCompleteResult


      }else{
        desc.append(completion);
      }

      String info = desc.toString();
      results.add(new CodeCompleteResult(completion, null, info));
    }
View Full Code Here


    ArrayList<CodeCompleteResult> results = new ArrayList<CodeCompleteResult>();

    if(proposals != null){
      for (ICompletionProposal proposal : proposals){
        if(acceptProposal(proposal)){
          CodeCompleteResult ccresult = createCodeCompletionResult(proposal);
          if(ccresult != null && !results.contains(ccresult)){
            results.add(ccresult);
          }
        }
      }
View Full Code Here

   * @return The CodeCompleteResult.
   */
  protected CodeCompleteResult createCodeCompletionResult(
      ICompletionProposal proposal)
  {
    return new CodeCompleteResult(
        getCompletion(proposal), getMenu(proposal), getInfo(proposal));
  }
View Full Code Here

      List<CodeCompleteResult> results)
  {
    ArrayList<CodeCompleteResult> compactResults =
      new ArrayList<CodeCompleteResult>();

    CodeCompleteResult first = results.get(0);
    String lastWord = first.getCompletion();
    String lastType = first.getType();
    ArrayList<CodeCompleteResult> overloaded = new ArrayList<CodeCompleteResult>();

    for(CodeCompleteResult result : results){
      if (!result.getCompletion().equals(lastWord) ||
          !result.getType().equals(lastType))
View Full Code Here

  }

  private CodeCompleteResult compactOverloaded(
      ArrayList<CodeCompleteResult> overloaded)
  {
    CodeCompleteResult r = overloaded.get(0);
    if (overloaded.size() == 1){
      return r;
    }

    StringBuffer info = new StringBuffer();
    for (CodeCompleteResult o : overloaded){
      if(info.length() > 0){
        info.append("<br/>");
      }
      info.append(o.getMenu());
    }

    return new CodeCompleteResult(
        r.getCompletion(),
        "Overloaded, see preview...",
        info.toString(),
        r.getType());
  }
View Full Code Here

    // completion 'info' so that I can provide this text without the
    // overhead involved with retrieving it for every completion regardless
    // of whether the user ever views it.
    /*return new CodeCompleteResult(
        kind, completion, menu, proposal.getAdditionalProposalInfo());*/
    return new CodeCompleteResult(completion, menu, menu, type);
  }
View Full Code Here

      collector.getScriptCompletionProposals();
    Arrays.sort(proposals, new ScriptCompletionProposalComparator());

    ArrayList<CodeCompleteResult> results = new ArrayList<CodeCompleteResult>();
    for (IScriptCompletionProposal proposal : proposals){
      CodeCompleteResult ccresult = new CodeCompleteResult(
          getCompletion(proposal), getMenu(proposal), getInfo(proposal));

      if(!results.contains(ccresult)){
        results.add(ccresult);
      }
View Full Code Here

TOP

Related Classes of org.eclim.plugin.core.command.complete.CodeCompleteResult

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.