IAsyncCompletionCommitManager2 Interface
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Represents a class that provides means to handle typed characters by commiting the IAsyncCompletionSession, dismissing it or allowing it to continue.
public interface class IAsyncCompletionCommitManager2 : Microsoft::VisualStudio::Language::Intellisense::AsyncCompletion::IAsyncCompletionCommitManager
public interface IAsyncCompletionCommitManager2 : Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.IAsyncCompletionCommitManager
type IAsyncCompletionCommitManager2 = interface
interface IAsyncCompletionCommitManager
Public Interface IAsyncCompletionCommitManager2
Implements IAsyncCompletionCommitManager
- Implements
Remarks
When object implements IAsyncCompletionCommitManager2, completion will not call PotentialCommitCharacters and ShouldCommitCompletion(IAsyncCompletionSession, SnapshotPoint, Char, CancellationToken).
Instances of this class should be created by IAsyncCompletionCommitManagerProvider, which is a MEF part.
Properties
PotentialCommitCharacters |
Returns characters that may commit completion. When completion is active and a text edit matches one of these characters, ShouldCommitCompletion(IAsyncCompletionSession, SnapshotPoint, Char, CancellationToken) is called to verify that the character is indeed a commit character at a given location. Called on UI thread. If the commit charactersr are not known or are variable, consider using IAsyncCompletionCommitManager2 which ignores the PotentialCommitCharacters optimization and supports handling each character individually. (Inherited from IAsyncCompletionCommitManager) |
Methods
HandleTypedChar(IAsyncCompletionSession, SnapshotPoint, Char, CancellationToken) |
Returns how Called instead of ShouldCommitCompletion(IAsyncCompletionSession, SnapshotPoint, Char, CancellationToken) Called on UI thread. |
Initialize(IAsyncCompletionSession) |
Invoked when Called on UI thread. |
ShouldCommitCompletion(Char, SnapshotPoint, CancellationToken) |
Returns whether this character is a commit character in a given location. If every character returned by PotentialCommitCharacters should always commit the active completion session, return true. Called on UI thread. (Inherited from IAsyncCompletionCommitManager) |
ShouldCommitCompletion(IAsyncCompletionSession, SnapshotPoint, Char, CancellationToken) |
Returns whether
If in your language every character returned by PotentialCommitCharacters
is a commit character, simply return Called on UI thread. (Inherited from IAsyncCompletionCommitManager) |
TryCommit(IAsyncCompletionSession, ITextBuffer, CompletionItem, Char, CancellationToken) |
Allows the implementer of IAsyncCompletionCommitManager to customize how specified CompletionItem is committed.
This method is called on UI thread, before the In most cases, implementer does not need to commit the item. Return Unhandled to allow another IAsyncCompletionCommitManager to attempt the commit, or to invoke the default commit behavior.
To perform a custom commit, replace contents of
Called on UI thread. (Inherited from IAsyncCompletionCommitManager) |
TryCommit(ITextView, ITextBuffer, CompletionItem, ITrackingSpan, Char, CancellationToken) |
Allows the instance of IAsyncCompletionCommitManager to commit of specified CompletionItem. Implementer does not need to commit the item. Return Unhandled to allow another IAsyncCompletionCommitManager to attempt the commit, or to invoke default commit behavior. Called on UI thread. (Inherited from IAsyncCompletionCommitManager) |