diff options
author | Jeffrey Stedfast <jestedfa@microsoft.com> | 2019-08-08 18:51:50 +0300 |
---|---|---|
committer | Jeffrey Stedfast <jestedfa@microsoft.com> | 2019-10-11 04:47:47 +0300 |
commit | 4a7d4f06a377954a5af92f32720e2b5edfc1a6f1 (patch) | |
tree | bf9b1163381e7a62a15627aa76db79d642b13c05 /main/src/addins/MonoDevelop.SourceEditor2 | |
parent | 73446aeaed805dd59ab1a73129f4b82b15927810 (diff) |
[Debugger] Implemented a Cocoa-based ObjectValueTreeView
Diffstat (limited to 'main/src/addins/MonoDevelop.SourceEditor2')
2 files changed, 16 insertions, 4 deletions
diff --git a/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/DebugValueTooltipProvider.cs b/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/DebugValueTooltipProvider.cs index 1cec611cda..4fc65a8da2 100644 --- a/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/DebugValueTooltipProvider.cs +++ b/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/DebugValueTooltipProvider.cs @@ -24,7 +24,9 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. // -// + +// Note: This API is only used by the old (Gtk) TextEditor. +// The new TextEditor uses MonoDevelop.Debugger.VSTextView.QuickInfo.DebuggerQuickInfoSourceProvider using System; using System.Threading; @@ -39,6 +41,7 @@ using MonoDevelop.Ide.Editor; namespace MonoDevelop.SourceEditor { + [Obsolete ("This has been replaced by MonoDevelop.Debugger.VSTextView.QuickInfo.DebuggerQuickInfoSourceProvider")] class DebugValueTooltipProvider: TooltipProvider { DebugValueWindow tooltip; @@ -78,13 +81,14 @@ namespace MonoDevelop.SourceEditor if (!DebuggingService.IsPaused) return null; - StackFrame frame = DebuggingService.CurrentFrame; + var frame = DebuggingService.CurrentFrame; if (frame == null) return null; var ed = CompileErrorTooltipProvider.GetExtensibleTextEditor (editor); if (ed == null) return null; + string expression = null; int startOffset; @@ -129,7 +133,15 @@ namespace MonoDevelop.SourceEditor public override Window CreateTooltipWindow (TextEditor editor, DocumentContext ctx, TooltipItem item, int offset, Xwt.ModifierKeys modifierState) { - var window = new DebugValueWindow ((Gtk.Window)(editor.GetNativeWidget<Gtk.Widget> ()).Toplevel, editor.FileName, editor.OffsetToLocation (offset).Line, DebuggingService.CurrentFrame, (ObjectValue)item.Item, null); + var position = editor.OffsetToLocation (offset); + var location = new PinnedWatchLocation (editor.FileName) { + Line = position.Line, + Column = position.Column, + EndLine = position.Line, + EndColumn = position.Column + }; + + var window = new DebugValueWindow ((Gtk.Window)(editor.GetNativeWidget<Gtk.Widget> ()).Toplevel, location, DebuggingService.CurrentFrame, (ObjectValue)item.Item, null); IdeApp.CommandService.RegisterTopWindow (window); return window; } diff --git a/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/PinnedWatchWidget.cs b/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/PinnedWatchWidget.cs index 1f4cd28845..8372c179cb 100644 --- a/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/PinnedWatchWidget.cs +++ b/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/PinnedWatchWidget.cs @@ -89,7 +89,7 @@ namespace MonoDevelop.SourceEditor controller = new ObjectValueTreeViewController (); controller.AllowEditing = true; - treeView = (TreeView) controller.GetControl (headersVisible: false, compactView: true, allowPinning: true); + treeView = (TreeView) controller.GetGtkControl (headersVisible: false, compactView: true, allowPinning: true); controller.PinnedWatch = watch; valueTree = null; |