Examples of computeCompletionProposals()


Examples of org.eclipse.jface.text.contentassist.IContentAssistProcessor.computeCompletionProposals()

    List ret = new LinkedList();
    for (Iterator it = fProcessors.iterator(); it.hasNext();) {
      IContentAssistProcessor p = (IContentAssistProcessor) it.next();
      try {
        // isolate calls to each processor
        ICompletionProposal[] proposals = p.computeCompletionProposals(viewer, documentOffset);
        if (proposals != null && proposals.length > 0) {
          ret.addAll(Arrays.asList(proposals));
          fErrorMessage = null; // Hide previous errors
        }
        else {
View Full Code Here

Examples of org.eclipse.jface.text.contentassist.IContentAssistProcessor.computeCompletionProposals()

    IContentAssistProcessor p = null;
    ICompletionProposal[] results = EMPTY_PROPOSAL_SET;

    p = guessContentAssistProcessor(viewer, documentOffset);
    if (p != null) {
      results = p.computeCompletionProposals(viewer, documentOffset);
    }

    return (results != null) ? results : EMPTY_PROPOSAL_SET;
  }
View Full Code Here

Examples of org.eclipse.jface.text.contentassist.IContentAssistProcessor.computeCompletionProposals()

      viewer.setDocument(model.getStructuredDocument());
      // note: non-zero length can break html completion.
      viewer.setSelectedRange(offset, 0);

      ICompletionProposal[] proposals =
        processor.computeCompletionProposals(viewer, offset);
      model.releaseFromRead();
      return proposals;
    }
    return new ICompletionProposal[0];
  }
View Full Code Here

Examples of org.eclipse.jface.text.contentassist.IContentAssistProcessor.computeCompletionProposals()

      getContentAssistProcessor(commandLine, project, file);

    ITextViewer viewer = getTextViewer(commandLine, project, file);

    if (processor != null && viewer != null){
      return processor.computeCompletionProposals(viewer, offset);
    }
    return new ICompletionProposal[0];
  }

  /**
 
View Full Code Here

Examples of org.eclipse.jface.text.contentassist.IContentAssistProcessor.computeCompletionProposals()

      return new ICompletionProposal[0];
    }
    IContentAssistProcessor processor = contentAssistant
        .getContentAssistProcessor(contentType);
    if (processor != null) {
      return processor.computeCompletionProposals(sourceViewer,
          cursorPosition);
    }
    return new ICompletionProposal[0];
  }
View Full Code Here

Examples of org.eclipse.wst.sse.ui.contentassist.ICompletionProposalComputer.computeCompletionProposals()

        ICompletionProposalComputer computer = getComputer(true);
        if (computer != null) {
          try {
            PerformanceStats stats= startMeter(context, computer);
            //ask the computer for the proposals
            List proposals = computer.computeCompletionProposals(context, monitor);
            stopMeter(stats, COMPUTE_COMPLETION_PROPOSALS);
   
            if (proposals != null) {
              fLastError = computer.getErrorMessage();
              completionProposals = proposals;
View Full Code Here

Examples of org.eclipse.wst.sse.ui.internal.contentassist.CompletionProposalCategory.computeCompletionProposals()

  private List collectProposals(ITextViewer viewer, int offset, IProgressMonitor monitor, CompletionProposalInvocationContext context) {
    List proposals = new ArrayList();
    List categories = getCategories();
    for (Iterator it = categories.iterator(); it.hasNext();) {
      CompletionProposalCategory cat = (CompletionProposalCategory) it.next();
      List computed = cat.computeCompletionProposals(context, this.fContentTypeID, this.fPartitionTypeID, new SubProgressMonitor(monitor, 1));
      proposals.addAll(computed);
      if (fErrorMessage == null) {
        fErrorMessage= cat.getErrorMessage();
      }
    }
View Full Code Here

Examples of org.eclipse.wst.sse.ui.internal.contentassist.CompletionProposalCategory.computeCompletionProposals()

    List proposals = new ArrayList();
    List categories = getCategories();
    for (Iterator it = categories.iterator(); it.hasNext();) {
      CompletionProposalCategory cat = (CompletionProposalCategory) it.next();
      //Add custom component in the list, such as jsp:usebean,t:actionlink
      List computed = cat.computeCompletionProposals(context, this.fContentTypeID, this.fPartitionTypeID, new SubProgressMonitor(monitor, 1));
      proposals.addAll(computed);
      if (fErrorMessage == null) {
        fErrorMessage= cat.getErrorMessage();
      }
    }
View Full Code Here

Examples of org.erlide.ui.templates.ErlTemplateCompletionProcessor.computeCompletionProposals()

                final CompletionOptions options = computeOptions(before, offset);
                final List<ICompletionProposal> result = addCompletions(options);
                final ErlTemplateCompletionProcessor t = new ErlTemplateCompletionProcessor(
                        doc, offset - options.text.length(), options.text.length());
                result.addAll(Arrays.asList(t.computeCompletionProposals(viewer, offset)));
                oldSuggestions = result.size();
                if (result.isEmpty()) {
                    ErlLogger.debug("no results");
                    return getNoCompletion(offset);
                }
View Full Code Here

Examples of org.jboss.ide.eclipse.freemarker.editor.CompletionProcessor.computeCompletionProposals()

    assertTrue(part instanceof FreemarkerMultiPageEditor);
    FreemarkerMultiPageEditor editor = (FreemarkerMultiPageEditor)part;
    CompletionProcessor proc = new CompletionProcessor(editor.getEditor());
    IFindReplaceTarget find = (IFindReplaceTarget)editor.getAdapter(IFindReplaceTarget.class);
    int pos = find.findAndSelect(0, "<#", true, false, false); //$NON-NLS-1$
    ICompletionProposal[] proposals = proc.computeCompletionProposals(editor.getEditor().getTextViewer(),pos+2);
    assertTrue(proposals.length>0);

    pos = find.findAndSelect(0, "label(componentProperty.name)", true, false, false); //$NON-NLS-1$
    proposals = proc.computeCompletionProposals(editor.getEditor().getTextViewer(),pos);
    assertTrue(proposals.length>0);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.