From b3d8bda1a86f28439dea75430b29316a7276356a Mon Sep 17 00:00:00 2001 From: Daniel Grunwald Date: Fri, 8 Aug 2008 22:03:22 +0000 Subject: [PATCH] Don't throw exception when an SDK tool is not found. Update caret position when foldings change. git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@3323 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61 --- .../ICSharpCode.TextEditor/Project/Src/Gui/TextArea.cs | 1 + .../Core/Project/Src/Services/FileUtility/FileUtility.cs | 7 ++----- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/Libraries/ICSharpCode.TextEditor/Project/Src/Gui/TextArea.cs b/src/Libraries/ICSharpCode.TextEditor/Project/Src/Gui/TextArea.cs index 26e6736081..f417084968 100644 --- a/src/Libraries/ICSharpCode.TextEditor/Project/Src/Gui/TextArea.cs +++ b/src/Libraries/ICSharpCode.TextEditor/Project/Src/Gui/TextArea.cs @@ -552,6 +552,7 @@ namespace ICSharpCode.TextEditor } void DocumentFoldingsChanged(object sender, EventArgs e) { + Caret.UpdateCaretPosition(); Invalidate(); this.motherTextAreaControl.AdjustScrollBars(); } diff --git a/src/Main/Core/Project/Src/Services/FileUtility/FileUtility.cs b/src/Main/Core/Project/Src/Services/FileUtility/FileUtility.cs index aa4d6d281d..1eeb475145 100644 --- a/src/Main/Core/Project/Src/Services/FileUtility/FileUtility.cs +++ b/src/Main/Core/Project/Src/Services/FileUtility/FileUtility.cs @@ -182,10 +182,7 @@ namespace ICSharpCode.Core /// exe from the latest sdk. /// /// The EXE to search for. - /// The path of the executable. - /// - /// Thrown if the exe is not found. - /// + /// The path of the executable, or null if the exe is not found. public static string GetSdkPath(string exeName) { string execPath; if (!string.IsNullOrEmpty(WindowsSdk61InstallRoot)) { @@ -204,7 +201,7 @@ namespace ICSharpCode.Core execPath = Path.Combine(NetSdk20InstallRoot, "bin\\" + exeName); if (File.Exists(execPath)) { return execPath; } } - throw new FileNotFoundException(StringParser.Parse("${res:Fileutility.CantFindExecutableError}", new string[,] { {"EXECUTABLE", exeName} })); + return null; } ///