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 21 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
public class CatchClause : AbstractNode public class CatchClause : AbstractNode
{ {
TypeReference typeReference; TypeReference typeReference = TypeReference.Null;
string variableName = ""; string variableName = "";
Statement statementBlock = Statement.Null; Statement statementBlock = Statement.Null;
Expression condition = Expression.Null; Expression condition = Expression.Null;

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

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

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

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

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

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

Loading…
Cancel
Save