Example #1
0
        void CreateMarker(ITextMarkerObject tmo)
        {
            if (tmo == null || !tmo.IsVisible(textView))
            {
                return;
            }

            ITextMarker marker;

            if (!objToMarker.TryGetValue(tmo, out marker))
            {
                objToMarker.Add(tmo, marker = tmo.CreateMarker(textView, this));
                tmo.ObjPropertyChanged     += TextMarkerObject_ObjPropertyChanged;
            }
            Debug.Assert(marker != null);
        }
Example #2
0
        void RemoveMarker(ITextMarkerObject tmo)
        {
            if (tmo == null)
            {
                return;
            }

            tmo.ObjPropertyChanged -= TextMarkerObject_ObjPropertyChanged;

            ITextMarker marker;

            if (objToMarker.TryGetValue(tmo, out marker))
            {
                objToMarker.Remove(tmo);
                Remove(marker);
            }
        }
Example #3
0
		void RemoveMarker(ITextMarkerObject tmo)
		{
			if (tmo == null)
				return;

			tmo.ObjPropertyChanged -= TextMarkerObject_ObjPropertyChanged;

			ITextMarker marker;
			if (objToMarker.TryGetValue(tmo, out marker)) {
				objToMarker.Remove(tmo);
				Remove(marker);
			}
		}
Example #4
0
		void CreateMarker(ITextMarkerObject tmo)
		{
			if (tmo == null || !tmo.IsVisible(textView))
				return;

			ITextMarker marker;
			if (!objToMarker.TryGetValue(tmo, out marker)) {
				objToMarker.Add(tmo, marker = tmo.CreateMarker(textView, this));
				tmo.ObjPropertyChanged += TextMarkerObject_ObjPropertyChanged;
			}
			Debug.Assert(marker != null);
		}