Package org.eclipse.jface.text.contentassist

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


      if (p instanceof ICompletionProposalExtension2) {
        ICompletionProposalExtension2 e= (ICompletionProposalExtension2) p;
        e.apply(fViewer, trigger, stateMask, offset);
      } else if (p instanceof ICompletionProposalExtension) {
        ICompletionProposalExtension e= (ICompletionProposalExtension) p;
        e.apply(document, trigger, offset);
      } else {
        p.apply(document);
      }

      Point selection= p.getSelection(document);
      if (selection != null) {
        fViewer.setSelectedRange(selection.x, selection.y);
        fViewer.revealRange(selection.x, selection.y);
      }

      IContextInformation info= p.getContextInformation();
      if (info != null) {

        int position;
        if (p instanceof ICompletionProposalExtension) {
          ICompletionProposalExtension e= (ICompletionProposalExtension) p;
          position= e.getContextInformationPosition();
        } else {
          if (selection == null)
            selection= fViewer.getSelectedRange();
          position= selection.x + selection.y;
        }
View Full Code Here


    if (p instanceof ICompletionProposalExtension2) {
      ICompletionProposalExtension2 e= (ICompletionProposalExtension2) p;
      if (e.validate(document, offset, event))
        return true;
    } else if (p instanceof ICompletionProposalExtension) {
      ICompletionProposalExtension e= (ICompletionProposalExtension) p;
      if (e.isValidFor(document, offset))
        return true;
    }
    return false;
  }
View Full Code Here

          break;

        default:
          ICompletionProposal p= getSelectedProposal();
        if (p instanceof ICompletionProposalExtension) {
          ICompletionProposalExtension t= (ICompletionProposalExtension) p;
          char[] triggers= t.getTriggerCharacters();
          if (contains(triggers, key)) {
            hide();
            if (key == ';') {
              e.doit= true;
              insertProposal(p, (char) 0, e.stateMask, fViewer.getSelectedRange().x);
View Full Code Here

        if (p.validate(document, offset, event))
          filtered.add(p);

      } else if (proposals[i] instanceof ICompletionProposalExtension) {

        ICompletionProposalExtension p= (ICompletionProposalExtension) proposals[i];
        if (p.isValidFor(document, offset))
          filtered.add(p);

      } else {
        // restore original behavior
        fInvocationOffset= offset;
View Full Code Here

      if (p instanceof ICompletionProposalExtension2) {
        ICompletionProposalExtension2 e= (ICompletionProposalExtension2) p;
        e.apply(fViewer, trigger, stateMask, offset);
      } else if (p instanceof ICompletionProposalExtension) {
        ICompletionProposalExtension e= (ICompletionProposalExtension) p;
        e.apply(document, trigger, offset);
      } else {
        p.apply(document);
      }

      Point selection= p.getSelection(document);
      if (selection != null) {
        fViewer.setSelectedRange(selection.x, selection.y);
        fViewer.revealRange(selection.x, selection.y);
      }

      IContextInformation info= p.getContextInformation();
      if (info != null) {

        int position;
        if (p instanceof ICompletionProposalExtension) {
          ICompletionProposalExtension e= (ICompletionProposalExtension) p;
          position= e.getContextInformationPosition();
        } else {
          if (selection == null)
            selection= fViewer.getSelectedRange();
          position= selection.x + selection.y;
        }
View Full Code Here

    if (p instanceof ICompletionProposalExtension2) {
      ICompletionProposalExtension2 e= (ICompletionProposalExtension2) p;
      if (e.validate(document, offset, event))
        return true;
    } else if (p instanceof ICompletionProposalExtension) {
      ICompletionProposalExtension e= (ICompletionProposalExtension) p;
      if (e.isValidFor(document, offset))
        return true;
    }
    return false;
  }
View Full Code Here

          break;

        default:
          ICompletionProposal p= getSelectedProposal();
        if (p instanceof ICompletionProposalExtension) {
          ICompletionProposalExtension t= (ICompletionProposalExtension) p;
          char[] triggers= t.getTriggerCharacters();
          if (contains(triggers, key)) {
            hide();
            e.doit= false;
            insertProposal(p, key, e.stateMask, fViewer.getSelectedRange().x);
          }
View Full Code Here

        if (p.validate(document, offset, event))
          filtered.add(p);

      } else if (proposals[i] instanceof ICompletionProposalExtension) {

        ICompletionProposalExtension p= (ICompletionProposalExtension) proposals[i];
        if (p.isValidFor(document, offset))
          filtered.add(p);

      } else {
        // restore original behavior
        fInvocationOffset= offset;
View Full Code Here

TOP

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

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.