IVsImmediateStatementCompletion2.EnableStatementCompletion Method

Definition

Enables or disables statement completion.

public:
 int EnableStatementCompletion(int fEnable, int iStartIndex, int iEndIndex, Microsoft::VisualStudio::TextManager::Interop::IVsTextView ^ pTextView);
public:
 int EnableStatementCompletion(int fEnable, int iStartIndex, int iEndIndex, Microsoft::VisualStudio::TextManager::Interop::IVsTextView ^ pTextView);
int EnableStatementCompletion(int fEnable, int iStartIndex, int iEndIndex, Microsoft::VisualStudio::TextManager::Interop::IVsTextView const & pTextView);
public int EnableStatementCompletion (int fEnable, int iStartIndex, int iEndIndex, Microsoft.VisualStudio.TextManager.Interop.IVsTextView pTextView);
abstract member EnableStatementCompletion : int * int * int * Microsoft.VisualStudio.TextManager.Interop.IVsTextView -> int
Public Function EnableStatementCompletion (fEnable As Integer, iStartIndex As Integer, iEndIndex As Integer, pTextView As IVsTextView) As Integer

Parameters

fEnable
Int32

[in] Flag indicating whether to enable statement completion. True indicates statement completion is enabled.

iStartIndex
Int32

[in] If fEnable is true, the index in the current line which marks the start of the portion to be used for statement completion. Otherwise ignored.

iEndIndex
Int32

[in] If fEnable is true, the index in the current line which marks the end of the portion to be used for statement completion. If value is -1, it indicates that the rest of the line is to be used. Ignored on disable of statement completion.

pTextView
IVsTextView

[in] The text view.

Returns

If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Remarks

This method is called by the command window when user actions require statement completion to be turned on or off. The language service should not install or remove its filter from the filter chain. If statement completion is being enabled, the iStartIndex and iEndIndex instruct the language service to consider only the indicated part of the current line for statement completion purposes.

Applies to