static void OnLoadUserPrefs(object s, UserPreferencesEventArgs args) { XmlElement elem = args.Properties.GetValue <XmlElement> ("MonoDevelop.Ide.DebuggingService.Breakpoints"); if (elem == null) { elem = args.Properties.GetValue <XmlElement> ("MonoDevelop.Ide.DebuggingService"); } if (elem != null) { lock (breakpoints) breakpoints.Load(elem); } PinnedWatchStore wstore = args.Properties.GetValue <PinnedWatchStore> ("MonoDevelop.Ide.DebuggingService.PinnedWatches"); if (wstore != null) { pinnedWatches.LoadFrom(wstore); } lock (breakpoints) pinnedWatches.BindAll(breakpoints); }
internal void LoadFrom(PinnedWatchStore store) { try { BeginBatchUpdate(); lock (watches) { List <PinnedWatch> ws = new List <PinnedWatch> (watches); watches.Clear(); foreach (PinnedWatch watch in ws) { watch.Store = null; OnWatchRemoved(watch); } foreach (PinnedWatch watch in store.watches) { watch.Store = this; watches.Add(watch); OnWatchAdded(watch); } } OnChanged(); } finally { EndBatchUpdate(); } }
static Task OnLoadUserPrefs(object s, UserPreferencesEventArgs args) { var elem = args.Properties.GetValue <XmlElement> ("MonoDevelop.Ide.DebuggingService.Breakpoints") ?? args.Properties.GetValue <XmlElement> ("MonoDevelop.Ide.DebuggingService"); if (elem != null) { lock (breakpoints) breakpoints.Load(elem); } PinnedWatchStore wstore = args.Properties.GetValue <PinnedWatchStore> ("MonoDevelop.Ide.DebuggingService.PinnedWatches"); if (wstore != null) { pinnedWatches.LoadFrom(wstore); } lock (breakpoints) pinnedWatches.BindAll(breakpoints); return(Task.FromResult(true)); }
internal void LoadFrom (PinnedWatchStore store) { try { BeginBatchUpdate (); lock (watches) { List<PinnedWatch> ws = new List<PinnedWatch> (watches); watches.Clear (); foreach (PinnedWatch watch in ws) { watch.Store = null; OnWatchRemoved (watch); } foreach (PinnedWatch watch in store.watches) { watch.Store = this; watches.Add (watch); OnWatchAdded (watch); } } OnChanged (); } finally { EndBatchUpdate (); } }