diff options
author | Lluis Sanchez <lluis@novell.com> | 2009-12-01 12:47:55 +0300 |
---|---|---|
committer | Lluis Sanchez <lluis@novell.com> | 2009-12-01 12:47:55 +0300 |
commit | ab32048dab6d3167129a819e1dbb2a88e6216a78 (patch) | |
tree | 1d60673cbcf5bf6cf7ff4b4cb25632a4815916bc /extras/MonoDevelop.AddinAuthoring | |
parent | bf6f75cb0e4366365dad6d1a037fb1aabc34ac66 (diff) |
Introduced the ConfigurationSelector class to all methods that
previously took a configuration name as string. This eliminates the
ambiguity between solution configuration names and project
configuration names.
svn path=/trunk/monodevelop/; revision=147198
Diffstat (limited to 'extras/MonoDevelop.AddinAuthoring')
6 files changed, 24 insertions, 11 deletions
diff --git a/extras/MonoDevelop.AddinAuthoring/ChangeLog b/extras/MonoDevelop.AddinAuthoring/ChangeLog index 25d48fbf0b..6f4c909ea5 100644 --- a/extras/MonoDevelop.AddinAuthoring/ChangeLog +++ b/extras/MonoDevelop.AddinAuthoring/ChangeLog @@ -1,3 +1,15 @@ +2009-12-01 Lluis Sanchez Gual <lluis@novell.com> + + * MonoDevelop.AddinAuthoring/AddinData.cs: + * MonoDevelop.AddinAuthoring/SolutionAddinData.cs: + * MonoDevelop.AddinAuthoring/AddinProjectExtension.cs: + * MonoDevelop.AddinAuthoring/AddinProjectReference.cs: + * MonoDevelop.AddinAuthoring/AddinDescriptionWidget.cs: + Introduced the ConfigurationSelector class to all methods that + previously took a configuration name as string. This + eliminates the ambiguity between solution configuration names + and project configuration names. + 2009-10-30 Lluis Sanchez Gual <lluis@novell.com> * configure: diff --git a/extras/MonoDevelop.AddinAuthoring/MonoDevelop.AddinAuthoring/AddinData.cs b/extras/MonoDevelop.AddinAuthoring/MonoDevelop.AddinAuthoring/AddinData.cs index c973ad8a62..a13c2aca4f 100644 --- a/extras/MonoDevelop.AddinAuthoring/MonoDevelop.AddinAuthoring/AddinData.cs +++ b/extras/MonoDevelop.AddinAuthoring/MonoDevelop.AddinAuthoring/AddinData.cs @@ -74,7 +74,7 @@ namespace MonoDevelop.AddinAuthoring watcher.Filter = Path.GetFileName (AddinManifestFileName); watcher.Changed += OnDescFileChanged; watcher.EnableRaisingEvents = true; - lastOutputPath = Path.GetDirectoryName (Project.GetOutputFileName (Project.DefaultConfigurationId)); + lastOutputPath = Path.GetDirectoryName (Project.GetOutputFileName (ConfigurationSelector.Default)); if (!string.IsNullOrEmpty (ApplicationName)) { project.ParentSolution.GetAddinData ().ApplicationName = ApplicationName; @@ -210,8 +210,8 @@ namespace MonoDevelop.AddinAuthoring public AddinDescription CompiledAddinManifest { get { if (compiledManifest == null) { - if (File.Exists (project.GetOutputFileName (project.DefaultConfigurationId))) { - compiledManifest = registry.GetAddinDescription (new ConsoleProgressStatus (false), project.GetOutputFileName (project.DefaultConfigurationId)); + if (File.Exists (project.GetOutputFileName (ConfigurationSelector.Default))) { + compiledManifest = registry.GetAddinDescription (new ConsoleProgressStatus (false), project.GetOutputFileName (ConfigurationSelector.Default)); } } return compiledManifest; @@ -249,7 +249,7 @@ namespace MonoDevelop.AddinAuthoring internal void CheckOutputPath () { if (CachedAddinManifest.IsRoot) { - string outDir = Path.GetDirectoryName (Project.GetOutputFileName (Project.DefaultConfigurationId)); + string outDir = Path.GetDirectoryName (Project.GetOutputFileName (ConfigurationSelector.Default)); if (lastOutputPath != outDir) { registry = null; NotifyChanged (true); diff --git a/extras/MonoDevelop.AddinAuthoring/MonoDevelop.AddinAuthoring/AddinDescriptionWidget.cs b/extras/MonoDevelop.AddinAuthoring/MonoDevelop.AddinAuthoring/AddinDescriptionWidget.cs index 557e058978..7b45084c31 100644 --- a/extras/MonoDevelop.AddinAuthoring/MonoDevelop.AddinAuthoring/AddinDescriptionWidget.cs +++ b/extras/MonoDevelop.AddinAuthoring/MonoDevelop.AddinAuthoring/AddinDescriptionWidget.cs @@ -2,6 +2,7 @@ using System; using MonoDevelop.Core; using MonoDevelop.Components; +using MonoDevelop.Projects; using Mono.Addins; using Mono.Addins.Description; using Gtk; @@ -60,7 +61,7 @@ namespace MonoDevelop.AddinAuthoring notebook.ShowBorder = false; if (desc.LocalId.Length == 0) { - defaultId = System.IO.Path.GetFileNameWithoutExtension (data.Project.GetOutputFileName (data.Project.DefaultConfigurationId)); + defaultId = System.IO.Path.GetFileNameWithoutExtension (data.Project.GetOutputFileName (ConfigurationSelector.Default)); entryIdentifier.Text = defaultId; } else diff --git a/extras/MonoDevelop.AddinAuthoring/MonoDevelop.AddinAuthoring/AddinProjectExtension.cs b/extras/MonoDevelop.AddinAuthoring/MonoDevelop.AddinAuthoring/AddinProjectExtension.cs index d2cfa0cf43..b7d04bc55d 100644 --- a/extras/MonoDevelop.AddinAuthoring/MonoDevelop.AddinAuthoring/AddinProjectExtension.cs +++ b/extras/MonoDevelop.AddinAuthoring/MonoDevelop.AddinAuthoring/AddinProjectExtension.cs @@ -12,7 +12,7 @@ namespace MonoDevelop.AddinAuthoring { public class AddinProjectExtension: ProjectServiceExtension { - protected override BuildResult Build (IProgressMonitor monitor, SolutionEntityItem entry, string configuration) + protected override BuildResult Build (IProgressMonitor monitor, SolutionEntityItem entry, ConfigurationSelector configuration) { BuildResult res = base.Build (monitor, entry, configuration); if (res.ErrorCount > 0 || !(entry is DotNetProject)) @@ -31,7 +31,7 @@ namespace MonoDevelop.AddinAuthoring string addinFile; if (file.BuildAction == BuildAction.EmbeddedResource) - addinFile = project.GetOutputFileName (project.DefaultConfigurationId); + addinFile = project.GetOutputFileName (ConfigurationSelector.Default); else addinFile = file.FilePath; @@ -113,7 +113,7 @@ namespace MonoDevelop.AddinAuthoring return pcmd; } - protected override bool CanExecute (SolutionEntityItem item, ExecutionContext context, string configuration) + protected override bool CanExecute (SolutionEntityItem item, ExecutionContext context, ConfigurationSelector configuration) { ExecutionCommand cmd = CreateCommand (item); if (cmd != null && context.ExecutionHandler.CanExecute (cmd)) @@ -121,7 +121,7 @@ namespace MonoDevelop.AddinAuthoring return base.CanExecute (item, context, configuration); } - protected override void Execute (IProgressMonitor monitor, SolutionEntityItem item, ExecutionContext context, string configuration) + protected override void Execute (IProgressMonitor monitor, SolutionEntityItem item, ExecutionContext context, ConfigurationSelector configuration) { ExecutionCommand cmd = CreateCommand (item); if (cmd != null && context.ExecutionHandler.CanExecute (cmd)) { diff --git a/extras/MonoDevelop.AddinAuthoring/MonoDevelop.AddinAuthoring/AddinProjectReference.cs b/extras/MonoDevelop.AddinAuthoring/MonoDevelop.AddinAuthoring/AddinProjectReference.cs index 7e30de404a..0ec1641564 100644 --- a/extras/MonoDevelop.AddinAuthoring/MonoDevelop.AddinAuthoring/AddinProjectReference.cs +++ b/extras/MonoDevelop.AddinAuthoring/MonoDevelop.AddinAuthoring/AddinProjectReference.cs @@ -51,7 +51,7 @@ namespace MonoDevelop.AddinAuthoring { } - public override string[] GetReferencedFileNames (string configuration) + public override string[] GetReferencedFileNames (ConfigurationSelector configuration) { if (OwnerProject != null) { AddinData data = AddinData.GetAddinData ((DotNetProject)OwnerProject); diff --git a/extras/MonoDevelop.AddinAuthoring/MonoDevelop.AddinAuthoring/SolutionAddinData.cs b/extras/MonoDevelop.AddinAuthoring/MonoDevelop.AddinAuthoring/SolutionAddinData.cs index 2b01f9765d..31cd1f7e3e 100644 --- a/extras/MonoDevelop.AddinAuthoring/MonoDevelop.AddinAuthoring/SolutionAddinData.cs +++ b/extras/MonoDevelop.AddinAuthoring/MonoDevelop.AddinAuthoring/SolutionAddinData.cs @@ -47,7 +47,7 @@ namespace MonoDevelop.AddinAuthoring } FilePath TempRegistryPath { - get { return solution.BaseDirectory.Combine (".temp-addin-registry").Combine (IdeApp.Workspace.ActiveConfiguration); } + get { return solution.BaseDirectory.Combine (".temp-addin-registry").Combine (IdeApp.Workspace.ActiveConfigurationId); } } public string ApplicationName { |