From 0b924bbbf37648e631e2d4010f134a9624626a37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Srbeck=C3=BD?= Date: Sat, 3 Nov 2012 22:47:46 +0000 Subject: [PATCH] Moving some debugger's files around --- .../Debugger.AddIn/Debugger.AddIn.csproj | 12 +++------ .../Pads/{Common => }/AutoCompleteTextBox.cs | 0 .../Pads/{Common => }/CommonResources.xaml | 0 .../Pads/{Commands => }/WatchPadCommands.cs | 0 ...akpointCommands.cs => DebuggerCommands.cs} | 25 +++++++++++++++++++ .../Service/RunToCursorCommand.cs | 23 ----------------- .../Service/SetCurrentStatementCommand.cs | 23 ----------------- .../Debugger.Core/Debugger.Core.csproj | 9 ++----- .../Debugger.Core/GetValueException.cs | 22 ---------------- .../DebugMethodInfo.cs => LocalVariable.cs} | 0 ...xceptionAttribute.cs => TestAttributes.cs} | 12 +++++++++ .../Debugger.Core/Tests/ExpandAttribute.cs | 13 ---------- .../Debugger.Core/Tests/IgnoreAttribute.cs | 13 ---------- src/AddIns/Debugger/Debugger.Core/Value.cs | 10 ++++++-- 14 files changed, 51 insertions(+), 111 deletions(-) rename src/AddIns/Debugger/Debugger.AddIn/Pads/{Common => }/AutoCompleteTextBox.cs (100%) rename src/AddIns/Debugger/Debugger.AddIn/Pads/{Common => }/CommonResources.xaml (100%) rename src/AddIns/Debugger/Debugger.AddIn/Pads/{Commands => }/WatchPadCommands.cs (100%) rename src/AddIns/Debugger/Debugger.AddIn/Service/{BreakpointCommands.cs => DebuggerCommands.cs} (71%) delete mode 100644 src/AddIns/Debugger/Debugger.AddIn/Service/RunToCursorCommand.cs delete mode 100644 src/AddIns/Debugger/Debugger.AddIn/Service/SetCurrentStatementCommand.cs delete mode 100644 src/AddIns/Debugger/Debugger.Core/GetValueException.cs rename src/AddIns/Debugger/Debugger.Core/{MetaData/DebugMethodInfo.cs => LocalVariable.cs} (100%) rename src/AddIns/Debugger/Debugger.Core/{Tests/IgnoreOnExceptionAttribute.cs => TestAttributes.cs} (61%) delete mode 100644 src/AddIns/Debugger/Debugger.Core/Tests/ExpandAttribute.cs delete mode 100644 src/AddIns/Debugger/Debugger.Core/Tests/IgnoreAttribute.cs diff --git a/src/AddIns/Debugger/Debugger.AddIn/Debugger.AddIn.csproj b/src/AddIns/Debugger/Debugger.AddIn/Debugger.AddIn.csproj index 976b5add29..41f7b87703 100644 --- a/src/AddIns/Debugger/Debugger.AddIn/Debugger.AddIn.csproj +++ b/src/AddIns/Debugger/Debugger.AddIn/Debugger.AddIn.csproj @@ -103,11 +103,11 @@ DebuggingOptionsPanel.xaml Code + Code - - + @@ -129,7 +129,7 @@ Form - + Form @@ -147,12 +147,10 @@ DebuggeeExceptionForm.cs - DebuggingSymbolsPanel.cs - Properties\GlobalAssemblyInfo.cs @@ -219,7 +217,7 @@ - + @@ -229,8 +227,6 @@ False - - diff --git a/src/AddIns/Debugger/Debugger.AddIn/Pads/Common/AutoCompleteTextBox.cs b/src/AddIns/Debugger/Debugger.AddIn/Pads/AutoCompleteTextBox.cs similarity index 100% rename from src/AddIns/Debugger/Debugger.AddIn/Pads/Common/AutoCompleteTextBox.cs rename to src/AddIns/Debugger/Debugger.AddIn/Pads/AutoCompleteTextBox.cs diff --git a/src/AddIns/Debugger/Debugger.AddIn/Pads/Common/CommonResources.xaml b/src/AddIns/Debugger/Debugger.AddIn/Pads/CommonResources.xaml similarity index 100% rename from src/AddIns/Debugger/Debugger.AddIn/Pads/Common/CommonResources.xaml rename to src/AddIns/Debugger/Debugger.AddIn/Pads/CommonResources.xaml diff --git a/src/AddIns/Debugger/Debugger.AddIn/Pads/Commands/WatchPadCommands.cs b/src/AddIns/Debugger/Debugger.AddIn/Pads/WatchPadCommands.cs similarity index 100% rename from src/AddIns/Debugger/Debugger.AddIn/Pads/Commands/WatchPadCommands.cs rename to src/AddIns/Debugger/Debugger.AddIn/Pads/WatchPadCommands.cs diff --git a/src/AddIns/Debugger/Debugger.AddIn/Service/BreakpointCommands.cs b/src/AddIns/Debugger/Debugger.AddIn/Service/DebuggerCommands.cs similarity index 71% rename from src/AddIns/Debugger/Debugger.AddIn/Service/BreakpointCommands.cs rename to src/AddIns/Debugger/Debugger.AddIn/Service/DebuggerCommands.cs index c32e38a372..87f76cf11e 100644 --- a/src/AddIns/Debugger/Debugger.AddIn/Service/BreakpointCommands.cs +++ b/src/AddIns/Debugger/Debugger.AddIn/Service/DebuggerCommands.cs @@ -8,9 +8,34 @@ using ICSharpCode.Core; using ICSharpCode.SharpDevelop; using ICSharpCode.SharpDevelop.Debugging; using ICSharpCode.SharpDevelop.Editor; +using ICSharpCode.SharpDevelop.Services; namespace Debugger.AddIn { + public class RunToCursorCommand : AbstractMenuCommand + { + public override void Run() + { + ITextEditor editor = SD.GetActiveViewContentService(); + if (editor == null || WindowsDebugger.CurrentProcess == null) + return; + WindowsDebugger.CurrentProcess.RunTo(editor.FileName, editor.Caret.Line, editor.Caret.Column); + } + } + + public class SetCurrentStatementCommand : AbstractMenuCommand + { + public override void Run() + { + ITextEditor textEditor = SD.GetActiveViewContentService(); + + if (textEditor == null || DebuggerService.CurrentDebugger == null) + return; + + DebuggerService.CurrentDebugger.SetInstructionPointer(textEditor.FileName, textEditor.Caret.Line, textEditor.Caret.Column, false); + } + } + public static class BreakpointUtil { public static IEnumerable BreakpointsOnCaret { diff --git a/src/AddIns/Debugger/Debugger.AddIn/Service/RunToCursorCommand.cs b/src/AddIns/Debugger/Debugger.AddIn/Service/RunToCursorCommand.cs deleted file mode 100644 index 233b658a29..0000000000 --- a/src/AddIns/Debugger/Debugger.AddIn/Service/RunToCursorCommand.cs +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt) -// This code is distributed under the BSD license (for details please see \src\AddIns\Debugger\Debugger.AddIn\license.txt) - -using System.Linq; -using Debugger; -using ICSharpCode.Core; -using ICSharpCode.SharpDevelop.Debugging; -using ICSharpCode.SharpDevelop.Editor; -using ICSharpCode.SharpDevelop.Gui; - -namespace ICSharpCode.SharpDevelop.Services -{ - public class RunToCursorCommand : AbstractMenuCommand - { - public override void Run() - { - ITextEditor editor = SD.GetActiveViewContentService(); - if (editor == null || WindowsDebugger.CurrentProcess == null) - return; - WindowsDebugger.CurrentProcess.RunTo(editor.FileName, editor.Caret.Line, editor.Caret.Column); - } - } -} diff --git a/src/AddIns/Debugger/Debugger.AddIn/Service/SetCurrentStatementCommand.cs b/src/AddIns/Debugger/Debugger.AddIn/Service/SetCurrentStatementCommand.cs deleted file mode 100644 index ebc7a49ff5..0000000000 --- a/src/AddIns/Debugger/Debugger.AddIn/Service/SetCurrentStatementCommand.cs +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt) -// This code is distributed under the BSD license (for details please see \src\AddIns\Debugger\Debugger.AddIn\license.txt) - -using ICSharpCode.Core; -using ICSharpCode.SharpDevelop.Debugging; -using ICSharpCode.SharpDevelop.Editor; -using ICSharpCode.SharpDevelop.Gui; - -namespace ICSharpCode.SharpDevelop.Services -{ - public class SetCurrentStatementCommand : AbstractMenuCommand - { - public override void Run() - { - ITextEditor textEditor = SD.GetActiveViewContentService(); - - if (textEditor == null || DebuggerService.CurrentDebugger == null) - return; - - DebuggerService.CurrentDebugger.SetInstructionPointer(textEditor.FileName, textEditor.Caret.Line, textEditor.Caret.Column, false); - } - } -} diff --git a/src/AddIns/Debugger/Debugger.Core/Debugger.Core.csproj b/src/AddIns/Debugger/Debugger.Core/Debugger.Core.csproj index 7e85b22727..601b470977 100644 --- a/src/AddIns/Debugger/Debugger.Core/Debugger.Core.csproj +++ b/src/AddIns/Debugger/Debugger.Core/Debugger.Core.csproj @@ -58,9 +58,11 @@ + + @@ -68,7 +70,6 @@ - @@ -84,7 +85,6 @@ - @@ -92,9 +92,6 @@ - - - @@ -127,8 +124,6 @@ - - diff --git a/src/AddIns/Debugger/Debugger.Core/GetValueException.cs b/src/AddIns/Debugger/Debugger.Core/GetValueException.cs deleted file mode 100644 index 0183d9d199..0000000000 --- a/src/AddIns/Debugger/Debugger.Core/GetValueException.cs +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt) -// This code is distributed under the GNU LGPL (for details please see \doc\license.txt) - -using System; - -namespace Debugger -{ - public class GetValueException: DebuggerException - { - public GetValueException(string error, System.Exception inner):base(error, inner) - { - } - - public GetValueException(string errorFmt, params object[] args):base(string.Format(errorFmt, args)) - { - } - - public GetValueException(string error):base(error) - { - } - } -} diff --git a/src/AddIns/Debugger/Debugger.Core/MetaData/DebugMethodInfo.cs b/src/AddIns/Debugger/Debugger.Core/LocalVariable.cs similarity index 100% rename from src/AddIns/Debugger/Debugger.Core/MetaData/DebugMethodInfo.cs rename to src/AddIns/Debugger/Debugger.Core/LocalVariable.cs diff --git a/src/AddIns/Debugger/Debugger.Core/Tests/IgnoreOnExceptionAttribute.cs b/src/AddIns/Debugger/Debugger.Core/TestAttributes.cs similarity index 61% rename from src/AddIns/Debugger/Debugger.Core/Tests/IgnoreOnExceptionAttribute.cs rename to src/AddIns/Debugger/Debugger.Core/TestAttributes.cs index 76c1afd7b1..c517f07843 100644 --- a/src/AddIns/Debugger/Debugger.Core/Tests/IgnoreOnExceptionAttribute.cs +++ b/src/AddIns/Debugger/Debugger.Core/TestAttributes.cs @@ -5,6 +5,18 @@ using System; namespace Debugger.Tests { + [AttributeUsage(AttributeTargets.Property | AttributeTargets.Method)] + public class ExpandAttribute: Attribute + { + + } + + [AttributeUsage(AttributeTargets.Property | AttributeTargets.Method)] + public class IgnoreAttribute: Attribute + { + + } + [AttributeUsage(AttributeTargets.Property | AttributeTargets.Method | AttributeTargets.Class)] public class IgnoreOnExceptionAttribute: Attribute { diff --git a/src/AddIns/Debugger/Debugger.Core/Tests/ExpandAttribute.cs b/src/AddIns/Debugger/Debugger.Core/Tests/ExpandAttribute.cs deleted file mode 100644 index 33e25d82df..0000000000 --- a/src/AddIns/Debugger/Debugger.Core/Tests/ExpandAttribute.cs +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt) -// This code is distributed under the GNU LGPL (for details please see \doc\license.txt) - -using System; - -namespace Debugger.Tests -{ - [AttributeUsage(AttributeTargets.Property | AttributeTargets.Method)] - public class ExpandAttribute: Attribute - { - - } -} diff --git a/src/AddIns/Debugger/Debugger.Core/Tests/IgnoreAttribute.cs b/src/AddIns/Debugger/Debugger.Core/Tests/IgnoreAttribute.cs deleted file mode 100644 index bc86ee477a..0000000000 --- a/src/AddIns/Debugger/Debugger.Core/Tests/IgnoreAttribute.cs +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt) -// This code is distributed under the GNU LGPL (for details please see \doc\license.txt) - -using System; - -namespace Debugger.Tests -{ - [AttributeUsage(AttributeTargets.Property | AttributeTargets.Method)] - public class IgnoreAttribute: Attribute - { - - } -} diff --git a/src/AddIns/Debugger/Debugger.Core/Value.cs b/src/AddIns/Debugger/Debugger.Core/Value.cs index 47edbdd767..90dbff8302 100644 --- a/src/AddIns/Debugger/Debugger.Core/Value.cs +++ b/src/AddIns/Debugger/Debugger.Core/Value.cs @@ -14,11 +14,17 @@ namespace Debugger { public delegate Value ValueGetter(StackFrame context); + public class GetValueException: DebuggerException + { + public GetValueException(string error) : base(error) {} + public GetValueException(string errorFmt, params object[] args) : base(string.Format(errorFmt, args)) {} + public GetValueException(string error, System.Exception inner) : base(error, inner) {} + } + /// /// Value class provides functions to examine value in the debuggee. - /// It has very life-time. In general, value dies whenever debugger is + /// It has very short life-time. In general, value dies whenever debugger is /// resumed (this includes method invocation and property evaluation). - /// You can use Expressions to reobtain the value. /// public class Value: DebuggerObject {