Browse Source

Fixed SD2-379 (Exception dialog box).

Fixed bug with empty catch statements.

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@297 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
Daniel Grunwald 20 years ago
parent
commit
68c1a4a56a
  1. 2
      src/Libraries/NRefactory/Project/Src/Parser/AST/General/Statements/TryCatchStatement.cs
  2. 2
      src/Main/Base/Project/Src/Dom/ReflectionLayer/ReflectionClass.cs
  3. 4
      src/Main/Base/Project/Src/Services/ParserService/ReflectionProjectContent.cs
  4. 181
      src/Main/StartUp/Project/Dialogs/ExceptionBox.cs

2
src/Libraries/NRefactory/Project/Src/Parser/AST/General/Statements/TryCatchStatement.cs

@ -72,7 +72,7 @@ namespace ICSharpCode.NRefactory.Parser.AST @@ -72,7 +72,7 @@ namespace ICSharpCode.NRefactory.Parser.AST
public class CatchClause : AbstractNode
{
TypeReference typeReference;
TypeReference typeReference = TypeReference.Null;
string variableName = "";
Statement statementBlock = Statement.Null;
Expression condition = Expression.Null;

2
src/Main/Base/Project/Src/Dom/ReflectionLayer/ReflectionClass.cs

@ -19,7 +19,7 @@ namespace ICSharpCode.SharpDevelop.Dom @@ -19,7 +19,7 @@ namespace ICSharpCode.SharpDevelop.Dom
{
Type type;
BindingFlags flags = BindingFlags.Instance |
const BindingFlags flags = BindingFlags.Instance |
BindingFlags.Static |
BindingFlags.NonPublic |
BindingFlags.DeclaredOnly |

4
src/Main/Base/Project/Src/Services/ParserService/ReflectionProjectContent.cs

@ -30,7 +30,9 @@ namespace ICSharpCode.Core @@ -30,7 +30,9 @@ namespace ICSharpCode.Core
try {
foreach (Type type in assembly.GetExportedTypes()) {
AddClassToNamespaceListInternal(new ReflectionClass(assemblyCompilationUnit, type, null));
if (!type.IsNested) {
AddClassToNamespaceListInternal(new ReflectionClass(assemblyCompilationUnit, type, null));
}
}
} catch (Exception ex) {
MessageService.ShowError(ex);

181
src/Main/StartUp/Project/Dialogs/ExceptionBox.cs

@ -107,123 +107,130 @@ namespace ICSharpCode.SharpDevelop @@ -107,123 +107,130 @@ namespace ICSharpCode.SharpDevelop
Close();
}
void CloseButtonClick(object sender, EventArgs e)
{
if (MessageService.AskQuestion("Do you really want to quit SharpDevelop?")) {
Application.Exit();
}
}
void InitializeComponent() {
this.pictureBox = new System.Windows.Forms.PictureBox();
this.reportButton = new System.Windows.Forms.Button();
this.continueButton = new System.Windows.Forms.Button();
this.label = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
//this.includeSysInfoCheckBox = new System.Windows.Forms.CheckBox();
this.copyErrorCheckBox = new System.Windows.Forms.CheckBox();
this.exceptionTextBox = new System.Windows.Forms.TextBox();
this.SuspendLayout();
//
// pictureBox
// ExceptionBox
//
this.pictureBox.Location = new System.Drawing.Point(0, 0);
this.pictureBox.Name = "pictureBox";
this.pictureBox.Size = new System.Drawing.Size(224, 464);
this.pictureBox.TabIndex = 0;
this.pictureBox.TabStop = false;
this.ClientSize = new System.Drawing.Size(688, 453);
closeButton = new System.Windows.Forms.Button();
//
// reportButton
// closeButton
//
this.reportButton.FlatStyle = System.Windows.Forms.FlatStyle.System;
this.reportButton.Location = new System.Drawing.Point(232, 424);
this.reportButton.Name = "reportButton";
this.reportButton.Size = new System.Drawing.Size(216, 23);
this.reportButton.TabIndex = 4;
this.reportButton.Text = "Report Error to SharpDevelop Team";
this.reportButton.Click += new System.EventHandler(this.buttonClick);
closeButton.Location = new System.Drawing.Point(454, 424);
closeButton.Name = "closeButton";
closeButton.Size = new System.Drawing.Size(140, 23);
closeButton.TabIndex = 5;
closeButton.Text = "Exit SharpDevelop";
closeButton.Click += new System.EventHandler(this.CloseButtonClick);
label3 = new System.Windows.Forms.Label();
//
// continueButton
// label3
//
this.continueButton.FlatStyle = System.Windows.Forms.FlatStyle.System;
this.continueButton.Location = new System.Drawing.Point(600, 424);
this.continueButton.Name = "continueButton";
this.continueButton.TabIndex = 5;
this.continueButton.Text = "Continue";
this.continueButton.Click += new System.EventHandler(this.continueButtonClick);
label3.Location = new System.Drawing.Point(232, 152);
label3.Name = "label3";
label3.Size = new System.Drawing.Size(448, 23);
label3.TabIndex = 9;
label3.Text = "Thank you for helping make SharpDevelop a better program for everyone!";
label2 = new System.Windows.Forms.Label();
//
// label
// label2
//
this.label.Location = new System.Drawing.Point(232, 8);
this.label.Name = "label";
this.label.Size = new System.Drawing.Size(448, 48);
this.label.TabIndex = 6;
this.label.Text = "An unhandled exception has occurred in SharpDevelop. This is unexpected and we\'d " +
"ask you to help us improve SharpDevelop by reporting this error to the SharpDeve" +
"lop team. ";
label2.Location = new System.Drawing.Point(232, 64);
label2.Name = "label2";
label2.Size = new System.Drawing.Size(448, 80);
label2.TabIndex = 8;
label2.Text = "How to report errors efficiently: We have set up a Web-based forum to report and track errors that are reported by users of SharpDevelop. To minimize necessary questions by the team members, in addition to providing the error message that is copied to the clipboard for easier pasting in the error report, we ask that you provide us with an as detailed as possible step-by-step procedure to reproduce this bug.";
label = new System.Windows.Forms.Label();
//
// label2
// label
//
this.label2.Location = new System.Drawing.Point(232, 64);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(448, 80);
this.label2.TabIndex = 8;
this.label2.Text = @"How to report errors efficiently: We have set up a Web-based forum to report and track errors that are reported by users of SharpDevelop. To minimize necessary questions by the team members, in addition to providing the error message that is copied to the clipboard for easier pasting in the error report, we ask that you provide us with an as detailed as possible step-by-step procedure to reproduce this bug. ";
label.Location = new System.Drawing.Point(232, 8);
label.Name = "label";
label.Size = new System.Drawing.Size(448, 48);
label.TabIndex = 6;
label.Text = "An unhandled exception has occurred in SharpDevelop. This is unexpected and we\'d " +
"ask you to help us improve SharpDevelop by reporting this error to the SharpDeve" +
"lop team.";
continueButton = new System.Windows.Forms.Button();
//
// label3
// continueButton
//
this.label3.Location = new System.Drawing.Point(232, 152);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(448, 23);
this.label3.TabIndex = 9;
this.label3.Text = "Thank you for helping make SharpDevelop a better program for everyone!";
continueButton.Location = new System.Drawing.Point(600, 424);
continueButton.Name = "continueButton";
continueButton.Size = new System.Drawing.Size(75, 23);
continueButton.TabIndex = 6;
continueButton.Text = "Continue";
continueButton.Click += new System.EventHandler(this.continueButtonClick);
reportButton = new System.Windows.Forms.Button();
//
// includeSysInfoCheckBox
// reportButton
//
/*this.includeSysInfoCheckBox.Checked = true;
this.includeSysInfoCheckBox.CheckState = System.Windows.Forms.CheckState.Checked;
this.includeSysInfoCheckBox.FlatStyle = System.Windows.Forms.FlatStyle.System;
this.includeSysInfoCheckBox.Location = new System.Drawing.Point(232, 392);
this.includeSysInfoCheckBox.Name = "includeSysInfoCheckBox";
this.includeSysInfoCheckBox.Size = new System.Drawing.Size(440, 24);
this.includeSysInfoCheckBox.TabIndex = 3;
this.includeSysInfoCheckBox.Text = "Include system information (version of Windows, .NET framework)";*/
reportButton.Location = new System.Drawing.Point(232, 424);
reportButton.Name = "reportButton";
reportButton.Size = new System.Drawing.Size(216, 23);
reportButton.TabIndex = 4;
reportButton.Text = "Report Error to SharpDevelop Team";
reportButton.Click += new System.EventHandler(this.buttonClick);
copyErrorCheckBox = new System.Windows.Forms.CheckBox();
//
// copyErrorCheckBox
//
this.copyErrorCheckBox.Checked = true;
this.copyErrorCheckBox.CheckState = System.Windows.Forms.CheckState.Checked;
this.copyErrorCheckBox.FlatStyle = System.Windows.Forms.FlatStyle.System;
this.copyErrorCheckBox.Location = new System.Drawing.Point(232, 368);
this.copyErrorCheckBox.Name = "copyErrorCheckBox";
this.copyErrorCheckBox.Size = new System.Drawing.Size(440, 24);
this.copyErrorCheckBox.TabIndex = 2;
this.copyErrorCheckBox.Text = "Copy error message to clipboard";
copyErrorCheckBox.Checked = true;
copyErrorCheckBox.CheckState = System.Windows.Forms.CheckState.Checked;
copyErrorCheckBox.Location = new System.Drawing.Point(232, 368);
copyErrorCheckBox.Name = "copyErrorCheckBox";
copyErrorCheckBox.Size = new System.Drawing.Size(440, 24);
copyErrorCheckBox.TabIndex = 2;
copyErrorCheckBox.Text = "Copy error message to clipboard";
exceptionTextBox = new System.Windows.Forms.TextBox();
//
// exceptionTextBox
//
this.exceptionTextBox.Location = new System.Drawing.Point(232, 176);
this.exceptionTextBox.Multiline = true;
this.exceptionTextBox.Name = "exceptionTextBox";
this.exceptionTextBox.ReadOnly = true;
this.exceptionTextBox.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
this.exceptionTextBox.Size = new System.Drawing.Size(448, 184);
this.exceptionTextBox.TabIndex = 1;
this.exceptionTextBox.Text = "textBoxExceptionText";
exceptionTextBox.Location = new System.Drawing.Point(232, 176);
exceptionTextBox.Multiline = true;
exceptionTextBox.Name = "exceptionTextBox";
exceptionTextBox.ReadOnly = true;
exceptionTextBox.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
exceptionTextBox.Size = new System.Drawing.Size(448, 184);
exceptionTextBox.TabIndex = 1;
exceptionTextBox.Text = "textBoxExceptionText";
pictureBox = new System.Windows.Forms.PictureBox();
((System.ComponentModel.ISupportInitialize)(pictureBox)).BeginInit();
//
// ExceptionBox
// pictureBox
//
// this.AutoScaleBaseSize = new System.Drawing.Size(5, 14);
this.ClientSize = new System.Drawing.Size(688, 453);
this.Controls.Add(this.label3);
this.Controls.Add(this.label2);
this.Controls.Add(this.label);
this.Controls.Add(this.continueButton);
this.Controls.Add(this.reportButton);
//this.Controls.Add(this.includeSysInfoCheckBox);
this.Controls.Add(this.copyErrorCheckBox);
this.Controls.Add(this.exceptionTextBox);
this.Controls.Add(this.pictureBox);
pictureBox.Location = new System.Drawing.Point(0, 0);
pictureBox.Name = "pictureBox";
pictureBox.Size = new System.Drawing.Size(224, 464);
pictureBox.TabIndex = 0;
pictureBox.TabStop = false;
((System.ComponentModel.ISupportInitialize)(pictureBox)).EndInit();
this.Controls.Add(closeButton);
this.Controls.Add(label3);
this.Controls.Add(label2);
this.Controls.Add(label);
this.Controls.Add(continueButton);
this.Controls.Add(reportButton);
this.Controls.Add(copyErrorCheckBox);
this.Controls.Add(exceptionTextBox);
this.Controls.Add(pictureBox);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "ExceptionBox";
this.Text = "Unhandled exception has occured";
this.SuspendLayout();
this.ResumeLayout(false);
this.PerformLayout();
}
private System.Windows.Forms.Button closeButton;
}
}

Loading…
Cancel
Save