IVsCompletionSet Interface
Provides statement completion capabilities for the language service.
Namespace: Microsoft.VisualStudio.TextManager.Interop
Assembly: Microsoft.VisualStudio.TextManager.Interop (in Microsoft.VisualStudio.TextManager.Interop.dll)
Syntax
'Déclaration
<InterfaceTypeAttribute()> _
<GuidAttribute("0EF79249-B0BF-4CD0-A966-C4713546C3A5")> _
Public Interface IVsCompletionSet
[InterfaceTypeAttribute()]
[GuidAttribute("0EF79249-B0BF-4CD0-A966-C4713546C3A5")]
public interface IVsCompletionSet
[InterfaceTypeAttribute()]
[GuidAttribute(L"0EF79249-B0BF-4CD0-A966-C4713546C3A5")]
public interface class IVsCompletionSet
[<InterfaceTypeAttribute()>]
[<GuidAttribute("0EF79249-B0BF-4CD0-A966-C4713546C3A5")>]
type IVsCompletionSet = interface end
public interface IVsCompletionSet
The IVsCompletionSet type exposes the following members.
Methods
Name | Description | |
---|---|---|
Dismiss | Releases the completion set when it is no longer needed. | |
GetBestMatch | Determines the index of the closest matching completion set, given what has been typed so far. | |
GetCount | Returns the number of items in the completion set. | |
GetDescriptionText | Returns text describing the indicated item in the completion set. | |
GetDisplayText | Returns the text of a completion set item as it appears in the completion set list. | |
GetFlags | Returns flags indicating specific behaviors of this completion set. | |
GetImageList | Returns the list of images (glyphs) supported by the completion set. | |
GetInitialExtent | Determines where to display the completion set list in the editor. | |
OnCommit | Determines how text is completed. |
Top
Remarks
Implement this interface on your language service object to provide statement completion. Your language service object must also implement IOleCommandTarget. To pass the text view a pointer to your IOleCommandTarget implementation, call AddCommandFilter.
The command filter intercepts commands that the user types into the code window. Monitor the command information to know when to display statement completion information to the user. For example, statement completion information is provided in Visual C++ when the user types "->" and when the user types "." in Visual Basic.
Statement completion can also include displaying a list of completion options when a user types a letter in a particular scope. For example, typing 'c' in a namespace of a Visual C# program might present a list of all completions for that scope including "class". If the 'c' is typed inside a method's scope, however, the completions might include only those variables that start with the letter 'c' as "class" does not make sense inside a method.
All of these statement completions are part of the IntelliSense feature set.
Notes to Implementers
Implement this interface on your language service object to include statement completion in your language service. This interface can also be implemented in its own class.
Notes to Callers
Called by the view to return statement completion information to the user.