Browse Source
Re-added Debugger.Exception.InnerException. Began adding TreeViewExceptionNode.cs Documented code. Renamed TreeViewNode to TreeViewVarNode. git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@3052 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61shortcuts
10 changed files with 191 additions and 47 deletions
@ -0,0 +1,50 @@
@@ -0,0 +1,50 @@
|
||||
// <file>
|
||||
// <copyright license="BSD-new" see="prj:///COPYING"/>
|
||||
// <owner name="David Srbecký" email="dsrbecky@gmail.com"/>
|
||||
// <version>$Revision: 3047 $</version>
|
||||
// </file>
|
||||
|
||||
using System; |
||||
using System.Collections.Generic; |
||||
using System.Collections.ObjectModel; |
||||
using System.Drawing; |
||||
using System.Windows.Forms; |
||||
|
||||
using Aga.Controls.Tree; |
||||
|
||||
using Debugger.Util; |
||||
|
||||
using ICSharpCode.Core; |
||||
using ICSharpCode.SharpDevelop.Gui.Pads; |
||||
|
||||
namespace Debugger.AddIn.TreeModel |
||||
{ |
||||
// This TreeNodeAdv displays exception data.
|
||||
public class TreeViewExceptionNode: TreeNodeAdv |
||||
{ |
||||
private static Dictionary<string, bool> expandedNodes = new Dictionary<string, bool>(); |
||||
|
||||
private TreeViewAdv localVarList; |
||||
|
||||
/// <summary>
|
||||
/// The content of the exception
|
||||
/// </summary>
|
||||
private AbstractNode content; |
||||
|
||||
// TODO: I don't know if I need localVarList
|
||||
private TreeViewExceptionNode(TreeViewAdv localVarList, ExceptionNode exception): base(localVarList, new object()) { |
||||
this.localVarList = localVarList; |
||||
SetContentRecursive(exception); |
||||
} |
||||
|
||||
/// <summary>
|
||||
/// A simple form of SetContentRecursive that changes the current ChildViewNode to
|
||||
/// display the exception parameter passed to it. If the node had any children and is expanded,
|
||||
/// it will recureively set those as well.
|
||||
/// </summary>
|
||||
/// <param name="exception">Contains the exception that will be stored in this particular TreeViewNode.</param>
|
||||
public static void SetContentRecursive(ExceptionNode exception) { |
||||
throw new NotImplementedException(); |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,46 @@
@@ -0,0 +1,46 @@
|
||||
// <file>
|
||||
// <copyright license="BSD-new" see="prj:///COPYING"/>
|
||||
// <owner name="David Srbecký" email="dsrbecky@gmail.com"/>
|
||||
// <version>$Revision: 2813 $</version>
|
||||
// </file>
|
||||
|
||||
using System; |
||||
|
||||
|
||||
namespace Debugger.AddIn.TreeModel |
||||
{ |
||||
/// <summary>
|
||||
/// Represents a row in a TreeViewAdv that contains an IDebugeeException
|
||||
/// </summary>
|
||||
public class ExceptionNode : AbstractNode |
||||
{ |
||||
private IDebugeeException exception; |
||||
private ExceptionNode innerException = null; |
||||
|
||||
public static ExceptionNode Create(Debugger.Exception exception) { |
||||
try { |
||||
return new ExceptionNode(exception); |
||||
} catch (GetValueException e) { |
||||
// TODO: Fix this
|
||||
throw; |
||||
//return new ErrorNode(expression, e);
|
||||
} |
||||
} |
||||
|
||||
private ExceptionNode(IDebugeeException exception){ |
||||
this.exception = exception; |
||||
this.Image = DebuggerIcons.ImageList.Images[0]; // Class
|
||||
this.Name = "Unhandled Exception"; |
||||
this.Type = exception.Type; |
||||
this.Text = exception.Message; |
||||
if (exception.InnerException != null) { |
||||
innerException = new ExceptionNode(exception.InnerException); |
||||
} |
||||
} |
||||
|
||||
|
||||
ExceptionNode InnerException { |
||||
get { return innerException; } |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,21 @@
@@ -0,0 +1,21 @@
|
||||
// <file>
|
||||
// <copyright see="prj:///doc/copyright.txt"/>
|
||||
// <license see="prj:///doc/license.txt"/>
|
||||
// <owner name="David Srbecký" email="dsrbecky@gmail.com"/>
|
||||
// <version>$Revision: 3047 $</version>
|
||||
// </file>
|
||||
|
||||
using System; |
||||
|
||||
namespace Debugger |
||||
{ |
||||
/// <summary>
|
||||
/// Interface shared by Debugger.Exception and Debugger.DebugeeInnerException.
|
||||
/// </summary>
|
||||
public interface IDebugeeException |
||||
{ |
||||
DebugeeInnerException InnerException { get; } |
||||
string Message { get; } |
||||
string Type { get; } |
||||
} |
||||
} |
Loading…
Reference in new issue