diff options
author | Alan McGovern <alan.mcgovern@gmail.com> | 2011-10-20 12:40:18 +0400 |
---|---|---|
committer | Alan McGovern <alan.mcgovern@gmail.com> | 2011-10-20 12:40:18 +0400 |
commit | 532677501b29a95cd882bb50e5dcae7bdbfa82c4 (patch) | |
tree | deef542143280cb2172f1343d7192061607dc04f /main | |
parent | e11c9924fb32d46e33dfa20e3274796c33723b50 (diff) |
[Core] Pass in the ProgressMonitor so migrations can report errors properly
Alter the IDotNetSubtypeMigrationHandler interface to require a
ProjectLoadProgressMonitor in order to allow migrations to report proper
errors back to the user if there is an issue.
Diffstat (limited to 'main')
2 files changed, 3 insertions, 2 deletions
diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Extensions/DotNetProjectSubtypeNode.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Extensions/DotNetProjectSubtypeNode.cs index 59887ac063..ca42efe0d5 100644 --- a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Extensions/DotNetProjectSubtypeNode.cs +++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Extensions/DotNetProjectSubtypeNode.cs @@ -30,6 +30,7 @@ using System.Linq; using Mono.Addins; using MonoDevelop.Projects.Formats.MSBuild; using System.Collections.Generic; +using MonoDevelop.Core; namespace MonoDevelop.Projects.Extensions { @@ -177,7 +178,7 @@ namespace MonoDevelop.Projects.Extensions public interface IDotNetSubtypeMigrationHandler { IEnumerable<string> FilesToBackup (string filename); - bool Migrate (MSBuildProject project, string fileName, string language); + bool Migrate (IProjectLoadProgressMonitor monitor, MSBuildProject project, string fileName, string language); } public enum MigrationType { diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Formats.MSBuild/MSBuildProjectHandler.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Formats.MSBuild/MSBuildProjectHandler.cs index 2b49329172..fd1f4182a3 100644 --- a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Formats.MSBuild/MSBuildProjectHandler.cs +++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Formats.MSBuild/MSBuildProjectHandler.cs @@ -387,7 +387,7 @@ namespace MonoDevelop.Projects.Formats.MSBuild File.Copy (file, Path.Combine (backupDir, Path.GetFileName (file))); } - if (!st.MigrationHandler.Migrate (p, fileName, language)) + if (!st.MigrationHandler.Migrate (projectLoadMonitor, p, fileName, language)) throw new Exception ("Could not migrate the project"); } |