Package at.bestsolution.efxclipse.text.jface

Examples of at.bestsolution.efxclipse.text.jface.IEditingSupportRegistry


      if (target != null)
        target.beginCompoundChange();

      if (viewer instanceof IEditingSupportRegistry) {
        IEditingSupportRegistry registry= (IEditingSupportRegistry) viewer;
        registry.register(helper);
      }


      if (p instanceof ICompletionProposalExtension2 && viewer != null) {
        ICompletionProposalExtension2 e= (ICompletionProposalExtension2) p;
        e.apply(viewer, trigger, stateMask, offset);
      } else if (p instanceof ICompletionProposalExtension) {
        ICompletionProposalExtension e= (ICompletionProposalExtension) p;
        e.apply(document, trigger, offset);
      } else {
        p.apply(document);
      }
      fireAppliedEvent(p);

      TextSelection selection= p.getSelection(document);
      if (selection != null) {
        contentAssistSubjectControlAdapter.setSelectedRange(selection.offset, selection.length);
        contentAssistSubjectControlAdapter.revealRange(selection.offset, selection.length);
      }

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

        int contextInformationOffset;
        if (p instanceof ICompletionProposalExtension) {
          ICompletionProposalExtension e= (ICompletionProposalExtension) p;
          contextInformationOffset= e.getContextInformationPosition();
        } else {
          if (selection == null)
            selection= contentAssistSubjectControlAdapter.getSelectedRange();
          contextInformationOffset= selection.offset + selection.length;
        }

        contentAssistant.showContextInformation(info, contextInformationOffset);
      } else
        contentAssistant.showContextInformation(null, -1);
     
    } finally {
      if (target != null)
        target.endCompoundChange();

      if (viewer instanceof IEditingSupportRegistry) {
        IEditingSupportRegistry registry= (IEditingSupportRegistry) viewer;
        registry.unregister(helper);
      }
      inserting= false;
    }
  }
View Full Code Here

TOP

Related Classes of at.bestsolution.efxclipse.text.jface.IEditingSupportRegistry

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.