public static IVsTextLineMarker CreateMarker(IVsTextLines textLines, TextSpan span, MARKERTYPE mt, string tipText) { IVsTextLineMarker marker = null; TextMarkerClient textMarkerClient = new TextMarkerClient(tipText); textLines.CreateLineMarker((int)mt, span.iStartLine, span.iStartIndex, span.iEndLine, span.iEndIndex, textMarkerClient, out marker); return(marker); }
public static IVsTextLineMarker CreateMarker(IVsTextLines textLines, TextSpan span, MARKERTYPE mt, string tipText) { IVsTextLineMarker[] marker = new IVsTextLineMarker[1]; TextMarkerClient textMarkerClient = new TextMarkerClient(tipText); // bugbug: the following comment in the method CEnumMarkers::Initialize() of // ~\env\msenv\textmgr\markers.cpp means that tool tips on empty spans // don't work: // "VS7 #23719/#15312 [CFlaat]: exclude adjacent markers when the target span is non-empty" // So I wonder if we should debug assert on that or try and modify the span // in some way to make it non-empty... NativeMethods.ThrowOnFailure(textLines.CreateLineMarker((int)mt, span.iStartLine, span.iStartIndex, span.iEndLine, span.iEndIndex, textMarkerClient, marker)); return(marker[0]); }
public static IVsTextLineMarker CreateMarker( IVsTextLines textLines, TextSpan span, MARKERTYPE mt, string tipText) { IVsTextLineMarker marker = null; TextMarkerClient textMarkerClient = new TextMarkerClient( tipText ); textLines.CreateLineMarker((int)mt, span.iStartLine, span.iStartIndex, span.iEndLine, span.iEndIndex, textMarkerClient, out marker); return marker; }