Package mmrnmhrm.ui.editor.codeassist

Examples of mmrnmhrm.ui.editor.codeassist.DeeCompletionProposal


  public static void checkProposals(ICompletionProposal[] proposals, int repOffset, int repLen, int prefixLen) {
    for(ICompletionProposal completionProposal : proposals) {
      if(completionProposal instanceof ScriptTemplateProposal) {
        continue;
      }
      DeeCompletionProposal proposal = (DeeCompletionProposal) completionProposal;
      String defName = proposal.namedElement.getExtendedName();
     
      assertTrue(repOffset == proposal.getReplacementOffset());
      assertTrue(repLen == proposal.getReplacementLength());
      if(prefixLen != DONT_CHECK) {
        String repStr = defName.substring(prefixLen);
        if(repStr.indexOf('(') != -1) {
          repStr = repStr.substring(0, repStr.indexOf('('));
        }
        assertTrue(repStr.equals(proposal.getReplacementString()));       
      }
    }
  }
View Full Code Here


 
  public static List<INamedElement> proposalsToDefUnitResults(ICompletionProposal[] proposals) {
    List<INamedElement> results = new ArrayList<>();
    for (ICompletionProposal iCompletionProposal : proposals) {
      if(iCompletionProposal instanceof DeeCompletionProposal) {
        DeeCompletionProposal deeCompletionProposal = (DeeCompletionProposal) iCompletionProposal;
        results.add(deeCompletionProposal.namedElement);
      }
    }
    return results;
  }
View Full Code Here

 
  public List<INamedElement> proposalResultsToDefUnit(ICompletionProposal[] proposals) {
    ArrayList<INamedElement> results = new ArrayList<>();
    for (ICompletionProposal completionProposal : proposals) {
      if(completionProposal instanceof DeeCompletionProposal) {
        DeeCompletionProposal deeProposal = (DeeCompletionProposal) completionProposal;
        results.add(deeProposal.namedElement);
      }
    }
    return results;
  }
View Full Code Here

          if(completionProposal instanceof ScriptTemplateProposal) {
            continue;
          }
         
          assertTrue(completionProposal instanceof DeeCompletionProposal);
          DeeCompletionProposal deeProposal = (DeeCompletionProposal) completionProposal;
          assertTrue(deeProposal.getReplacementOffset() == offset);
          assertTrue(deeProposal.getReplacementLength() == rplLen);
          assertTrue(deeProposal.getCursorPosition() == deeProposal.getReplacementString().length());
        }
      }
    }.testBasic();
  }
View Full Code Here

TOP

Related Classes of mmrnmhrm.ui.editor.codeassist.DeeCompletionProposal

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.