Partilhar via


Método IVsLanguageTextOps.GetDataTip

Exibe uma dica em um intervalo de texto quando o mouse passa sobre este local.

Namespace:  Microsoft.VisualStudio.TextManager.Interop
Assembly:  Microsoft.VisualStudio.TextManager.Interop (em Microsoft.VisualStudio.TextManager.Interop.dll)

Sintaxe

'Declaração
Function GetDataTip ( _
    pTextLayer As IVsTextLayer, _
    ptsSel As TextSpan(), _
    <OutAttribute> ptsTip As TextSpan(), _
    <OutAttribute> ByRef pbstrText As String _
) As Integer
int GetDataTip(
    IVsTextLayer pTextLayer,
    TextSpan[] ptsSel,
    TextSpan[] ptsTip,
    out string pbstrText
)
int GetDataTip(
    [InAttribute] IVsTextLayer^ pTextLayer, 
    [InAttribute] array<TextSpan>^ ptsSel, 
    [OutAttribute] array<TextSpan>^ ptsTip, 
    [OutAttribute] String^% pbstrText
)
abstract GetDataTip : 
        pTextLayer:IVsTextLayer * 
        ptsSel:TextSpan[] * 
        ptsTip:TextSpan[] byref * 
        pbstrText:string byref -> int
function GetDataTip(
    pTextLayer : IVsTextLayer, 
    ptsSel : TextSpan[], 
    ptsTip : TextSpan[], 
    pbstrText : String
) : int

Parâmetros

  • pbstrText
    Tipo: String%

    [out] Retorna o texto da dica para exibir.

Valor de retorno

Tipo: Int32
Se o método for bem-sucedido, ele retorna S_OK.Se ele falhar, ele retorna um código de erro.

Comentários

COM assinatura

De textmgr.idl:

HRESULT IVsLanguageTextOps::GetDataTip(
   [in] IVsTextLayer *pTextLayer, 
   [in] const TextSpan *ptsSel, 
   [out] TextSpan *ptsTip, 
   [out, retval] BSTR *pbstrText
);

Use o IVsTextLayer o objeto para acessar o texto aplicável dentro do intervalo de texto (ptsSel) para a dica.

O que é exibido depende do serviço de linguagem. Por exemplo, em Visual C#, manter o cursor sobre uma variável geralmente mostra o tipo de variável. Esse método também é usado ao depurar um programa: este método é chamado para obter o tipo e o nome de uma variável, enquanto o depurador é solicitado para o valor da variável. As duas partes de informações são então combinadas e exibidas em uma dica de dados único.

Segurança do .NET Framework

Consulte também

Referência

IVsLanguageTextOps Interface

Namespace Microsoft.VisualStudio.TextManager.Interop