Ejemplo n.º 1
0
 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++;
                     }
                 }
             }
         }
     }
 }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
0
 void IGlyphTextViewMarkerService.SetMethodOffsetSpanMap(IMethodOffsetSpanMap map)
 {
     if (methodOffsetSpanMap == map)
     {
         return;
     }
     methodOffsetSpanMap = map;
     if (markerAndSpanCollection.Count != 0)
     {
         markerAndSpanCollection.UpdateSpans(methodOffsetSpanMap);
         InvalidateEverything();
     }
 }
Ejemplo n.º 4
0
 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();
			}
		}