public override async Task ProduceCompletionListAsync(CompletionListContext context) { var items = await this.GetItemsAsync(context.Document, context.Position, context.TriggerInfo, context.CancellationToken).ConfigureAwait(false); var builder = await this.GetBuilderAsync(context.Document, context.Position, context.TriggerInfo, context.CancellationToken).ConfigureAwait(false); if (items == null && builder == null) { return; } if (items != null) { foreach (var item in items) { context.AddItem(item); } } if (builder != null) { context.RegisterBuilder(builder); } var isExclusive = await this.IsExclusiveAsync(context.Document, context.Position, context.TriggerInfo, context.CancellationToken).ConfigureAwait(false); context.MakeExclusive(isExclusive); }
public override async Task ProduceCompletionListAsync(CompletionListContext context) { var items = await this.GetItemsAsync(context.Document, context.Position, context.TriggerInfo, context.CancellationToken).ConfigureAwait(false); var builder = await this.GetBuilderAsync(context.Document, context.Position, context.TriggerInfo, context.CancellationToken).ConfigureAwait(false); if (items == null && builder == null) { return; } if (items != null) { foreach (var item in items) { context.AddItem(item); } } if (builder != null) { context.RegisterBuilder(builder); } var isExclusive = await this.IsExclusiveAsync(context.Document, context.Position, context.TriggerInfo, context.CancellationToken).ConfigureAwait(false); context.MakeExclusive(isExclusive); }
public override async Task ProduceCompletionListAsync(CompletionListContext context) { var document = context.Document; var position = context.Position; var triggerInfo = context.TriggerInfo; var options = context.Options; var cancellationToken = context.CancellationToken; CompletionItem builder; if (options.GetOption(CompletionOptions.AlwaysShowBuilder)) { var text = await document.GetTextAsync(cancellationToken).ConfigureAwait(false); builder = this.CreateEmptyBuilder(text, position); } else { builder = await this.GetBuilderAsync(document, position, triggerInfo, cancellationToken).ConfigureAwait(false); } if (builder != null) { context.RegisterBuilder(builder); } }
public override async Task ProduceCompletionListAsync(CompletionListContext context) { var builder = await this.GetBuilderAsync(context.Document, context.Position, context.TriggerInfo, context.CancellationToken).ConfigureAwait(false); if (builder != null) { context.RegisterBuilder(builder); } }
public override async Task ProduceCompletionListAsync(CompletionListContext context) { var builder = await this.GetBuilderAsync(context.Document, context.Position, context.TriggerInfo, context.CancellationToken).ConfigureAwait(false); if (builder != null) { context.RegisterBuilder(builder); } }
public override async Task ProduceCompletionListAsync(CompletionListContext context) { var document = context.Document; var position = context.Position; var triggerInfo = context.TriggerInfo; var options = context.Options; var cancellationToken = context.CancellationToken; CompletionItem builder; if (options.GetOption(CompletionOptions.AlwaysShowBuilder)) { var text = await document.GetTextAsync(cancellationToken).ConfigureAwait(false); builder = this.CreateEmptyBuilder(text, position); } else { builder = await this.GetBuilderAsync(document, position, triggerInfo, cancellationToken).ConfigureAwait(false); } if (builder != null) { context.RegisterBuilder(builder); } }