Compartir a través de


IVsImmediateStatementCompletion2.EnableStatementCompletion Method

Enables or disables statement completion.

Namespace:  Microsoft.VisualStudio.TextManager.Interop
Assembly:  Microsoft.VisualStudio.TextManager.Interop.8.0 (in Microsoft.VisualStudio.TextManager.Interop.8.0.dll)

Syntax

'Declaration
Function EnableStatementCompletion ( _
    fEnable As Integer, _
    iStartIndex As Integer, _
    iEndIndex As Integer, _
    pTextView As IVsTextView _
) As Integer
int EnableStatementCompletion(
    int fEnable,
    int iStartIndex,
    int iEndIndex,
    IVsTextView pTextView
)
int EnableStatementCompletion(
    [InAttribute] int fEnable, 
    [InAttribute] int iStartIndex, 
    [InAttribute] int iEndIndex, 
    [InAttribute] IVsTextView^ pTextView
)
abstract EnableStatementCompletion : 
        fEnable:int * 
        iStartIndex:int * 
        iEndIndex:int * 
        pTextView:IVsTextView -> int
function EnableStatementCompletion(
    fEnable : int, 
    iStartIndex : int, 
    iEndIndex : int, 
    pTextView : IVsTextView
) : int

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.

Return Value

Type: System.Int32
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.

.NET Framework Security

See Also

Reference

IVsImmediateStatementCompletion2 Interface

Microsoft.VisualStudio.TextManager.Interop Namespace