コード例 #1
0
 public bool TryCreateContext(ITextView textView, SnapshotPoint openingPoint, char openingBrace, char closingBrace, out IBraceCompletionContext context)
 {
     // if we are in a comment or string literal we cannot begin a completion session.
     if (IsValidBraceCompletionContext(openingPoint))
     {
         context = new BraceCompletionContext(SmartIndentationService, TextBufferUndoManagerProvider, ClassificationService, OptionsService);
         return(true);
     }
     else
     {
         context = null;
         return(false);
     }
 }
コード例 #2
0
 public bool TryCreateContext(ITextView textView, SnapshotPoint openingPoint, char openingBrace, char closingBrace, out IBraceCompletionContext context)
 {
     // if we are in a comment or string literal we cannot begin a completion session.
     if (IsValidBraceCompletionContext(openingPoint))
     {
         context = new BraceCompletionContext(SmartIndentationService, TextBufferUndoManagerProvider, ClassificationService, OptionsService);
         return true;
     }
     else
     {
         context = null;
         return false;
     }
 }