Browse Source

Fixed exception opening StyleCop options when StyleCop is not installed

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/branches/3.0@3597 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
Daniel Grunwald 18 years ago
parent
commit
fef66a43e6
  1. 9
      src/AddIns/Misc/SourceAnalysis/Src/AnalysisProjectOptionsPanel.cs

9
src/AddIns/Misc/SourceAnalysis/Src/AnalysisProjectOptionsPanel.cs

@ -64,8 +64,13 @@ namespace MattEverson.SourceAnalysis {
} }
} }
var executable = Path.Combine(StyleCopWrapper.FindStyleCopPath(), "StyleCopSettingsEditor.exe"); string styleCopPath = StyleCopWrapper.FindStyleCopPath();
var parameters = "\"" + settingsFile + "\""; string executable;
if (styleCopPath != null)
executable = Path.Combine(styleCopPath, "StyleCopSettingsEditor.exe");
else
executable = null;
string parameters = "\"" + settingsFile + "\"";
if (!File.Exists(executable)) { if (!File.Exists(executable)) {
LoggingService.Debug("StyleCopSettingsEditor.exe: " + executable); LoggingService.Debug("StyleCopSettingsEditor.exe: " + executable);
MessageService.ShowWarning("Unable to find the StyleCop Settings editor. Please specify the StyleCop location in Tools Options."); MessageService.ShowWarning("Unable to find the StyleCop Settings editor. Please specify the StyleCop location in Tools Options.");

Loading…
Cancel
Save