Reputation: 61
Implementing "squiggle" text line markers in JSLint.NET was quite straight forward as can be seen here:
However, despite implementing IVsTextMarkerClient with the GetTipText method, tooltips are never shown. The GetTipText method is never even invoked when the mouse hovers over the marker.
If I switch to a glyph type (for example MARKERTYPE.MARKER_SHORTCUT), tooltips show just fine in the margin:
Is there some trick to getting tooltips to show on the body of an inline text marker?
Implementation source code is available here in the SetMarker method:
Upvotes: 3
Views: 493
Reputation: 61
It turns out that the answer (to "is it possible?") is no when using the old IVsTextMarkerClient and IVsTextLines implementations.
It can be achieved by implementing the newer ITag / ITagger / ITaggerProvider interfaces instead. My current prototype looks like this:
Source code available here:
Hope it helps someone else!
Upvotes: 1
Reputation: 620
This works for me, although it is not specific for a text line marker... you'd have to implement that in the background:
public class MyAuthoringScope : AuthoringScope
{
...
public override string GetDataTipText(int line, int col, out TextSpan span)
{
string info;
TokenInfo tokenInfo = this._source.GetTokenInfo(line, col);
...
return info;
}
}
Upvotes: 0