Share via


IAsyncCompletionBroker2 Interface

Definition

public interface class IAsyncCompletionBroker2 : Microsoft::VisualStudio::Language::Intellisense::AsyncCompletion::IAsyncCompletionBroker
public interface IAsyncCompletionBroker2 : Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.IAsyncCompletionBroker
type IAsyncCompletionBroker2 = interface
    interface IAsyncCompletionBroker
Public Interface IAsyncCompletionBroker2
Implements IAsyncCompletionBroker
Implements

Methods

GetAggregatedCompletionContextAsync(ITextView, CompletionTrigger, SnapshotPoint, CancellationToken)

Requests CompletionContexts from applicable IAsyncCompletionSources and aggregates them. Does not trigger completion, does not raise events, does not open the completion GUI. The IAsyncCompletionSession which interacted with IAsyncCompletionSources is returned as InertSession and does not have full capabilities of IAsyncCompletionSession.

This method can be invoked from any thread, but it briefly switches to UI thread. Returns Empty when token is canceled.

(Inherited from IAsyncCompletionBroker)
GetSession(ITextView)

Returns IAsyncCompletionSession if there is one active in a given ITextView, or null if not.

(Inherited from IAsyncCompletionBroker)
IsCompletionActive(ITextView)

Returns whether IAsyncCompletionSession is active in given ITextView.

(Inherited from IAsyncCompletionBroker)
IsCompletionSupported(IContentType, ITextViewRoleSet)

Returns whether there are any completion item sources available for given IContentType and ITextViewRoleSet. This method should be called prior to calling TriggerCompletion(ITextView, CompletionTrigger, SnapshotPoint, CancellationToken) to avoid traversal of the buffer graph in cases where completion would be unavailable.

(Inherited from IAsyncCompletionBroker)
IsCompletionSupported(IContentType)

Returns whether there are any completion item sources available for given IContentType. In practice, availability of completion item sources also depends on the text view roles. See IsCompletionSupported(IContentType, ITextViewRoleSet).

(Inherited from IAsyncCompletionBroker)
TriggerCompletion(ITextView, CompletionTrigger, SnapshotPoint, CancellationToken)

Activates completion and returns IAsyncCompletionSession. If completion was already active, returns the existing session without changing it. Returns null when token is canceled, there are no participating IAsyncCompletionSources or completion is not applicable at the given triggerLocation. Must be invoked on UI thread. This does not cause the completion popup to appear. To compute available icons and display the UI, call OpenOrUpdate(CompletionTrigger, SnapshotPoint, CancellationToken). Invoke IsCompletionSupported(IContentType) prior to invoking this method to more efficiently verify whether feature is disabled or if there are no completion providers.

(Inherited from IAsyncCompletionBroker)
TriggerCompletion(ITextView, CompletionTrigger, SnapshotPoint, CompletionContext, CancellationToken)

Activates completion and returns IAsyncCompletionSession. The IAsyncCompletionSession will contain items supplied through context.

TriggerCompletion(ITextView, SnapshotPoint, Char, CancellationToken)

Activates completion and returns IAsyncCompletionSession. If completion was already active, returns the existing session without changing it. Must be invoked on UI thread. This does not cause the completion popup to appear. To compute available icons and display the UI, call OpenOrUpdate(InitialTrigger, SnapshotPoint, CancellationToken). Invoke IsCompletionSupported(IContentType) prior to invoking this method to more efficiently verify whether feature is disabled or if there are no completion providers.

(Inherited from IAsyncCompletionBroker)

Events

CompletionTriggered

Raised on UI thread when new IAsyncCompletionSession is triggered.

(Inherited from IAsyncCompletionBroker)

Applies to