Ejemplo n.º 1
0
        public bool IsCompletionTriggerCharacter(int position)
        {
            var text = GetCurrentDocument().GetText();

            return(_completionService.IsTriggerCharacter(text, position,
                                                         _completionService.GetDefaultCompletionProviders()));
        }
Ejemplo n.º 2
0
        public bool IsCompletionTriggerCharacter(int position)
        {
            var currentScriptText   = CurrentScript.GetText();
            var completionProviders = _completionService.GetDefaultCompletionProviders();

            return(_completionService.IsTriggerCharacter(currentScriptText, position, completionProviders));
        }
Ejemplo n.º 3
0
        private bool IsTextualTriggerCharacter(ICompletionService completionService, char ch, OptionSet options)
        {
            AssertIsForeground();

            // Note: When this function is called we've already guaranteed that
            // TypeCharWasHandledStrangely returned false.  That means we know that the caret is in
            // our buffer, and is after the character just typed.

            var previousPosition = this.TextView.GetCaretPoint(this.SubjectBuffer).Value - 1;

            Contract.ThrowIfFalse(this.SubjectBuffer.CurrentSnapshot[previousPosition] == ch);

            return(completionService.IsTriggerCharacter(previousPosition.Snapshot.AsText(), previousPosition, GetCompletionProviders(), options));
        }