ViewFilter.GetDataTipText Method
Returns text about the given span that can be shown in a tool tip.
Namespace: Microsoft.VisualStudio.Package
Assemblies: Microsoft.VisualStudio.Package.LanguageService.10.0 (in Microsoft.VisualStudio.Package.LanguageService.10.0.dll)
Microsoft.VisualStudio.Package.LanguageService (in Microsoft.VisualStudio.Package.LanguageService.dll)
Microsoft.VisualStudio.Package.LanguageService.12.0 (in Microsoft.VisualStudio.Package.LanguageService.12.0.dll)
Microsoft.VisualStudio.Package.LanguageService.11.0 (in Microsoft.VisualStudio.Package.LanguageService.11.0.dll)
Microsoft.VisualStudio.Package.LanguageService.9.0 (in Microsoft.VisualStudio.Package.LanguageService.9.0.dll)
Syntax
'Declaration
Public Overridable Function GetDataTipText ( _
aspan As TextSpan(), _
<OutAttribute> ByRef textValue As String _
) As Integer
public virtual int GetDataTipText(
TextSpan[] aspan,
out string textValue
)
public:
virtual int GetDataTipText(
array<TextSpan>^ aspan,
[OutAttribute] String^% textValue
)
abstract GetDataTipText :
aspan:TextSpan[] *
textValue:string byref -> int
override GetDataTipText :
aspan:TextSpan[] *
textValue:string byref -> int
public function GetDataTipText(
aspan : TextSpan[],
textValue : String
) : int
Parameters
aspan
Type: array<Microsoft.VisualStudio.TextManager.Interop.TextSpan[][in, out] A TextSpan object specifying the location in the code to get information about and returns the span indicating the extent of the identifier or expression the text represents. This returned span indicates the area a mouse cursor can be in before the tool tip is dismissed.
textValue
Type: String%[out] Returns a string to be displayed in a tool tip. This string is valid only if a success code is returned.
Return Value
Type: Int32
If successful, returns S_OK; otherwise, returns an error code. Since this method can begin a background parse operation, a typical error code that can be returned is E_PENDING if the background parse has not yet finished.
Implements
IVsTextViewFilter.GetDataTipText(array<TextSpan[], String%)
Remarks
This method is called to provide a tool tip for a selected span of code. If this method returns E_PENDING, this method is called again at a later time. This method should also take into account whether a debugger is running, in which case, the text returned typically represents the value of the selected span of code as reported by the debugger. For example, if the cursor is over a variable, the debugger evaluates the variable to obtain a value that is to be displayed.
This method is an implementation of the GetDataTipText method on the IVsTextViewFilter interface.
The base method does nothing if the EnableQuickInfo property returns false or there is a parse operation currently in progress. Otherwise, this method either starts a background parse with the reason QuickInfo or returns the result of a previous parse. If text can be returned, the base method returns the success code TIP_S_ONLYIFNOMARKER, to indicate the text can be displayed but text from any error markers at the same location take precedence.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.