Package mmrnmhrm.core.engine_client.DeeCompletionEngine

Examples of mmrnmhrm.core.engine_client.DeeCompletionEngine.RefSearchCompletionProposal


  // Most of ScriptCompletionProposalCollector functionality is overridden here
  @Override
  protected IScriptCompletionProposal createScriptCompletionProposal(CompletionProposal proposal) {
   
    if(proposal instanceof RefSearchCompletionProposal) {
      RefSearchCompletionProposal refSearchProposal = (RefSearchCompletionProposal) proposal;
      INamedElement namedElement = refSearchProposal.getExtraInfo();
     
      String completion = proposal.getCompletion();
      int repStart = proposal.getReplaceStart();
      int repLength = proposal.getReplaceEnd() - proposal.getReplaceStart();
      Image image = createImage(proposal);
     
      String displayString = refSearchProposal.isModuleImportCompletion() ?
        namedElement.getModuleFullyQualifiedName() :
        DeeElementLabelProvider.getLabelForContentAssistPopup(namedElement);
     
      DeeCompletionProposal completionProposal = new DeeCompletionProposal(completion, repStart, repLength,
          image, displayString, namedElement, null);
View Full Code Here


    }
   
    @Override
    public void accept(CompletionProposal proposal) {
      assertTrue(proposal instanceof RefSearchCompletionProposal);
      RefSearchCompletionProposal refProposal = (RefSearchCompletionProposal) proposal;
     
      assertTrue(proposal.getCompletionLocation() == offset);
      assertTrue(proposal.getReplaceStart() == offset);
      assertTrue(proposal.getReplaceEnd() - proposal.getReplaceStart() == rplLen);
      INamedElement defUnit = refProposal.getExtraInfo();
      results.add(defUnit);
    }
View Full Code Here

TOP

Related Classes of mmrnmhrm.core.engine_client.DeeCompletionEngine.RefSearchCompletionProposal

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.