diff options
Diffstat (limited to 'main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger.VSTextView')
2 files changed, 19 insertions, 0 deletions
diff --git a/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger.VSTextView/PinnedWatches/PinnedWatchAdornmentManager.cs b/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger.VSTextView/PinnedWatches/PinnedWatchAdornmentManager.cs index 27feca882b..e357a3df30 100644 --- a/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger.VSTextView/PinnedWatches/PinnedWatchAdornmentManager.cs +++ b/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger.VSTextView/PinnedWatches/PinnedWatchAdornmentManager.cs @@ -59,6 +59,7 @@ namespace MonoDevelop.Debugger.VSTextView.PinnedWatches DebuggingService.PinnedWatches.WatchRemoved += OnWatchRemoved; DebuggingService.DebugSessionStarted += OnDebugSessionStarted; DebuggingService.StoppedEvent += OnDebuggingSessionStopped; + DebuggingService.VariableChanged += OnVariableChanged; this.layer = textView.GetXPlatAdornmentLayer ("PinnedWatch"); this.cocoaViewFactory = cocoaViewFactory; @@ -102,6 +103,17 @@ namespace MonoDevelop.Debugger.VSTextView.PinnedWatches adornments.Remove (e.Watch); } + private void OnVariableChanged (object sender, EventArgs e) + { + if (!debugging) + return; + + foreach (var watch in adornments) { + var view = (PinnedWatchView)((ICocoaMaterialView)watch.Value).ContentView; + view.Refresh (); + } + } + SnapshotSpan GetSnapshotSpan (PinnedWatch watch) { var newSpan = textView.TextSnapshot.SpanFromMDColumnAndLine (watch.Line, watch.Column, watch.EndLine, watch.EndColumn); @@ -201,6 +213,8 @@ namespace MonoDevelop.Debugger.VSTextView.PinnedWatches DebuggingService.PinnedWatches.WatchRemoved -= OnWatchRemoved; DebuggingService.DebugSessionStarted -= OnDebugSessionStarted; DebuggingService.StoppedEvent -= OnDebuggingSessionStopped; + DebuggingService.VariableChanged -= OnVariableChanged; + textView.LayoutChanged -= OnTextViewLayoutChanged; } } diff --git a/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger.VSTextView/PinnedWatches/PinnedWatchView.cs b/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger.VSTextView/PinnedWatches/PinnedWatchView.cs index 6827a7ae10..c4f994e08f 100644 --- a/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger.VSTextView/PinnedWatches/PinnedWatchView.cs +++ b/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger.VSTextView/PinnedWatches/PinnedWatchView.cs @@ -78,6 +78,11 @@ namespace MonoDevelop.Debugger.VSTextView.PinnedWatches treeView.Resized += OnTreeViewResized; } + public void Refresh() + { + controller.Root.Children [0].Refresh (); + } + public void SetObjectValue (ObjectValue value) { if (value == objectValue) |