public void UpdateSpans(IMethodOffsetSpanMap map) { inDocMarkers.Clear(); SelectedMarkersInDocumentCount = 0; if (map != null) { var allMarkers = this.allMarkers; for (int i = 0; i < allMarkers.Count; i++) { var methodMarker = allMarkers[i] as IGlyphTextMethodMarkerImpl; if (methodMarker != null) { var span = map.ToSpan(methodMarker.Method, methodMarker.ILOffset); if (span != null) { inDocMarkers.Add(methodMarker, span.Value); if (methodMarker.SelectedMarkerTypeName != null) { SelectedMarkersInDocumentCount++; } } } } } }
public void SetMethodOffsetSpanMap(ITextView textView, IMethodOffsetSpanMap map) { if (textView == null) { throw new ArgumentNullException(nameof(textView)); } var service = GlyphTextViewMarkerService.TryGet(textView); Debug.Assert(service != null); service?.SetMethodOffsetSpanMap(map); }
void IGlyphTextViewMarkerService.SetMethodOffsetSpanMap(IMethodOffsetSpanMap map) { if (methodOffsetSpanMap == map) { return; } methodOffsetSpanMap = map; if (markerAndSpanCollection.Count != 0) { markerAndSpanCollection.UpdateSpans(methodOffsetSpanMap); InvalidateEverything(); } }
void IGlyphTextViewMarkerService.SetMethodOffsetSpanMap(IMethodOffsetSpanMap map) { if (dotNetSpanMap == map) { return; } dotNetSpanMap = map as IDotNetSpanMap; Debug.Assert((map == null) == (dotNetSpanMap == null)); if (markerAndSpanCollection.Count != 0) { markerAndSpanCollection.UpdateSpans(dotNetSpanMap); InvalidateEverything(); } }
public void UpdateSpans(IMethodOffsetSpanMap map) { inDocMarkers.Clear(); SelectedMarkersInDocumentCount = 0; if (map != null) { var allMarkers = this.allMarkers; for (int i = 0; i < allMarkers.Count; i++) { var methodMarker = allMarkers[i] as IGlyphTextMethodMarkerImpl; if (methodMarker != null) { var span = map.ToSpan(methodMarker.Method, methodMarker.ILOffset); if (span != null) { inDocMarkers.Add(methodMarker, span.Value); if (methodMarker.SelectedMarkerTypeName != null) SelectedMarkersInDocumentCount++; } } } } }
void IGlyphTextViewMarkerService.SetMethodOffsetSpanMap(IMethodOffsetSpanMap map) { if (methodOffsetSpanMap == map) return; methodOffsetSpanMap = map; if (markerAndSpanCollection.Count != 0) { markerAndSpanCollection.UpdateSpans(methodOffsetSpanMap); InvalidateEverything(); } }