CompletionSet.Init Method
Initializes the completion set object.
Namespace: Microsoft.VisualStudio.Package
Assemblies: Microsoft.VisualStudio.Package.LanguageService.11.0 (in Microsoft.VisualStudio.Package.LanguageService.11.0.dll)
Microsoft.VisualStudio.Package.LanguageService.10.0 (in Microsoft.VisualStudio.Package.LanguageService.10.0.dll)
Microsoft.VisualStudio.Package.LanguageService (in Microsoft.VisualStudio.Package.LanguageService.dll)
Microsoft.VisualStudio.Package.LanguageService.9.0 (in Microsoft.VisualStudio.Package.LanguageService.9.0.dll)
Syntax
'Declaração
Public Overridable Sub Init ( _
textView As IVsTextView, _
declarations As Declarations, _
completeWord As Boolean _
)
public virtual void Init(
IVsTextView textView,
Declarations declarations,
bool completeWord
)
Parameters
- textView
Type: Microsoft.VisualStudio.TextManager.Interop.IVsTextView
[in] An IVsTextView object representing the view that displays the source file.
- declarations
Type: Microsoft.VisualStudio.Package.Declarations
[in] A Declarations object that manages the list of declarations to show in the completion list.
- completeWord
Type: System.Boolean
[in] true if part of a word is to be completed, otherwise false (the user selected Complete Word from the IntelliSense menu with the caret not positioned immediately after any text. This displays all possible completions).
Remarks
This method is called when the CompletionSet object that was created in the call to the CreateCompletionSet method in the Source class is about to be used to show a completion list. This method allows the same CompletionSet object to be reused.
The base method first calls the Close method and then caches the IVsTextView object and the Declarations object. The base method then returns immediately if the Declarations object is empty. Otherwise, the base method calls the UpdateCompletionStatus method on the IVsTextView object with the flag UCS_NAMESCHANGED. If the completeWord parameter is true, the flag UCS_COMPLETEWORD is also given to UpdateCompletionStatus. If UpdateCompletionStatus fails, a COMException exception is thrown. Finally, the base method sets the internal flag indicating the display is visible.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.