From 20e51d050f6884adcddd4bf7a80a7b339b2632f5 Mon Sep 17 00:00:00 2001 From: eusebiu Date: Thu, 11 Nov 2010 23:32:15 +0200 Subject: [PATCH] modify UI of control add drag and drop to PinBookmark --- .../TreeModel/ExpressionNode.cs | 15 ++++- .../Src/Services/Debugger/DebuggerService.cs | 10 +++- .../Tooltips/DebuggerTooltipControl.xaml | 5 +- .../Tooltips/DebuggerTooltipControl.xaml.cs | 2 +- .../Services/Debugger/Tooltips/ITreeNode.cs | 2 +- .../Services/Debugger/Tooltips/PinBookmark.cs | 15 ++++- .../Tooltips/PinControlsDictionary.xaml | 30 ++++++---- .../Debugger/Tooltips/PinDebuggerControl.xaml | 12 ++-- .../Tooltips/PinDebuggerControl.xaml.cs | 57 +++++++++++++++---- .../Project/Src/Services/Debugger/TreeNode.cs | 2 +- 10 files changed, 108 insertions(+), 42 deletions(-) diff --git a/src/AddIns/Debugger/Debugger.AddIn/TreeModel/ExpressionNode.cs b/src/AddIns/Debugger/Debugger.AddIn/TreeModel/ExpressionNode.cs index 30ed21d445..9bdc8b3803 100644 --- a/src/AddIns/Debugger/Debugger.AddIn/TreeModel/ExpressionNode.cs +++ b/src/AddIns/Debugger/Debugger.AddIn/TreeModel/ExpressionNode.cs @@ -31,7 +31,7 @@ namespace Debugger.AddIn.TreeModel Expression expression; bool canSetText; GetValueException error; - + string fullName; string fullText; public bool Evaluated { @@ -78,6 +78,9 @@ namespace Debugger.AddIn.TreeModel get { if (!evaluated) EvaluateExpression(); + if(!string.IsNullOrEmpty(fullName)) + return fullName; + if (expression is MemberReferenceExpression) { var memberExpression = (MemberReferenceExpression)expression; @@ -111,15 +114,21 @@ namespace Debugger.AddIn.TreeModel } } + if (currentExpression is ThisReferenceExpression) { + stack.Push("this"); + } + // create fullname StringBuilder sb = new StringBuilder(); while(stack.Count > 0) sb.Append(stack.Pop()); - return sb.ToString(); + fullName = sb.ToString(); + return fullName; } - return Name.Trim(); + fullName = Name.Trim(); + return fullName; } } diff --git a/src/Main/Base/Project/Src/Services/Debugger/DebuggerService.cs b/src/Main/Base/Project/Src/Services/Debugger/DebuggerService.cs index a394e930c2..61da273750 100644 --- a/src/Main/Base/Project/Src/Services/Debugger/DebuggerService.cs +++ b/src/Main/Base/Project/Src/Services/Debugger/DebuggerService.cs @@ -30,6 +30,8 @@ namespace ICSharpCode.SharpDevelop.Debugging BookmarkManager.Added += BookmarkAdded; BookmarkManager.Removed += BookmarkRemoved; + + IsDebuggerRunning = false; } static void GetDescriptors() @@ -80,6 +82,8 @@ namespace ICSharpCode.SharpDevelop.Debugging } } + public static bool IsDebuggerRunning { get; set; } + /// /// Returns true if debugger is already loaded. /// @@ -109,9 +113,11 @@ namespace ICSharpCode.SharpDevelop.Debugging } static void OnDebugStarted(object sender, EventArgs e) - { + { if (DebugStarted != null) DebugStarted(null, e); + + IsDebuggerRunning = true; } static void OnDebugStopped(object sender, EventArgs e) @@ -124,6 +130,8 @@ namespace ICSharpCode.SharpDevelop.Debugging LayoutConfiguration.CurrentLayoutName = oldLayoutConfiguration; if (DebugStopped != null) DebugStopped(null, e); + + IsDebuggerRunning = false; } static MessageViewCategory debugCategory = null; diff --git a/src/Main/Base/Project/Src/Services/Debugger/Tooltips/DebuggerTooltipControl.xaml b/src/Main/Base/Project/Src/Services/Debugger/Tooltips/DebuggerTooltipControl.xaml index 6b9f84af60..b6bd8d756a 100644 --- a/src/Main/Base/Project/Src/Services/Debugger/Tooltips/DebuggerTooltipControl.xaml +++ b/src/Main/Base/Project/Src/Services/Debugger/Tooltips/DebuggerTooltipControl.xaml @@ -144,7 +144,7 @@ BorderBrush="#FFDDDDDD" BorderThickness="0 0 1 0"> @@ -183,7 +183,6 @@ Style="{StaticResource TextStyle}" IsEnabled="{Binding CanSetText}" KeyUp="TextBox_KeyUp" - Margin="4 0" Text="{Binding Path=Text}" /> @@ -193,7 +192,7 @@ - - - - + + + + @@ -126,11 +126,11 @@ - - - - - + + + + + @@ -158,7 +158,10 @@ Value="True" /> + Value="Center" /> + + @@ -184,6 +187,13 @@ + +