Beispiel #1
0
 internal CompletionAnalysis(IServiceProvider serviceProvider, ITextView view, ITrackingSpan span, ITextBuffer textBuffer, CompletionOptions options) {
     _view = view;
     _span = span;
     _serviceProvider = serviceProvider;
     _textBuffer = textBuffer;
     _options = (options == null) ? new CompletionOptions() : options.Clone();
 }
Beispiel #2
0
 internal CompletionAnalysis(IServiceProvider serviceProvider, ITextView view, ITrackingSpan span, ITextBuffer textBuffer, CompletionOptions options)
 {
     _view            = view;
     _span            = span;
     _serviceProvider = serviceProvider;
     _textBuffer      = textBuffer;
     _options         = (options == null) ? new CompletionOptions() : options.Clone();
 }
Beispiel #3
0
 internal CompletionAnalysis(PythonEditorServices services, ICompletionSession session, ITextView view, ITrackingSpan span, ITextBuffer textBuffer, CompletionOptions options)
 {
     _session    = session;
     _view       = view;
     _span       = span;
     _services   = services;
     _textBuffer = textBuffer;
     _options    = (options == null) ? new CompletionOptions() : options.Clone();
 }
Beispiel #4
0
 internal CompletionAnalysis(PythonEditorServices services, ICompletionSession session, ITextView view, ITextSnapshot snapshot, ITrackingPoint point, CompletionOptions options)
 {
     _session    = session;
     _view       = view;
     _services   = services;
     _snapshot   = snapshot;
     _textBuffer = snapshot?.TextBuffer;
     _point      = point;
     _options    = options == null ? new CompletionOptions() : options.Clone();
 }
Beispiel #5
0
        private static CompletionAnalysis GetNormalCompletionContext(IServiceProvider serviceProvider, ITextSnapshot snapshot, ITrackingSpan applicableSpan, ITrackingPoint point, CompletionOptions options) {
            var span = applicableSpan.GetSpan(snapshot);

            if (IsSpaceCompletion(snapshot, point) && !IntellisenseController.ForceCompletions) {
                return CompletionAnalysis.EmptyCompletionContext;
            }

            var parser = new ReverseExpressionParser(snapshot, snapshot.TextBuffer, applicableSpan);
            if (parser.IsInGrouping()) {
                options = options.Clone();
                options.IncludeStatementKeywords = false;
            }

            return new NormalCompletionAnalysis(
                snapshot.TextBuffer.GetAnalyzer(serviceProvider),
                snapshot,
                applicableSpan,
                snapshot.TextBuffer,
                options,
                serviceProvider
            );
        }
Beispiel #6
0
 internal CompletionAnalysis(ITrackingSpan span, ITextBuffer textBuffer, CompletionOptions options) {
     _span = span;
     _textBuffer = textBuffer;
     _options = (options == null) ? new CompletionOptions() : options.Clone();
 }
Beispiel #7
0
 internal CompletionAnalysis(ITrackingSpan span, ITextBuffer textBuffer, CompletionOptions options)
 {
     _span       = span;
     _textBuffer = textBuffer;
     _options    = (options == null) ? new CompletionOptions() : options.Clone();
 }