public KustoQuickInfoBuilder(KustoCodeService service, KustoCode code, QuickInfoOptions options) { _service = service; _code = code; _options = options; _disabled = new DisabledDiagnostics(_options.DisabledDiagnostics); }
public override QuickInfo GetQuickInfo(int position, QuickInfoOptions options = null, CancellationToken cancellationToken = default(CancellationToken)) { if (this.TryGetBoundCode(cancellationToken, true, out var code) && CanBeAnalyzed(code)) { // have try-catch to keep editor from crashing from parser bugs try { return(new KustoQuickInfoBuilder(this, code, options ?? QuickInfoOptions.Default).GetQuickInfo(position, cancellationToken)); } catch (Exception) { return(QuickInfo.Empty); } } else { if (this.codeException != null) { return(new QuickInfo(this.codeException.Message)); } return(QuickInfo.Empty); } }
public override QuickInfo GetQuickInfo(int position, QuickInfoOptions options, CancellationToken cancellationToken) { return(_service.GetQuickInfo(position - _offset, options, cancellationToken)); }
public override QuickInfo GetQuickInfo(int position, QuickInfoOptions options, CancellationToken cancellationToken) { return(QuickInfo.Empty); }
/// <summary> /// Gets the <see cref="QuickInfo"/> associated with the position within the text. /// </summary> /// <param name="position">The text position of the caret.</param> /// <param name="options">Any options specified for quick info.</param> /// <param name="cancellationToken">Optional cancellation token.</param> public abstract QuickInfo GetQuickInfo(int position, QuickInfoOptions options = null, CancellationToken cancellationToken = default(CancellationToken));