IVsImmediateStatementCompletion2::EnableStatementCompletion Method (Int32, Int32, Int32, IVsTextView^)
Enables or disables statement completion.
Assembly: Microsoft.VisualStudio.TextManager.Interop.8.0 (in Microsoft.VisualStudio.TextManager.Interop.8.0.dll)
int EnableStatementCompletion( int fEnable, int iStartIndex, int iEndIndex, IVsTextView^ pTextView )
Parameters
- fEnable
-
Type:
System::Int32
[in] Flag indicating whether to enable statement completion. True indicates statement completion is enabled.
- iStartIndex
-
Type:
System::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
-
Type:
System::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
-
Type:
Microsoft.VisualStudio.TextManager.Interop::IVsTextView^
[in] The text view.
Return Value
Type: System::Int32If the method succeeds, it returns S_OK. If it fails, it returns an error code.
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.