diff --git a/src/AddIns/DisplayBindings/FormDesigner/Project/Src/Commands/FormCommands.cs b/src/AddIns/DisplayBindings/FormDesigner/Project/Src/Commands/FormCommands.cs index 78a105488b..db82c4148e 100644 --- a/src/AddIns/DisplayBindings/FormDesigner/Project/Src/Commands/FormCommands.cs +++ b/src/AddIns/DisplayBindings/FormDesigner/Project/Src/Commands/FormCommands.cs @@ -61,7 +61,7 @@ namespace ICSharpCode.SharpDevelop.FormEditor.Commands menuCommandService.GlobalInvoke(CommandID); } } catch (Exception e) { - Console.WriteLine("Got Exception {0}", e); + MessageService.ShowError(e); } } } @@ -141,7 +141,7 @@ namespace ICSharpCode.SharpDevelop.FormEditor.Commands try { verb.Invoke(); } catch (Exception ex) { - Console.WriteLine("Got Exception {0}", ex); + MessageService.ShowError(ex); } } } diff --git a/src/AddIns/DisplayBindings/FormDesigner/Project/Src/FormDesigner/DesignerGenerator/CSharpDesignerGenerator.cs b/src/AddIns/DisplayBindings/FormDesigner/Project/Src/FormDesigner/DesignerGenerator/CSharpDesignerGenerator.cs index 8cc8bfe2fa..1adaf08c33 100644 --- a/src/AddIns/DisplayBindings/FormDesigner/Project/Src/FormDesigner/DesignerGenerator/CSharpDesignerGenerator.cs +++ b/src/AddIns/DisplayBindings/FormDesigner/Project/Src/FormDesigner/DesignerGenerator/CSharpDesignerGenerator.cs @@ -74,7 +74,7 @@ namespace ICSharpCode.FormDesigner } } } catch (Exception ex) { - Console.WriteLine(ex); + MessageService.ShowError(ex); } } @@ -87,7 +87,7 @@ namespace ICSharpCode.FormDesigner int endOffset = viewContent.Document.PositionToOffset(new Point(0, initializeComponents.BodyRegion.EndLine)); viewContent.Document.Insert(endOffset, "\t\tprivate " + e.Component.GetType() + " " + e.Component.Site.Name + ";" + Environment.NewLine); } catch (Exception ex) { - Console.WriteLine(ex); + MessageService.ShowError(ex); } } diff --git a/src/AddIns/DisplayBindings/FormDesigner/Project/Src/FormDesigner/DesignerGenerator/VBNetDesignerGenerator.cs b/src/AddIns/DisplayBindings/FormDesigner/Project/Src/FormDesigner/DesignerGenerator/VBNetDesignerGenerator.cs index d8fd9e9f6b..bee3cd7f60 100644 --- a/src/AddIns/DisplayBindings/FormDesigner/Project/Src/FormDesigner/DesignerGenerator/VBNetDesignerGenerator.cs +++ b/src/AddIns/DisplayBindings/FormDesigner/Project/Src/FormDesigner/DesignerGenerator/VBNetDesignerGenerator.cs @@ -74,7 +74,7 @@ namespace ICSharpCode.FormDesigner } } } catch (Exception ex) { - Console.WriteLine(ex); + MessageService.ShowError(ex); } } @@ -87,7 +87,7 @@ namespace ICSharpCode.FormDesigner int endOffset = viewContent.Document.PositionToOffset(new Point(0, initializeComponents.BodyRegion.EndLine)); viewContent.Document.Insert(endOffset, "\tPrivate " + e.Component.Site.Name + " As " + e.Component.GetType() + Environment.NewLine); } catch (Exception ex) { - Console.WriteLine(ex); + MessageService.ShowError(ex); } } diff --git a/src/AddIns/DisplayBindings/FormDesigner/Project/Src/FormDesigner/DesignerGenerator/XmlDesignerGenerator.cs b/src/AddIns/DisplayBindings/FormDesigner/Project/Src/FormDesigner/DesignerGenerator/XmlDesignerGenerator.cs index 7178683881..713dd831e2 100644 --- a/src/AddIns/DisplayBindings/FormDesigner/Project/Src/FormDesigner/DesignerGenerator/XmlDesignerGenerator.cs +++ b/src/AddIns/DisplayBindings/FormDesigner/Project/Src/FormDesigner/DesignerGenerator/XmlDesignerGenerator.cs @@ -170,7 +170,7 @@ namespace ICSharpCode.FormDesigner return el; } catch (Exception e) { - Console.WriteLine(e.ToString()); + ICSharpCode.Core.MessageService.ShowError(e); } return null; } diff --git a/src/AddIns/DisplayBindings/FormDesigner/Project/Src/FormDesigner/FormDesignerSecondaryDisplayBinding.cs b/src/AddIns/DisplayBindings/FormDesigner/Project/Src/FormDesigner/FormDesignerSecondaryDisplayBinding.cs index 316482a756..6402c1ea42 100644 --- a/src/AddIns/DisplayBindings/FormDesigner/Project/Src/FormDesigner/FormDesignerSecondaryDisplayBinding.cs +++ b/src/AddIns/DisplayBindings/FormDesigner/Project/Src/FormDesigner/FormDesignerSecondaryDisplayBinding.cs @@ -86,12 +86,10 @@ namespace ICSharpCode.FormDesigner ITextEditorControlProvider textAreaControlProvider = (ITextEditorControlProvider)viewContent; string fileExtension = String.Empty; string fileName = viewContent.IsUntitled ? viewContent.UntitledName : viewContent.FileName; + if (fileName == null) + return false; - try { - fileExtension = Path.GetExtension(fileName).ToLower(); - } catch (Exception e) { - Console.WriteLine(e); - } + fileExtension = Path.GetExtension(fileName).ToLower(); switch (fileExtension) { case ".cs": @@ -136,11 +134,7 @@ namespace ICSharpCode.FormDesigner string fileExtension = String.Empty; string fileName = viewContent.IsUntitled ? viewContent.UntitledName : viewContent.FileName; - try { - fileExtension = Path.GetExtension(fileName).ToLower(); - } catch (Exception e) { - Console.WriteLine(e); - } + fileExtension = Path.GetExtension(fileName).ToLower(); if (!FormKeyHandler.inserted) { FormKeyHandler.Insert(); diff --git a/src/AddIns/DisplayBindings/FormDesigner/Project/Src/FormDesigner/Gui/AddComponentsDialog.cs b/src/AddIns/DisplayBindings/FormDesigner/Project/Src/FormDesigner/Gui/AddComponentsDialog.cs index a0fa8b87bf..c24bc533f6 100644 --- a/src/AddIns/DisplayBindings/FormDesigner/Project/Src/FormDesigner/Gui/AddComponentsDialog.cs +++ b/src/AddIns/DisplayBindings/FormDesigner/Project/Src/FormDesigner/Gui/AddComponentsDialog.cs @@ -142,7 +142,7 @@ namespace ICSharpCode.FormDesigner.Gui } } } catch (Exception e) { - Console.WriteLine("got exception : " + e.ToString()); + MessageService.ShowError(e); } } ((ListView)ControlDictionary["componentListView"]).EndUpdate(); diff --git a/src/AddIns/DisplayBindings/FormDesigner/Project/Src/FormDesigner/Gui/OptionPanels/GridOptions.cs b/src/AddIns/DisplayBindings/FormDesigner/Project/Src/FormDesigner/Gui/OptionPanels/GridOptions.cs index d850759510..a3acfef353 100644 --- a/src/AddIns/DisplayBindings/FormDesigner/Project/Src/FormDesigner/Gui/OptionPanels/GridOptions.cs +++ b/src/AddIns/DisplayBindings/FormDesigner/Project/Src/FormDesigner/Gui/OptionPanels/GridOptions.cs @@ -37,8 +37,7 @@ namespace ICSharpCode.FormDesigner.Gui.OptionPanels int width = 0; try { width = Int32.Parse(ControlDictionary["widthTextBox"].Text); - } catch (Exception e) { - Console.WriteLine(e); + } catch { MessageService.ShowError("Forms Designer grid with is invalid"); return false; } @@ -46,8 +45,7 @@ namespace ICSharpCode.FormDesigner.Gui.OptionPanels int height = 0; try { height = Int32.Parse(ControlDictionary["heightTextBox"].Text); - } catch (Exception e) { - Console.WriteLine(e); + } catch { MessageService.ShowError("Forms Designer height with is invalid"); return false; } diff --git a/src/AddIns/DisplayBindings/FormDesigner/Project/Src/FormDesigner/Services/DefaultServiceContainer.cs b/src/AddIns/DisplayBindings/FormDesigner/Project/Src/FormDesigner/Services/DefaultServiceContainer.cs index c33e1210c4..cec7e4ef97 100644 --- a/src/AddIns/DisplayBindings/FormDesigner/Project/Src/FormDesigner/Services/DefaultServiceContainer.cs +++ b/src/AddIns/DisplayBindings/FormDesigner/Project/Src/FormDesigner/Services/DefaultServiceContainer.cs @@ -44,7 +44,7 @@ namespace ICSharpCode.FormDesigner.Services try { disposeMe.Dispose(); } catch (Exception e) { - Console.WriteLine("Exception while disposing " + disposeMe + ":" + e.ToString()); + ICSharpCode.Core.MessageService.ShowError(e, "Exception while disposing " + disposeMe); } } } diff --git a/src/AddIns/Misc/SubversionAddIn/Project/Src/SvnClient.cs b/src/AddIns/Misc/SubversionAddIn/Project/Src/SvnClient.cs index aa6dfd6133..87a02af151 100644 --- a/src/AddIns/Misc/SubversionAddIn/Project/Src/SvnClient.cs +++ b/src/AddIns/Misc/SubversionAddIn/Project/Src/SvnClient.cs @@ -206,7 +206,7 @@ namespace ICSharpCode.Svn inOperationForm = null; } } catch (Exception e) { - Console.WriteLine(e); + MessageService.ShowError(e); } finally { done = true; } diff --git a/src/Libraries/ICSharpCode.TextEditor/Project/Src/Util/RtfWriter.cs b/src/Libraries/ICSharpCode.TextEditor/Project/Src/Util/RtfWriter.cs index 802f73edeb..fefc2c2ce9 100644 --- a/src/Libraries/ICSharpCode.TextEditor/Project/Src/Util/RtfWriter.cs +++ b/src/Libraries/ICSharpCode.TextEditor/Project/Src/Util/RtfWriter.cs @@ -21,29 +21,24 @@ namespace ICSharpCode.TextEditor.Util public static string GenerateRtf(TextArea textArea) { - try { - colors = new Dictionary(); - colorNum = 0; - colorString = new StringBuilder(); - - - StringBuilder rtf = new StringBuilder(); - - rtf.Append(@"{\rtf1\ansi\ansicpg1252\deff0\deflang1031"); - BuildFontTable(textArea.Document, rtf); - rtf.Append('\n'); - - string fileContent = BuildFileContent(textArea); - BuildColorTable(textArea.Document, rtf); - rtf.Append('\n'); - rtf.Append(@"\viewkind4\uc1\pard"); - rtf.Append(fileContent); - rtf.Append("}"); - return rtf.ToString(); - } catch (Exception e) { - Console.WriteLine(e.ToString()); - } - return null; + colors = new Dictionary(); + colorNum = 0; + colorString = new StringBuilder(); + + + StringBuilder rtf = new StringBuilder(); + + rtf.Append(@"{\rtf1\ansi\ansicpg1252\deff0\deflang1031"); + BuildFontTable(textArea.Document, rtf); + rtf.Append('\n'); + + string fileContent = BuildFileContent(textArea); + BuildColorTable(textArea.Document, rtf); + rtf.Append('\n'); + rtf.Append(@"\viewkind4\uc1\pard"); + rtf.Append(fileContent); + rtf.Append("}"); + return rtf.ToString(); } static void BuildColorTable(IDocument doc, StringBuilder rtf) diff --git a/src/Main/Base/Project/Src/Dom/NRefactoryResolver/NRefactoryResolver.cs b/src/Main/Base/Project/Src/Dom/NRefactoryResolver/NRefactoryResolver.cs index d337ec9c03..705b7712e5 100644 --- a/src/Main/Base/Project/Src/Dom/NRefactoryResolver/NRefactoryResolver.cs +++ b/src/Main/Base/Project/Src/Dom/NRefactoryResolver/NRefactoryResolver.cs @@ -414,9 +414,6 @@ namespace ICSharpCode.SharpDevelop.Dom.NRefactoryResolver if (newOffset <= 0) break; offset = newOffset; } -// Console.WriteLine("", startLine, endLine); -// Console.Write(fileContent.Substring(startOffset, offset - startOffset)); -// Console.WriteLine(""); int length = offset - startOffset; string classDecl, endClassDecl; if (language == SupportedLanguages.VBNet) { diff --git a/src/Main/Base/Project/Src/Gui/Dialogs/NewFileDialog.cs b/src/Main/Base/Project/Src/Gui/Dialogs/NewFileDialog.cs index bf9b5dd0e3..707caead3e 100644 --- a/src/Main/Base/Project/Src/Gui/Dialogs/NewFileDialog.cs +++ b/src/Main/Base/Project/Src/Gui/Dialogs/NewFileDialog.cs @@ -59,7 +59,7 @@ namespace ICSharpCode.SharpDevelop.Gui ((TreeView)ControlDictionary["categoryTreeView"]).Select(); } catch (Exception e) { - Console.WriteLine(e.ToString()); + MessageService.ShowError(e); } } @@ -289,7 +289,7 @@ namespace ICSharpCode.SharpDevelop.Gui ++curNumber; } } catch (Exception e) { - Console.WriteLine(e); + MessageService.ShowError(e); } } return StringParser.Parse(SelectedTemplate.DefaultName); diff --git a/src/Main/Base/Project/Src/Gui/Dialogs/NewProjectDialog.cs b/src/Main/Base/Project/Src/Gui/Dialogs/NewProjectDialog.cs index ddde6a2fc5..396195b1ee 100644 --- a/src/Main/Base/Project/Src/Gui/Dialogs/NewProjectDialog.cs +++ b/src/Main/Base/Project/Src/Gui/Dialogs/NewProjectDialog.cs @@ -219,7 +219,7 @@ namespace ICSharpCode.SharpDevelop.Project.Dialogs } } } catch (Exception ex) { - Console.WriteLine(ex); + MessageService.ShowError(ex); } ControlDictionary["createInLabel"].Text = ResourceService.GetString("Dialog.NewProject.ProjectAtDescription")+ " " + solutionPath; } diff --git a/src/Main/Base/Project/Src/Gui/Pads/ErrorList/ErrorList.cs b/src/Main/Base/Project/Src/Gui/Pads/ErrorList/ErrorList.cs index 4b312cae4b..b2013cb949 100644 --- a/src/Main/Base/Project/Src/Gui/Pads/ErrorList/ErrorList.cs +++ b/src/Main/Base/Project/Src/Gui/Pads/ErrorList/ErrorList.cs @@ -153,7 +153,7 @@ namespace ICSharpCode.SharpDevelop.Gui listView.Items.Clear(); UpdateToolstripStatus(); } catch (Exception ex) { - Console.WriteLine(ex); + MessageService.ShowError(ex); } } @@ -304,7 +304,6 @@ namespace ICSharpCode.SharpDevelop.Gui void UpdateToolstripStatus() { - Console.WriteLine("Updpate " + TaskService.TaskCount); foreach (ToolStripItem item in toolStrip.Items) { if (item is IStatusUpdate) { ((IStatusUpdate)item).UpdateStatus(); diff --git a/src/Main/Base/Project/Src/Gui/Pads/OpenTaskView.cs b/src/Main/Base/Project/Src/Gui/Pads/OpenTaskView.cs index 2fcd54ff20..ca2b6aec82 100644 --- a/src/Main/Base/Project/Src/Gui/Pads/OpenTaskView.cs +++ b/src/Main/Base/Project/Src/Gui/Pads/OpenTaskView.cs @@ -101,11 +101,7 @@ namespace ICSharpCode.SharpDevelop.Gui void OnCombineClosed(object sender, EventArgs e) { - try { - listView.Items.Clear(); - } catch (Exception ex) { - Console.WriteLine(ex); - } + listView.Items.Clear(); } void SelectTaskView(object sender, EventArgs e) @@ -143,7 +139,7 @@ namespace ICSharpCode.SharpDevelop.Gui taskToolTip.SetToolTip(listView, description); taskToolTip.Active = true; } else { - taskToolTip.RemoveAll(); + taskToolTip.RemoveAll(); taskToolTip.Active = false; } currentListViewItem = item; @@ -185,12 +181,12 @@ namespace ICSharpCode.SharpDevelop.Gui } catch (Exception) {} ListViewItem item = new ListViewItem(new string[] { - String.Empty, - (task.Line + 1).ToString(), - FormatDescription(task.Description), - fileName, - path - }); + String.Empty, + (task.Line + 1).ToString(), + FormatDescription(task.Description), + fileName, + path + }); item.ImageIndex = item.StateImageIndex = imageIndex; item.Tag = task; listView.Items.Add(item); @@ -223,7 +219,7 @@ namespace ICSharpCode.SharpDevelop.Gui /// /// Removes new lines, carriage returns and tab characters from - /// the list view task description and replaces them with a space. + /// the list view task description and replaces them with a space. /// /// The task list description. /// A formatted task list description. diff --git a/src/Main/Base/Project/Src/Gui/Workbench/DefaultWorkbench.cs b/src/Main/Base/Project/Src/Gui/Workbench/DefaultWorkbench.cs index 3ba6d12306..de8492e548 100644 --- a/src/Main/Base/Project/Src/Gui/Workbench/DefaultWorkbench.cs +++ b/src/Main/Base/Project/Src/Gui/Workbench/DefaultWorkbench.cs @@ -208,7 +208,7 @@ namespace ICSharpCode.SharpDevelop.Gui ((IMementoCapable)content).SetMemento(memento); } } catch (Exception e) { - Console.WriteLine("Can't get/set memento : " + e.ToString()); + MessageService.ShowError(e, "Can't get/set memento"); } } diff --git a/src/Main/Base/Project/Src/Gui/Workbench/Layouts/SdiWorkspaceLayout.cs b/src/Main/Base/Project/Src/Gui/Workbench/Layouts/SdiWorkspaceLayout.cs index 36d6d11d43..029f22900a 100644 --- a/src/Main/Base/Project/Src/Gui/Workbench/Layouts/SdiWorkspaceLayout.cs +++ b/src/Main/Base/Project/Src/Gui/Workbench/Layouts/SdiWorkspaceLayout.cs @@ -253,7 +253,7 @@ namespace ICSharpCode.SharpDevelop.Gui } } } catch (Exception e) { - Console.WriteLine(e); + MessageService.ShowError(e); } } @@ -267,7 +267,7 @@ namespace ICSharpCode.SharpDevelop.Gui padContentWrapper.DetachContent(); padContentWrapper.Dispose(); } - } catch (Exception e) { Console.WriteLine(e); } + } catch (Exception e) { MessageService.ShowError(e); } } if (dispose) { contentHash.Clear(); @@ -286,7 +286,7 @@ namespace ICSharpCode.SharpDevelop.Gui f.DetachContent(); f.Dispose(); } - } catch (Exception e) { Console.WriteLine(e); } + } catch (Exception e) { MessageService.ShowError(e); } } } public void Detach() @@ -304,7 +304,7 @@ namespace ICSharpCode.SharpDevelop.Gui dockPanel = null; } } catch (Exception e) { - Console.WriteLine(e); + MessageService.ShowError(e); } if (contentHash != null) { contentHash.Clear(); diff --git a/src/Main/Base/Project/Src/Gui/XmlForms/Lib/XmlLoader.cs b/src/Main/Base/Project/Src/Gui/XmlForms/Lib/XmlLoader.cs index 61b21e028c..e05b5a9d19 100644 --- a/src/Main/Base/Project/Src/Gui/XmlForms/Lib/XmlLoader.cs +++ b/src/Main/Base/Project/Src/Gui/XmlForms/Lib/XmlLoader.cs @@ -318,8 +318,7 @@ namespace ICSharpCode.SharpDevelop.Gui.XmlForms } } } catch (Exception e) { - Console.WriteLine(e.ToString()); - throw new ApplicationException("error while setting property " + propertyName + " of object "+ o.ToString() + " to value '" + val+ "'"); + throw new ApplicationException("error while setting property " + propertyName + " of object "+ o.ToString() + " to value '" + val+ "'", e); } } diff --git a/src/Main/Base/Project/Src/Services/ParserService/ParserService.cs b/src/Main/Base/Project/Src/Services/ParserService/ParserService.cs index 8ff8b6dcd2..d540a1d5c7 100644 --- a/src/Main/Base/Project/Src/Services/ParserService/ParserService.cs +++ b/src/Main/Base/Project/Src/Services/ParserService/ParserService.cs @@ -364,7 +364,7 @@ namespace ICSharpCode.Core try { OnParseInformationUpdated(new ParseInformationEventArgs(fileName, parseInformation, parserOutput)); } catch (Exception e) { - Console.WriteLine(e); + MessageService.ShowError(e); } } diff --git a/src/Main/Base/Project/Src/Services/ProjectService/ParseableFileContentEnumerator.cs b/src/Main/Base/Project/Src/Services/ProjectService/ParseableFileContentEnumerator.cs index 4d63cdf013..6aaa394687 100644 --- a/src/Main/Base/Project/Src/Services/ProjectService/ParseableFileContentEnumerator.cs +++ b/src/Main/Base/Project/Src/Services/ProjectService/ParseableFileContentEnumerator.cs @@ -121,9 +121,13 @@ namespace ICSharpCode.SharpDevelop.Project } else { fileContent = GetFileContent(item); } + } catch (FileNotFoundException ex) { + res = null; + Console.WriteLine("ParseableFileContentEnumerator: " + ex.Message); + return MoveNext(); // skip files that were not found } catch (IOException ex) { res = null; - Console.WriteLine(ex); + Console.WriteLine("ParseableFileContentEnumerator: " + ex.Message); return MoveNext(); // skip invalid files } if (nextItem != null && nextItem.ItemType == ItemType.Compile && CanReadAsync(nextItem)) diff --git a/src/Main/Base/Project/Src/TextEditor/Actions.cs b/src/Main/Base/Project/Src/TextEditor/Actions.cs index 81fc1f87e8..267e8917e7 100644 --- a/src/Main/Base/Project/Src/TextEditor/Actions.cs +++ b/src/Main/Base/Project/Src/TextEditor/Actions.cs @@ -80,8 +80,7 @@ namespace ICSharpCode.SharpDevelop.DefaultEditor.Actions else FileService.JumpToFilePosition(pos.Filename, pos.Position.X - 1, pos.Position.Y - 1); } catch (Exception ex) { - Console.WriteLine("Error jumping to '" + pos.Filename + "':\n" + ex.ToString()); - MessageBox.Show("Error jumping to '" + pos.Filename + "':\n" + ex.ToString()); + MessageService.ShowError(ex, "Error jumping to '" + pos.Filename + "'."); } } } diff --git a/src/Main/Base/Project/Src/TextEditor/Gui/Editor/CompletionWindow/CodeCompletionData.cs b/src/Main/Base/Project/Src/TextEditor/Gui/Editor/CompletionWindow/CodeCompletionData.cs index 6a00a4fcfc..1064e8a551 100644 --- a/src/Main/Base/Project/Src/TextEditor/Gui/Editor/CompletionWindow/CodeCompletionData.cs +++ b/src/Main/Base/Project/Src/TextEditor/Gui/Editor/CompletionWindow/CodeCompletionData.cs @@ -277,7 +277,7 @@ namespace ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor } } while(xml.Read()); } catch (Exception ex) { - Console.WriteLine(ex); + Console.WriteLine("Invalid XML documentation: " + ex.Message); return doc; } return ret.ToString(); diff --git a/src/Main/Base/Project/Src/TextEditor/XmlFormattingStrategy.cs b/src/Main/Base/Project/Src/TextEditor/XmlFormattingStrategy.cs index 2ada2f6643..f808a15d98 100644 --- a/src/Main/Base/Project/Src/TextEditor/XmlFormattingStrategy.cs +++ b/src/Main/Base/Project/Src/TextEditor/XmlFormattingStrategy.cs @@ -95,7 +95,7 @@ namespace ICSharpCode.SharpDevelop.DefaultEditor try { TryIndent(textArea, begin, end); } catch (XmlException ex) { - Console.WriteLine(ex.ToString()); + MessageService.ShowError(ex); } } diff --git a/src/Main/Core/Project/Src/AddInTree/AddIn/DefaultDoozers/IncludeDoozer.cs b/src/Main/Core/Project/Src/AddInTree/AddIn/DefaultDoozers/IncludeDoozer.cs index 20c8b17b8f..024f977a90 100644 --- a/src/Main/Core/Project/Src/AddInTree/AddIn/DefaultDoozers/IncludeDoozer.cs +++ b/src/Main/Core/Project/Src/AddInTree/AddIn/DefaultDoozers/IncludeDoozer.cs @@ -58,8 +58,8 @@ namespace ICSharpCode.Core try { node = AddInTree.GetTreeNode(path); items.AddRange(node.BuildChildItems(caller)); - } catch (TreePathNotFoundException ex) { - Console.WriteLine(ex); + } catch (TreePathNotFoundException) { + MessageService.ShowError("IncludeDoozer: AddinTree-Path not found: " + path); } } } diff --git a/src/Main/Core/Project/Src/Services/MenuService/MenuService.cs b/src/Main/Core/Project/Src/Services/MenuService/MenuService.cs index 0cd2e032a7..6e50551cc0 100644 --- a/src/Main/Core/Project/Src/Services/MenuService/MenuService.cs +++ b/src/Main/Core/Project/Src/Services/MenuService/MenuService.cs @@ -32,7 +32,6 @@ namespace ICSharpCode.Core public static ContextMenuStrip CreateContextMenu(object owner, string addInTreePath) { - Console.WriteLine("Create Owner == " + owner); if (addInTreePath == null) { return null; } @@ -51,7 +50,7 @@ namespace ICSharpCode.Core ContextMenuPopupHandler(contextMenu, EventArgs.Empty); return contextMenu; } catch (TreePathNotFoundException) { - Console.WriteLine("Warning tree path '" + addInTreePath +"' not found."); + MessageService.ShowError("Warning tree path '" + addInTreePath +"' not found."); return null; } }