次の方法で共有


CompletionSet.Init(IVsTextView, Declarations, Boolean) Method

Definition

Initializes the completion set object.

public:
 virtual void Init(Microsoft::VisualStudio::TextManager::Interop::IVsTextView ^ textView, Microsoft::VisualStudio::Package::Declarations ^ declarations, bool completeWord);
public virtual void Init (Microsoft.VisualStudio.TextManager.Interop.IVsTextView textView, Microsoft.VisualStudio.Package.Declarations declarations, bool completeWord);
abstract member Init : Microsoft.VisualStudio.TextManager.Interop.IVsTextView * Microsoft.VisualStudio.Package.Declarations * bool -> unit
override this.Init : Microsoft.VisualStudio.TextManager.Interop.IVsTextView * Microsoft.VisualStudio.Package.Declarations * bool -> unit
Public Overridable Sub Init (textView As IVsTextView, declarations As Declarations, completeWord As Boolean)

Parameters

textView
IVsTextView

[in] An IVsTextView object representing the view that displays the source file.

declarations
Declarations

[in] A Declarations object that manages the list of declarations to show in the completion list.

completeWord
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.

Applies to