public Task <bool> HasSuggestedActionsAsync(ISuggestedActionCategorySet requestedActionCategories, SnapshotSpan range, CancellationToken cancellationToken) { if (TextView != null && !TextView.Caret.InVirtualSpace) { var rPosition = TextView.MapDownToR(TextView.Caret.Position.BufferPosition); if (rPosition.HasValue && SuggestedActionProviders.Any(actionProvider => actionProvider.HasSuggestedActions(TextView, TextBuffer, rPosition.Value.Position))) { return(Task.FromResult(true)); } } return(Task.FromResult(false)); }
public Task <bool> HasSuggestedActionsAsync(ISuggestedActionCategorySet requestedActionCategories, SnapshotSpan range, CancellationToken cancellationToken) => Task.FromResult( TextView != null && SuggestedActionProviders.Any(a => a.HasSuggestedActions(TextView, TextBuffer, PositionFromRange(range))));