Browse Source
git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@3241 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61shortcuts
11 changed files with 450 additions and 11 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,154 @@
@@ -0,0 +1,154 @@
|
||||
// <file>
|
||||
// <copyright see="prj:///doc/copyright.txt"/>
|
||||
// <owner name="David Srbecký" email="dsrbecky@gmail.com"/>
|
||||
// <version>$Revision$</version>
|
||||
// </file>
|
||||
#region License
|
||||
//
|
||||
// Copyright (c) 2007, ic#code
|
||||
//
|
||||
// All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are met:
|
||||
//
|
||||
// 1. Redistributions of source code must retain the above copyright notice,
|
||||
// this list of conditions and the following disclaimer.
|
||||
//
|
||||
// 2. Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
//
|
||||
// 3. Neither the name of the ic#code nor the names of its contributors may be
|
||||
// used to endorse or promote products derived from this software without
|
||||
// specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
// POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
#endregion
|
||||
|
||||
using System; |
||||
using System.Windows.Forms; |
||||
|
||||
|
||||
namespace ICSharpCode.SharpDevelop.Services |
||||
{ |
||||
partial class DebugeeExceptionForm : DebuggerEventForm |
||||
{ |
||||
#region Windows Forms Designer generated code
|
||||
/// <summary>
|
||||
/// This method is required for Windows Forms designer support.
|
||||
/// Do not change the method contents inside the source code editor. The Forms designer might
|
||||
/// not be able to load this method if it was changed manually.
|
||||
/// </summary>
|
||||
private void InitializeComponent() { |
||||
this.localVarList = new Aga.Controls.Tree.TreeViewAdv(); |
||||
this.linkExceptionDetail = new System.Windows.Forms.LinkLabel(); |
||||
this.splitContainer = new System.Windows.Forms.SplitContainer(); |
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox)).BeginInit(); |
||||
this.splitContainer.Panel1.SuspendLayout(); |
||||
this.splitContainer.Panel2.SuspendLayout(); |
||||
this.splitContainer.SuspendLayout(); |
||||
this.SuspendLayout(); |
||||
//
|
||||
// textBox
|
||||
//
|
||||
this.textBox.Size = new System.Drawing.Size(542, 139); |
||||
//
|
||||
// buttonBreak
|
||||
//
|
||||
this.buttonBreak.Location = new System.Drawing.Point(176, 356); |
||||
//
|
||||
// buttonContinue
|
||||
//
|
||||
this.buttonContinue.Location = new System.Drawing.Point(274, 356); |
||||
//
|
||||
// buttonTerminate
|
||||
//
|
||||
this.buttonTerminate.Location = new System.Drawing.Point(372, 356); |
||||
//
|
||||
// localVarList
|
||||
//
|
||||
this.localVarList.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) |
||||
| System.Windows.Forms.AnchorStyles.Left) |
||||
| System.Windows.Forms.AnchorStyles.Right))); |
||||
this.localVarList.AutoRowHeight = true; |
||||
this.localVarList.BackColor = System.Drawing.SystemColors.Window; |
||||
this.localVarList.DefaultToolTipProvider = null; |
||||
this.localVarList.DragDropMarkColor = System.Drawing.Color.Black; |
||||
this.localVarList.LineColor = System.Drawing.SystemColors.ControlDark; |
||||
this.localVarList.LoadOnDemand = true; |
||||
this.localVarList.Location = new System.Drawing.Point(3, 4); |
||||
this.localVarList.Model = null; |
||||
this.localVarList.Name = "localVarList"; |
||||
this.localVarList.SelectedNode = null; |
||||
this.localVarList.Size = new System.Drawing.Size(539, 153); |
||||
this.localVarList.TabIndex = 4; |
||||
this.localVarList.UseColumns = true; |
||||
//
|
||||
// linkExceptionDetail
|
||||
//
|
||||
this.linkExceptionDetail.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); |
||||
this.linkExceptionDetail.Location = new System.Drawing.Point(3, 142); |
||||
this.linkExceptionDetail.Name = "linkExceptionDetail"; |
||||
this.linkExceptionDetail.Size = new System.Drawing.Size(543, 23); |
||||
this.linkExceptionDetail.TabIndex = 5; |
||||
this.linkExceptionDetail.TabStop = true; |
||||
this.linkExceptionDetail.Text = "${res:MainWindow.Windows.Debug.ExceptionForm.ShowExceptionDetails}"; |
||||
this.linkExceptionDetail.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkExceptionDetailLinkClicked); |
||||
//
|
||||
// splitContainer
|
||||
//
|
||||
this.splitContainer.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) |
||||
| System.Windows.Forms.AnchorStyles.Left) |
||||
| System.Windows.Forms.AnchorStyles.Right))); |
||||
this.splitContainer.Location = new System.Drawing.Point(76, 16); |
||||
this.splitContainer.Name = "splitContainer"; |
||||
this.splitContainer.Orientation = System.Windows.Forms.Orientation.Horizontal; |
||||
//
|
||||
// splitContainer.Panel1
|
||||
//
|
||||
this.splitContainer.Panel1.Controls.Add(this.linkExceptionDetail); |
||||
//
|
||||
// splitContainer.Panel2
|
||||
//
|
||||
this.splitContainer.Panel2.Controls.Add(this.localVarList); |
||||
this.splitContainer.Size = new System.Drawing.Size(550, 327); |
||||
this.splitContainer.SplitterDistance = 163; |
||||
this.splitContainer.TabIndex = 6; |
||||
//
|
||||
// DebugeeExceptionForm
|
||||
//
|
||||
this.ClientSize = new System.Drawing.Size(638, 399); |
||||
this.Controls.Add(this.splitContainer); |
||||
this.Name = "DebugeeExceptionForm"; |
||||
this.Controls.SetChildIndex(this.splitContainer, 0); |
||||
this.Controls.SetChildIndex(this.textBox, 0); |
||||
this.Controls.SetChildIndex(this.buttonBreak, 0); |
||||
this.Controls.SetChildIndex(this.buttonContinue, 0); |
||||
this.Controls.SetChildIndex(this.buttonTerminate, 0); |
||||
this.Controls.SetChildIndex(this.pictureBox, 0); |
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox)).EndInit(); |
||||
this.splitContainer.Panel1.ResumeLayout(false); |
||||
this.splitContainer.Panel2.ResumeLayout(false); |
||||
this.splitContainer.ResumeLayout(false); |
||||
this.ResumeLayout(false); |
||||
this.PerformLayout(); |
||||
} |
||||
private System.Windows.Forms.SplitContainer splitContainer; |
||||
private Aga.Controls.Tree.TreeViewAdv localVarList; |
||||
private System.Windows.Forms.LinkLabel linkExceptionDetail; |
||||
#endregion
|
||||
|
||||
} |
||||
} |
@ -0,0 +1,145 @@
@@ -0,0 +1,145 @@
|
||||
// <file>
|
||||
// <copyright see="prj:///doc/copyright.txt"/>
|
||||
// <owner name="David Srbecký" email="dsrbecky@gmail.com"/>
|
||||
// <version>$Revision$</version>
|
||||
// </file>
|
||||
#region License
|
||||
//
|
||||
// Copyright (c) 2007, ic#code
|
||||
//
|
||||
// All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are met:
|
||||
//
|
||||
// 1. Redistributions of source code must retain the above copyright notice,
|
||||
// this list of conditions and the following disclaimer.
|
||||
//
|
||||
// 2. Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
//
|
||||
// 3. Neither the name of the ic#code nor the names of its contributors may be
|
||||
// used to endorse or promote products derived from this software without
|
||||
// specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
// POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
#endregion
|
||||
|
||||
using System.Collections.Generic; |
||||
|
||||
using Aga.Controls.Tree; |
||||
using Aga.Controls.Tree.NodeControls; |
||||
|
||||
using Debugger; |
||||
using Debugger.AddIn.TreeModel; |
||||
using Debugger.Expressions; |
||||
using ICSharpCode.Core; |
||||
|
||||
|
||||
namespace ICSharpCode.SharpDevelop.Services |
||||
{ |
||||
internal sealed partial class DebugeeExceptionForm |
||||
{ |
||||
private Result result = Result.Break; // Default
|
||||
|
||||
private DebugeeExceptionForm() |
||||
{ |
||||
InitializeComponent(); |
||||
|
||||
// Windows form designer cannot place a component declared in a base class in a container component
|
||||
// declared in a child class. Hence we do it manually.
|
||||
Controls.Remove(textBox); |
||||
textBox.Location = new System.Drawing.Point(0, 4); |
||||
splitContainer.Panel1.Controls.Add(textBox); |
||||
|
||||
// To make the localVarList size properly, it must be rendered full size first.
|
||||
splitContainer.Panel2Collapsed = true; |
||||
|
||||
linkExceptionDetail.Text = StringParser.Parse(linkExceptionDetail.Text); |
||||
|
||||
InitializeLocalVarList(); |
||||
} |
||||
|
||||
/// <summary>
|
||||
/// Setup the columns for the LocalVarList.
|
||||
/// </summary>
|
||||
private void InitializeLocalVarList() { |
||||
NodeIcon iconControl = new ItemIcon(); |
||||
NodeTextBox nameControl = new ItemName(); |
||||
NodeTextBox textControl = new ItemText(); |
||||
NodeTextBox typeControl = new ItemType(); |
||||
|
||||
TreeColumn nameColumn = new TreeColumn(); |
||||
TreeColumn valColumn = new TreeColumn(); |
||||
TreeColumn typeColumn = new TreeColumn(); |
||||
|
||||
localVarList.Columns.Add(nameColumn); |
||||
localVarList.Columns.Add(valColumn); |
||||
localVarList.Columns.Add(typeColumn); |
||||
localVarList.UseColumns = true; |
||||
localVarList.SelectionMode = TreeSelectionMode.Single; |
||||
localVarList.LoadOnDemand = true; |
||||
|
||||
iconControl.ParentColumn = nameColumn; |
||||
localVarList.NodeControls.Add(iconControl); |
||||
|
||||
nameControl.ParentColumn = nameColumn; |
||||
localVarList.NodeControls.Add(nameControl); |
||||
|
||||
textControl.ParentColumn = valColumn; |
||||
localVarList.NodeControls.Add(textControl); |
||||
|
||||
typeControl.ParentColumn = typeColumn; |
||||
localVarList.NodeControls.Add(typeControl); |
||||
|
||||
nameColumn.Header = ResourceService.GetString("Global.Name"); |
||||
nameColumn.Width = 165; |
||||
valColumn.Header = ResourceService.GetString("Dialog.HighlightingEditor.Properties.Value"); |
||||
valColumn.Width = 200; |
||||
typeColumn.Header = ResourceService.GetString("ResourceEditor.ResourceEdit.TypeColumn"); |
||||
typeColumn.Width = 170; |
||||
} |
||||
|
||||
public static Result Show(Process process, string title, string message, System.Drawing.Bitmap icon, bool canContinue) |
||||
{ |
||||
using (DebugeeExceptionForm form = new DebugeeExceptionForm()) { |
||||
form.Text = title; |
||||
form.pictureBox.Image = icon; |
||||
form.textBox.Text = message; |
||||
|
||||
IList<AbstractNode> exceptionNodes = new List<AbstractNode>(); |
||||
exceptionNodes.Add(ValueNode.Create(new CurrentExceptionExpression())); |
||||
|
||||
form.localVarList.BeginUpdate(); |
||||
TreeViewVarNode.SetContentRecursive(process, form.localVarList, exceptionNodes); |
||||
form.localVarList.EndUpdate(); |
||||
form.localVarList.Refresh(); |
||||
|
||||
form.buttonContinue.Enabled = canContinue; |
||||
form.ShowDialog(Gui.WorkbenchSingleton.MainForm); |
||||
return form.result; |
||||
} |
||||
} |
||||
|
||||
|
||||
void linkExceptionDetailLinkClicked(object sender, System.EventArgs e) |
||||
{ |
||||
splitContainer.Panel2Collapsed = ! splitContainer.Panel2Collapsed; |
||||
linkExceptionDetail.Text = splitContainer.Panel2Collapsed |
||||
? StringParser.Parse("${res:MainWindow.Windows.Debug.ExceptionForm.ShowExceptionDetails}") |
||||
: StringParser.Parse("${res:MainWindow.Windows.Debug.ExceptionForm.HideExceptionDetails}"); |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,120 @@
@@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?> |
||||
<root> |
||||
<!-- |
||||
Microsoft ResX Schema |
||||
|
||||
Version 2.0 |
||||
|
||||
The primary goals of this format is to allow a simple XML format |
||||
that is mostly human readable. The generation and parsing of the |
||||
various data types are done through the TypeConverter classes |
||||
associated with the data types. |
||||
|
||||
Example: |
||||
|
||||
... ado.net/XML headers & schema ... |
||||
<resheader name="resmimetype">text/microsoft-resx</resheader> |
||||
<resheader name="version">2.0</resheader> |
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> |
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> |
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> |
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> |
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> |
||||
<value>[base64 mime encoded serialized .NET Framework object]</value> |
||||
</data> |
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> |
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> |
||||
<comment>This is a comment</comment> |
||||
</data> |
||||
|
||||
There are any number of "resheader" rows that contain simple |
||||
name/value pairs. |
||||
|
||||
Each data row contains a name, and value. The row also contains a |
||||
type or mimetype. Type corresponds to a .NET class that support |
||||
text/value conversion through the TypeConverter architecture. |
||||
Classes that don't support this are serialized and stored with the |
||||
mimetype set. |
||||
|
||||
The mimetype is used for serialized objects, and tells the |
||||
ResXResourceReader how to depersist the object. This is currently not |
||||
extensible. For a given mimetype the value must be set accordingly: |
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format |
||||
that the ResXResourceWriter will generate, however the reader can |
||||
read any of the formats listed below. |
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64 |
||||
value : The object must be serialized with |
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter |
||||
: and then encoded with base64 encoding. |
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64 |
||||
value : The object must be serialized with |
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter |
||||
: and then encoded with base64 encoding. |
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64 |
||||
value : The object must be serialized into a byte array |
||||
: using a System.ComponentModel.TypeConverter |
||||
: and then encoded with base64 encoding. |
||||
--> |
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> |
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> |
||||
<xsd:element name="root" msdata:IsDataSet="true"> |
||||
<xsd:complexType> |
||||
<xsd:choice maxOccurs="unbounded"> |
||||
<xsd:element name="metadata"> |
||||
<xsd:complexType> |
||||
<xsd:sequence> |
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" /> |
||||
</xsd:sequence> |
||||
<xsd:attribute name="name" use="required" type="xsd:string" /> |
||||
<xsd:attribute name="type" type="xsd:string" /> |
||||
<xsd:attribute name="mimetype" type="xsd:string" /> |
||||
<xsd:attribute ref="xml:space" /> |
||||
</xsd:complexType> |
||||
</xsd:element> |
||||
<xsd:element name="assembly"> |
||||
<xsd:complexType> |
||||
<xsd:attribute name="alias" type="xsd:string" /> |
||||
<xsd:attribute name="name" type="xsd:string" /> |
||||
</xsd:complexType> |
||||
</xsd:element> |
||||
<xsd:element name="data"> |
||||
<xsd:complexType> |
||||
<xsd:sequence> |
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> |
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> |
||||
</xsd:sequence> |
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> |
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> |
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> |
||||
<xsd:attribute ref="xml:space" /> |
||||
</xsd:complexType> |
||||
</xsd:element> |
||||
<xsd:element name="resheader"> |
||||
<xsd:complexType> |
||||
<xsd:sequence> |
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> |
||||
</xsd:sequence> |
||||
<xsd:attribute name="name" type="xsd:string" use="required" /> |
||||
</xsd:complexType> |
||||
</xsd:element> |
||||
</xsd:choice> |
||||
</xsd:complexType> |
||||
</xsd:element> |
||||
</xsd:schema> |
||||
<resheader name="resmimetype"> |
||||
<value>text/microsoft-resx</value> |
||||
</resheader> |
||||
<resheader name="version"> |
||||
<value>2.0</value> |
||||
</resheader> |
||||
<resheader name="reader"> |
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
||||
</resheader> |
||||
<resheader name="writer"> |
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
||||
</resheader> |
||||
</root> |
Binary file not shown.
Loading…
Reference in new issue