Examples of IContentAssistProcessor


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

   *   org.eclipse.jface.text.source.ISourceViewer, java.lang.String)
   */
  protected IContentAssistProcessor[] getContentAssistProcessors(
      ISourceViewer sourceViewer, String partitionType) {
   
    IContentAssistProcessor processor = new JSPStructuredContentAssistProcessor(
        this.getContentAssistant(), partitionType, sourceViewer);
    return new IContentAssistProcessor[]{processor};
  }
View Full Code Here

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

   *            the partition type for which the content assist processors
   *            are applicable
   * @return IContentAssistProcessors or null if should not be supported
   */
  protected IContentAssistProcessor[] getContentAssistProcessors(ISourceViewer sourceViewer, String partitionType) {
    IContentAssistProcessor processor = new StructuredContentAssistProcessor(
        fContentAssistant, partitionType, sourceViewer, null);
    return new IContentAssistProcessor[]{processor};
  }
View Full Code Here

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

    if (isFirstPage() && getLegacyExtendedContentAssistProcessors() != null &&
        !getLegacyExtendedContentAssistProcessors().isEmpty()) {
     
      Iterator iter = getLegacyExtendedContentAssistProcessors().iterator();
      while (iter.hasNext()) {
        IContentAssistProcessor legacyProcessor = (IContentAssistProcessor) iter.next();
        ICompletionProposal[] legacyComputed = legacyProcessor.computeCompletionProposals(viewer, offset);
        if (legacyComputed != null) {
          proposals.addAll(Arrays.asList(legacyComputed));
        }
      }
    }
View Full Code Here

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

    if (getLegacyExtendedContentAssistProcessors() != null &&
        !getLegacyExtendedContentAssistProcessors().isEmpty()) {
     
      Iterator iter = getLegacyExtendedContentAssistProcessors().iterator();
      while (iter.hasNext()) {
        IContentAssistProcessor legacyProcessor = (IContentAssistProcessor) iter.next();
        IContextInformation[] legacyComputed = legacyProcessor.computeContextInformation(viewer, offset);
        if(legacyComputed != null) {
          proposals.addAll(Arrays.asList(legacyComputed));
        }
      }
    }
View Full Code Here

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

  protected void initPartitionToProcessorMap() {
    fPartitionToProcessorMap = new HashMap();
    HTMLContentAssistProcessor htmlProcessor = new HTMLContentAssistProcessor();
    JSPJavaContentAssistProcessor jspJavaProcessor = new JSPJavaContentAssistProcessor();
    XMLContentAssistProcessor xmlProcessor = new XMLContentAssistProcessor();
    IContentAssistProcessor javascriptProcessor = getJSContentAssistProcessor();

    fPartitionToProcessorMap.put(IHTMLPartitions.HTML_DEFAULT, htmlProcessor);
    fPartitionToProcessorMap.put(IXMLPartitions.XML_DEFAULT, xmlProcessor);
    fPartitionToProcessorMap.put(IStructuredPartitions.DEFAULT_PARTITION, htmlProcessor);
    fPartitionToProcessorMap.put(IJSPPartitions.JSP_DEFAULT, jspJavaProcessor);
View Full Code Here

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

          return getJSPJavaCompletionProposals(viewer, documentPosition);
        return EMPTY_PROPOSAL_SET;
      }
    }

    IContentAssistProcessor p = (IContentAssistProcessor) fPartitionToProcessorMap.get(partitionType);
    if (p != null) {
      embeddedResults = p.computeCompletionProposals(viewer, documentPosition);
      // get bean methods, objects, and constants if there are any...
      if (partitionType == IJSPPartitions.JSP_CONTENT_JAVASCRIPT || partitionType == IHTMLPartitions.SCRIPT) {
        ICompletionProposal[] beanResults = getJSPJavaBeanProposals(viewer, documentPosition);
        if (beanResults != null && beanResults.length > 0) {
          ICompletionProposal[] added = new ICompletionProposal[beanResults.length + embeddedResults.length];
View Full Code Here

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

   * @param documentPosition
   * @return ICompletionProposal[]
   */
  private ICompletionProposal[] getHTMLCompletionProposals(ITextViewer viewer, int documentPosition) {

    IContentAssistProcessor p = (IContentAssistProcessor) fPartitionToProcessorMap.get(IHTMLPartitions.HTML_DEFAULT);
    return p.computeCompletionProposals(viewer, documentPosition);
  }
View Full Code Here

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

    return super.getContextInformationAutoActivationCharacters();
  }


  public char[] getCompletionProposalAutoActivationCharacters() {
    IContentAssistProcessor p = (IContentAssistProcessor) fPartitionToProcessorMap.get(IHTMLPartitions.HTML_DEFAULT);
    return p.getCompletionProposalAutoActivationCharacters();
  }
View Full Code Here

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

   * @param partitionType
   * @return
   */
  private CompoundContentAssistProcessor getExistingContentAssistProcessor(String partitionType) {
    CompoundContentAssistProcessor compoundContentAssistProcessor = null;
    IContentAssistProcessor processor = super.getContentAssistProcessor(partitionType);
    if (processor != null) {
      if (processor instanceof CompoundContentAssistProcessor) {
        compoundContentAssistProcessor = (CompoundContentAssistProcessor) processor;
      }
    }
View Full Code Here

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

   *   org.eclipse.jface.text.source.ISourceViewer, java.lang.String)
   */
  protected IContentAssistProcessor[] getContentAssistProcessors(
      ISourceViewer sourceViewer, String partitionType) {
   
    IContentAssistProcessor processor = new JSPStructuredContentAssistProcessor(
        this.getContentAssistant(), partitionType, sourceViewer);
    return new IContentAssistProcessor[]{processor};
  }
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.