Package org.eclipse.jface.text.contentassist

Examples of org.eclipse.jface.text.contentassist.IContentAssistProcessor


   */
  protected ICompletionProposal[] getCompletionProposals(
      CommandLine commandLine, String project, String file, int offset)
    throws Exception
  {
    IContentAssistProcessor processor =
      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


        processors = new IContentAssistProcessor[] { phpCompletionProcessor };
      } else {
        IContentAssistProcessor[] superProcessors;
        if (partitionType.equals(ICSSPartitions.STYLE)
            || partitionType.equals(ICSSPartitions.COMMENT)) {
          IContentAssistProcessor processor = new CSSStructuredContentAssistProcessor(
              this.getContentAssistant(), partitionType,
              sourceViewer);
          superProcessors = new IContentAssistProcessor[] { processor };

        } else {
View Full Code Here

  IContextInformation[] computeContextInformation(ITextViewer viewer, int position) {
    fLastErrorMessage= null;

    IContextInformation[] result= null;

    IContentAssistProcessor p= getProcessor(viewer, position);
    if (p != null) {
      result= p.computeContextInformation(viewer, position);
      fLastErrorMessage= p.getErrorMessage();
    }

    return result;
  }
View Full Code Here

   * @return an validator
   *
   * @see IContentAssistProcessor#getContextInformationValidator
   */
  IContextInformationValidator getContextInformationValidator(ITextViewer textViewer, int offset) {
    IContentAssistProcessor p= getProcessor(textViewer, offset);
    return p != null ? p.getContextInformationValidator() : null;
  }
View Full Code Here

   * @return the auto activation characters
   *
   * @see IContentAssistProcessor#getCompletionProposalAutoActivationCharacters
   */
  private char[] getCompletionProposalAutoActivationCharacters(ITextViewer textViewer, int offset) {
    IContentAssistProcessor p= getProcessor(textViewer, offset);
    return p != null ? p.getCompletionProposalAutoActivationCharacters() : null;
  }
View Full Code Here

   * @return the auto activation characters
   *
   * @see IContentAssistProcessor#getContextInformationAutoActivationCharacters
   */
  private char[] getContextInformationAutoActivationCharacters(ITextViewer textViewer, int offset) {
    IContentAssistProcessor p= getProcessor(textViewer, offset);
    return p != null ? p.getContextInformationAutoActivationCharacters() : null;
  }
View Full Code Here

            public IReconciler getReconciler(ISourceViewer sourceViewer) {
                return null;
            }
            public IContentAssistant getContentAssistant(ISourceViewer sourceViewer) {
                ContentAssistant assistant = new ContentAssistant();
                IContentAssistProcessor completionProcessor = new GlobalCompletionProcessor();
                assistant.setContentAssistProcessor(
                    completionProcessor, IDocument.DEFAULT_CONTENT_TYPE);
                assistant.setProposalPopupOrientation(IContentAssistant.PROPOSAL_OVERLAY);
                return assistant;
            }
View Full Code Here

            public IReconciler getReconciler(ISourceViewer sourceViewer) {
                return null;
            }
            public IContentAssistant getContentAssistant(ISourceViewer sourceViewer) {
                ContentAssistant assistant = new ContentAssistant();
                IContentAssistProcessor completionProcessor = new ImportCompletionProcessor();
                assistant.setContentAssistProcessor(
                    completionProcessor, IDocument.DEFAULT_CONTENT_TYPE);
                assistant.setProposalPopupOrientation(IContentAssistant.PROPOSAL_OVERLAY);
                return assistant;
            }
View Full Code Here

                if (sb.toString().indexOf(e.character) < 0) {
                  stop();
                  return;
                }
              } else {
                IContentAssistProcessor processor = getContentAssistProcessor(type);
                if (computeAllAutoActivationTriggers(processor)
                    .indexOf(e.character) < 0) {
                  stop();
                  return;
                }
View Full Code Here

  public IContentAssistant getContentAssistant(ISourceViewer sourceViewer) {
    ContentAssistant assistant= new ContentAssistant();
    assistant.setDocumentPartitioning(getConfiguredDocumentPartitioning(sourceViewer));

    IContentAssistProcessor processor= new TextualCompletionProcessor();
    assistant.setContentAssistProcessor(processor, IDocument.DEFAULT_CONTENT_TYPE);
    assistant.setContentAssistProcessor(processor, XMLPartitionScanner.XML_TAG);

    assistant.setContextInformationPopupOrientation(IContentAssistant.CONTEXT_INFO_ABOVE);
    assistant.setInformationControlCreator(getInformationControlCreator(sourceViewer));
View Full Code Here

TOP

Related Classes of org.eclipse.jface.text.contentassist.IContentAssistProcessor

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.