Package org.eclipse.wst.sse.ui.internal.contentassist

Examples of org.eclipse.wst.sse.ui.internal.contentassist.CompletionProposalCategory


   */
  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();
      }
    }
   
    // if default page
    // Deal with adding in proposals from processors added through the legacy extension
View Full Code Here


    List proposals = new ArrayList();
    CompletionProposalInvocationContext context= createContext(viewer, offset);

    List providers= getCategories();
    for (Iterator it= providers.iterator(); it.hasNext();) {
      CompletionProposalCategory cat= (CompletionProposalCategory) it.next();
      List computed= cat.computeContextInformation(context, this.fContentTypeID, this.fPartitionTypeID, new SubProgressMonitor(monitor, 1));
      proposals.addAll(computed);
      if (fErrorMessage == null) {
        fErrorMessage= cat.getErrorMessage();
      }
    }
   
    // Deal with adding in contexts from processors added through the legacy extension
    if (getLegacyExtendedContentAssistProcessors() != null &&
View Full Code Here

   */
  private List getCategoryIteration() {
    List sequence= new ArrayList();
    sequence.add(getDefaultCategories());
    for (Iterator it= getSortedOwnPageCategories().iterator(); it.hasNext();) {
      CompletionProposalCategory cat= (CompletionProposalCategory) it.next();
      sequence.add(Collections.singletonList(cat));
    }
    return sequence;
  }
View Full Code Here

   */
  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();
      //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();
      }
    }
   
    // if default page
    // Deal with adding in proposals from processors added through the legacy extension
View Full Code Here

    List proposals = new ArrayList();
    CompletionProposalInvocationContext context= createContext(viewer, offset);

    List providers= getCategories();
    for (Iterator it= providers.iterator(); it.hasNext();) {
      CompletionProposalCategory cat= (CompletionProposalCategory) it.next();
      List computed= cat.computeContextInformation(context, this.fContentTypeID, this.fPartitionTypeID, new SubProgressMonitor(monitor, 1));
      proposals.addAll(computed);
      if (fErrorMessage == null) {
        fErrorMessage= cat.getErrorMessage();
      }
    }
   
    // Deal with adding in contexts from processors added through the legacy extension
    if (getLegacyExtendedContentAssistProcessors() != null &&
View Full Code Here

   */
  private List getCategoryIteration() {
    List sequence= new ArrayList();
    sequence.add(getDefaultCategories());
    for (Iterator it= getSortedOwnPageCategories().iterator(); it.hasNext();) {
      CompletionProposalCategory cat= (CompletionProposalCategory) it.next();
      sequence.add(Collections.singletonList(cat));
    }
    return sequence;
  }
View Full Code Here

   * @return the default {@link CompletionProposalCategory}s
   */
  private List getDefaultCategoriesUnchecked() {
    List included = new ArrayList();
    for (Iterator it = getProposalCategories().iterator(); it.hasNext();) {
      CompletionProposalCategory category = (CompletionProposalCategory) it.next();
      if (category.isIncludedOnDefaultPage(this.fContentTypeID) && category.hasComputers(fContentTypeID, fPartitionTypeID))
        included.add(category);
    }
    return included;
  }
View Full Code Here

   * should be displayed on their own content assist page
   */
  private List getSortedOwnPageCategories() {
    ArrayList sorted= new ArrayList();
    for (Iterator it= getProposalCategories().iterator(); it.hasNext();) {
      CompletionProposalCategory category= (CompletionProposalCategory) it.next();
      if (category.isDisplayedOnOwnPage(this.fContentTypeID) &&
          category.hasComputers(fContentTypeID, fPartitionTypeID)) {
       
        sorted.add(category);
      }
    }
    Collections.sort(sorted, PAGE_ORDER_COMPARATOR);
View Full Code Here

        KeySequence binding= getIterationBinding();
 
        // This may show the warning dialog if all categories are disabled
        resetCategoryIteration();
        for (Iterator it= StructuredContentAssistProcessor.this.getProposalCategories().iterator(); it.hasNext();) {
          CompletionProposalCategory cat= (CompletionProposalCategory) it.next();
          cat.sessionStarted();
        }
 
        fRepetition= 0;
        if (event.assistant instanceof IContentAssistantExtension2) {
          IContentAssistantExtension2 extension= (IContentAssistantExtension2) event.assistant;
View Full Code Here

     * @see org.eclipse.jface.text.contentassist.ICompletionListener#assistSessionEnded(org.eclipse.jface.text.contentassist.ContentAssistEvent)
     */
    public void assistSessionEnded(ContentAssistEvent event) {
      if (event.processor == StructuredContentAssistProcessor.this ||  (event.processor instanceof CompoundContentAssistProcessor && ((CompoundContentAssistProcessor)event.processor).containsProcessor(StructuredContentAssistProcessor.this))) {
        for (Iterator it= StructuredContentAssistProcessor.this.getProposalCategories().iterator(); it.hasNext();) {
          CompletionProposalCategory cat= (CompletionProposalCategory) it.next();
          cat.sessionEnded();
        }
 
        fCategoryIteration= null;
        fRepetition= -1;
        fIterationGesture= null;
View Full Code Here

TOP

Related Classes of org.eclipse.wst.sse.ui.internal.contentassist.CompletionProposalCategory

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.