|
|
|
@ -7,6 +7,7 @@
@@ -7,6 +7,7 @@
|
|
|
|
|
|
|
|
|
|
using System; |
|
|
|
|
using System.Collections.Generic; |
|
|
|
|
using System.Text.RegularExpressions; |
|
|
|
|
using System.Windows.Forms; |
|
|
|
|
|
|
|
|
|
using ICSharpCode.Core; |
|
|
|
@ -151,9 +152,11 @@ namespace ICSharpCode.SharpDevelop.Gui.OptionPanels
@@ -151,9 +152,11 @@ namespace ICSharpCode.SharpDevelop.Gui.OptionPanels
|
|
|
|
|
List<ExternalTool> newlist = new List<ExternalTool>(); |
|
|
|
|
foreach (ExternalTool tool in ((ListBox)ControlDictionary["toolListBox"]).Items) { |
|
|
|
|
if (!FileUtility.IsValidPath(StringParser.Parse(tool.Command))) { |
|
|
|
|
if (!Regex.IsMatch(tool.Command, @"^\$\{SdkToolPath:[\w\d]+\.exe\}$")) { |
|
|
|
|
MessageService.ShowError(String.Format("The command of tool \"{0}\" is invalid.", tool.MenuCommand)); |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
if ((tool.InitialDirectory != String.Empty) && (!FileUtility.IsValidPath(tool.InitialDirectory))) { |
|
|
|
|
MessageService.ShowError(String.Format("The working directory of tool \"{0}\" is invalid.", tool.MenuCommand)); |
|
|
|
|
return false; |
|
|
|
|