Package org.eclipse.jface.text.contentassist

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


    return reconciler;
  }
 
  public IContentAssistant getContentAssistant(ISourceViewer sourceViewer) {

    ContentAssistant assistant = new ContentAssistant();
    assistant.setContentAssistProcessor(
      new MaudeCompletionProcessor(),
      IDocument.DEFAULT_CONTENT_TYPE);

    assistant.enableAutoActivation(true);
    assistant.setAutoActivationDelay(500);
    assistant.setProposalPopupOrientation(
      IContentAssistant.PROPOSAL_OVERLAY);
    return assistant;
  }
View Full Code Here


    return reconciler;
  }
 
  public IContentAssistant getContentAssistant(ISourceViewer sourceViewer) {

    ContentAssistant assistant = new ContentAssistant();
    assistant.setContentAssistProcessor(
      new MaudeCompletionProcessor(),
      IDocument.DEFAULT_CONTENT_TYPE);

    assistant.enableAutoActivation(true);
    assistant.setAutoActivationDelay(500);
    assistant.setProposalPopupOrientation(
      IContentAssistant.PROPOSAL_OVERLAY);
    return assistant;
  }
View Full Code Here

   
    IFile file = (IFile) sourceModule.getResource();
    editor = CommonDeeUITest.openDeeEditorForFile(file);
    sourceModule.discardWorkingCopy(); // XXX: In the future this might not be necessary
   
    ContentAssistant ca = ContentAssistUI_CommonTest.getContentAssistant(editor);
    ca.enableAutoInsert(false);
    ca.enablePrefixCompletion(false);
    SWTTestUtils.________________clearEventQueue________________();
  }
View Full Code Here

  }
 
  public void testComputeProposalsWithRepLen(int offset, int prefixLen, int repLen,
    String... expectedResults) throws NoSuchFieldException {
   
    ContentAssistant ca = ContentAssistUI_CommonTest.getContentAssistant(editor);
    ReflectionUtils.invokeMethod(ca, "hide"); //ca.hide();
    SWTTestUtils.________________clearEventQueue________________();
   
    ContentAssistUI_CommonTest.invokeContentAssist(editor, offset);
   
View Full Code Here

   
    assertTrue(caWatcher.active == false); // Assert content Assist closed
  }
 
  protected CompletionWatcher setupAndActivateContentAssist(ISourceViewer viewer, int ccOffset) {
    ContentAssistant ca = getContentAssistant(editor);
    CompletionWatcher caWatcher = new CompletionWatcher();
    ca.addCompletionListener(caWatcher);
   
    viewer.revealRange(ccOffset, 10);
    invokeContentAssist(editor, ccOffset);
    assertTrue(caWatcher.active == true);
    return caWatcher;
View Full Code Here

    ISourceViewer viewer = editor.getViewer();
   
    int ccOffset = getMarkerStartPos("/+@CC.I+/");
    viewer.setSelectedRange(ccOffset, 0);
   
    ContentAssistant ca = getContentAssistant(editor);
    CompletionWatcher caWatcher = setupAndActivateContentAssist(viewer, ccOffset);
   
    ICompletionProposal[] proposals;
    proposals = getProposals(ca);
    CompareDefUnits.checkResults(/*1,*/
View Full Code Here

    new CompletionEngine_Test() {
      { this.srcModule = ContentAssist_ProposalTest.this.srcModule; }
     
      @Override
      protected void testCompletionEngine(int offset, int rplLen) throws ModelException {
        ContentAssistant ca = getContentAssistant(editor);
       
        DeeCodeCompletionProcessor caProcessor = new DeeCodeCompletionProcessor(editor, ca, DeePartitions.DEE_CODE);
        ICompletionProposal[] proposals = caProcessor.computeCompletionProposals(editor.getViewer(), offset);
       
        for (ICompletionProposal completionProposal : proposals) {
View Full Code Here

        return reconciler;
    }

    public IContentAssistant getContentAssistant(ISourceViewer sourceViewer) {
        // Create content assistant
        ContentAssistant assistant = new ContentAssistant();

        // required to display additional info
        assistant.setInformationControlCreator(new IInformationControlCreator() {
            public IInformationControl createInformationControl(Shell parent) {
                return new DefaultInformationControl(parent);
            }
        });

        processor.setFile(file);
        // Set this processor for each supported content type
        assistant.setContentAssistProcessor(processor, XMLPartitionScanner.XML_TAG);
        assistant.setContentAssistProcessor(processor, XMLPartitionScanner.XML_DEFAULT);
        assistant.setContentAssistProcessor(processor, IDocument.DEFAULT_CONTENT_TYPE);

        // Return the content assistant
        return assistant;
    }
View Full Code Here

          getReconcilingStrategy(sourceViewer), true);
    return reconciler;
  }

  public IContentAssistant getContentAssistant(ISourceViewer sourceViewer) {
    ContentAssistant assistant = new ContentAssistant();
    assistant.setContentAssistProcessor(new QVTCompletionProcessor(
        getReconcilingStrategy(sourceViewer)),
        IDocument.DEFAULT_CONTENT_TYPE);
    assistant.enableAutoActivation(true);
    assistant.setAutoActivationDelay(500);
    assistant
        .setProposalPopupOrientation(IContentAssistant.PROPOSAL_OVERLAY);
    assistant
        .setInformationControlCreator(getInformationControlCreator(sourceViewer));
    assistant.setShowEmptyList(true);

    return assistant;
  }
View Full Code Here

    reconciler.setRepairer(ndr, partition);
  }

  public IContentAssistant getContentAssistant(ISourceViewer sourceViewer)
  {
    ContentAssistant assistant = new ContentAssistant();
    assistant.setContentAssistProcessor(createCompletionProcessor(),
        IDocument.DEFAULT_CONTENT_TYPE);

    assistant.enableAutoActivation(true);
    assistant.setAutoActivationDelay(500);
    assistant
        .setProposalPopupOrientation(IContentAssistant.PROPOSAL_OVERLAY);
    assistant
        .setContextInformationPopupOrientation(IContentAssistant.CONTEXT_INFO_ABOVE);

    return assistant;
  }
View Full Code Here

TOP

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

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.