Ejemplo n.º 1
0
 static void OnAdded(BookmarkEventArgs e)
 {
     if (Added != null)
     {
         Added(null, e);
     }
 }
Ejemplo n.º 2
0
 static void OnRemoved(BookmarkEventArgs e)
 {
     if (Removed != null)
     {
         Removed(null, e);
     }
 }
Ejemplo n.º 3
0
		void BookmarkManager_Added(object sender, BookmarkEventArgs e)
		{
			if (e.Bookmark is MarkerBookmark) {
				var bm = (MarkerBookmark)e.Bookmark;
				// add bookmark for the current type
				if (bm.LineNumber < codeEditor.Document.LineCount) {
					DocumentLine line = codeEditor.Document.GetLineByNumber(bm.LineNumber);
					bm.CreateMarker(this, line.Offset, line.Length);
				}
			}
		}
Ejemplo n.º 4
0
		void BookmarkManager_Removed(object sender, BookmarkEventArgs e)
		{
			if (e.Bookmark is BreakpointBookmark) {
				var bm = (MarkerBookmark)e.Bookmark;
				Remove(bm.Marker);
			}
			
			if (e.Bookmark is CurrentLineBookmark) {
				RemoveAll(m => m.Bookmark is CurrentLineBookmark);
			}
		}
Ejemplo n.º 5
0
 public void OnBookmarkAdded(object sender, BookmarkEventArgs args)
 {
     var breakpoint = args.Bookmark as BreakpointBookmark;
     if (null == breakpoint)
         return;
     var storage = decompilerTextView.CodeMappings;
     if (storage == null || storage.Count == 0)
         return;
     var key = MethodKey.Create(breakpoint.MemberReference);
     if (key != null && storage.ContainsKey(key.Value))
     {
         // register to show enabled/disabled state
         breakpoint.ImageChanged += breakpoint_ImageChanged;
         InvalidateVisual();
     }
 }
Ejemplo n.º 6
0
		static void BookmarkRemoved(object sender, BookmarkEventArgs e)
		{
			BreakpointBookmark bb = e.Bookmark as BreakpointBookmark;
			if (bb != null) {
				OnBreakPointRemoved(new BreakpointBookmarkEventArgs(bb));
			}
		}
Ejemplo n.º 7
0
		public void OnBookmarkRemoved(object sender, BookmarkEventArgs args)
		{
			var breakpoint = args.Bookmark as BreakpointBookmark;
			if (null == breakpoint)
				return;
			var storage = DebugInformation.CodeMappings;
			if (storage == null || storage.Count == 0)
				return;
			var key = breakpoint.MemberReference.MetadataToken.ToInt32();
			if (storage.ContainsKey(key))
			{
				breakpoint.ImageChanged -= delegate { InvalidateVisual(); };
				InvalidateVisual();
			}
		}
Ejemplo n.º 8
0
 static void OnRemoved(BookmarkEventArgs e)
 {
     if (Removed != null) {
         Removed(null, e);
     }
 }
Ejemplo n.º 9
0
 static void OnAdded(BookmarkEventArgs e)
 {
     if (Added != null) {
         Added(null, e);
     }
 }
Ejemplo n.º 10
0
 void BookmarkManager_Removed(object sender, BookmarkEventArgs e)
 {
     var bpm = e.Bookmark as BreakpointBookmark;
     if (bpm == null)
         return;
     bpm.OnModified += BreakpointBookmark_OnModified;
     SetItemSource();
 }
Ejemplo n.º 11
0
 void BookmarkManager_Removed(object sender, BookmarkEventArgs e)
 {
     var bpm = e.Bookmark as BreakpointBookmark;
     if (bpm == null)
         return;
     bpm.IsEnabledChanged -= BreakpointBookmark_OnIsEnabledChanged;
     Save();
 }
Ejemplo n.º 12
0
 void BookmarkManager_Removed(object sender, BookmarkEventArgs e)
 {
     if (e.Bookmark is MarkerBookmark) {
         var mbm = (MarkerBookmark)e.Bookmark;
         ITextMarker marker;
         if (mbm.Markers.TryGetValue(this, out marker))
             Remove(marker);
         mbm.Markers.Remove(this);
     }
 }
Ejemplo n.º 13
0
 void BookmarkManager_Added(object sender, BookmarkEventArgs e)
 {
     CreateMarker(e.Bookmark as MarkerBookmark);
 }