Browse Source

Allow saving external tool options when tools in the .NET SDK cannot be found.

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/branches/3.0@3971 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
Daniel Grunwald 17 years ago
parent
commit
472350384f
  1. 3
      src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/ExternalToolPanel.cs

3
src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/ExternalToolPanel.cs

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

Loading…
Cancel
Save