diff options
author | Lluis Sanchez <lluis@xamarin.com> | 2014-04-02 18:17:43 +0400 |
---|---|---|
committer | Lluis Sanchez <lluis@xamarin.com> | 2014-04-02 18:17:43 +0400 |
commit | e1aedcc353cea24043bb402f2de9950c8f271e21 (patch) | |
tree | 801e3cf2dd70b7d34210d9c45d5ff89a5ef93008 /main/src/core/MonoDevelop.Core | |
parent | 886def9c8ffdfed7f3b08621596f2726c06957c0 (diff) |
Renamed CanRunTarget to SupportsTarget
Diffstat (limited to 'main/src/core/MonoDevelop.Core')
6 files changed, 28 insertions, 43 deletions
diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.SharedAssetsProjects/SharedAssetsProject.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.SharedAssetsProjects/SharedAssetsProject.cs index a2af4ac738..87061c69be 100644 --- a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.SharedAssetsProjects/SharedAssetsProject.cs +++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.SharedAssetsProjects/SharedAssetsProject.cs @@ -94,7 +94,7 @@ namespace MonoDevelop.Projects.SharedAssetsProjects return new BuildResult (); } - internal protected override bool OnGetCanRunTarget (string target, ConfigurationSelector configuration) + internal protected override bool OnGetSupportsTarget (string target) { return false; } diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/IBuildTarget.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/IBuildTarget.cs index a6a601a44c..46f53edd81 100644 --- a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/IBuildTarget.cs +++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/IBuildTarget.cs @@ -35,7 +35,7 @@ namespace MonoDevelop.Projects public interface IBuildTarget: IWorkspaceObject { BuildResult RunTarget (IProgressMonitor monitor, string target, ConfigurationSelector configuration); - bool CanRunTarget (string target, ConfigurationSelector configuration); + bool SupportsTarget (string target); void Execute (IProgressMonitor monitor, ExecutionContext context, ConfigurationSelector configuration); bool CanExecute (ExecutionContext context, ConfigurationSelector configuration); bool NeedsBuilding (ConfigurationSelector configuration); diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/ProjectService.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/ProjectService.cs index 20a4ef4c71..054db3d327 100644 --- a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/ProjectService.cs +++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/ProjectService.cs @@ -705,12 +705,12 @@ namespace MonoDevelop.Projects return res; } - public override bool CanRunTarget (IBuildTarget item, string target, ConfigurationSelector configuration) + public override bool SupportsTarget (IBuildTarget item, string target) { if (item is WorkspaceItem) - return ((WorkspaceItem)item).OnGetCanRunTarget (target, configuration); + return ((WorkspaceItem)item).OnGetSupportsTarget (target); else if (item is SolutionItem) - return ((SolutionItem)item).OnGetCanRunTarget (target, configuration); + return ((SolutionItem)item).OnGetSupportsTarget (target); else throw new InvalidOperationException ("Unknown item type: " + item); } diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/ProjectServiceExtension.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/ProjectServiceExtension.cs index 501ff2d088..245eb658c3 100644 --- a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/ProjectServiceExtension.cs +++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/ProjectServiceExtension.cs @@ -128,32 +128,32 @@ namespace MonoDevelop.Projects return GetNext (item).RunTarget (monitor, item, target, configuration); } - public virtual bool CanRunTarget (IBuildTarget item, string target, ConfigurationSelector configuration) + public virtual bool SupportsTarget (IBuildTarget item, string target) { if (item is SolutionEntityItem) - return CanRunTarget ((SolutionEntityItem)item, target, configuration); + return SupportsTarget ((SolutionEntityItem)item, target); else if (item is WorkspaceItem) - return CanRunTarget ((WorkspaceItem) item, target, configuration); + return SupportsTarget ((WorkspaceItem) item, target); else - return GetNext (item).CanRunTarget (item, target, configuration); + return GetNext (item).SupportsTarget (item, target); } - protected virtual bool CanRunTarget (SolutionEntityItem item, string target, ConfigurationSelector configuration) + protected virtual bool SupportsTarget (SolutionEntityItem item, string target) { - return GetNext (item).CanRunTarget ((IBuildTarget) item, target, configuration); + return GetNext (item).SupportsTarget ((IBuildTarget) item, target); } - protected virtual bool CanRunTarget (Solution solution, string target, ConfigurationSelector configuration) + protected virtual bool SupportsTarget (Solution solution, string target) { - return GetNext (solution).CanRunTarget ((IBuildTarget) solution, target, configuration); + return GetNext (solution).SupportsTarget ((IBuildTarget) solution, target); } - protected virtual bool CanRunTarget (WorkspaceItem item, string target, ConfigurationSelector configuration) + protected virtual bool SupportsTarget (WorkspaceItem item, string target) { if (item is Solution) - return CanRunTarget ((Solution) item, target, configuration); + return SupportsTarget ((Solution) item, target); else - return GetNext (item).CanRunTarget ((IBuildTarget) item, target, configuration); + return GetNext (item).SupportsTarget ((IBuildTarget) item, target); } protected virtual void Clean (IProgressMonitor monitor, IBuildTarget item, ConfigurationSelector configuration) @@ -396,7 +396,7 @@ namespace MonoDevelop.Projects return false; } - public bool CanRunTarget (string target, ConfigurationSelector configuration) + public bool SupportsTarget (string target) { return false; } diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/SolutionItem.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/SolutionItem.cs index d857407711..2bbab1c45e 100644 --- a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/SolutionItem.cs +++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/SolutionItem.cs @@ -473,19 +473,14 @@ namespace MonoDevelop.Projects return Services.ProjectService.GetExtensionChain (this).RunTarget (monitor, this, target, configuration); } - public bool CanRunTarget (string target, ConfigurationSelector configuration) + public bool SupportsTarget (string target) { - return Services.ProjectService.GetExtensionChain (this).CanRunTarget (this, target, configuration); + return Services.ProjectService.GetExtensionChain (this).SupportsTarget (this, target); } - public bool CanBuild (ConfigurationSelector configuration) + public bool SupportsBuild () { - return CanRunTarget (ProjectService.BuildTarget, configuration); - } - - public bool CanClean (ConfigurationSelector configuration) - { - return CanRunTarget (ProjectService.CleanTarget, configuration); + return SupportsTarget (ProjectService.BuildTarget); } /// <summary> @@ -629,7 +624,7 @@ namespace MonoDevelop.Projects void GetBuildableReferencedItems (Set<SolutionItem> visited, List<SolutionItem> referenced, SolutionItem item, ConfigurationSelector configuration) {
- if (!visited.Add(item)) + if (!visited.Add(item) || !item.SupportsBuild ()) return; referenced.Add (item); @@ -1060,7 +1055,7 @@ namespace MonoDevelop.Projects return DateTime.MinValue; } - internal protected virtual bool OnGetCanRunTarget (string target, ConfigurationSelector configuration) + internal protected virtual bool OnGetSupportsTarget (string target) { return true; } diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/WorkspaceItem.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/WorkspaceItem.cs index bd941749a3..c9f0169080 100644 --- a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/WorkspaceItem.cs +++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/WorkspaceItem.cs @@ -247,14 +247,9 @@ namespace MonoDevelop.Projects return Services.ProjectService.GetExtensionChain (this).RunTarget (monitor, this, target, configuration); } - public bool CanBuild (ConfigurationSelector configuration) + public bool SupportsBuild () { - return CanRunTarget (ProjectService.BuildTarget, configuration); - } - - public bool CanClean (ConfigurationSelector configuration) - { - return CanRunTarget (ProjectService.CleanTarget, configuration); + return SupportsTarget (ProjectService.BuildTarget); } public void Clean (IProgressMonitor monitor, string configuration) @@ -267,14 +262,9 @@ namespace MonoDevelop.Projects Services.ProjectService.GetExtensionChain (this).RunTarget (monitor, this, ProjectService.CleanTarget, configuration); } - public bool CanRunTarget (string target, string configuration) - { - return CanRunTarget (target, (SolutionConfigurationSelector) configuration); - } - - public bool CanRunTarget (string target, ConfigurationSelector configuration) + public bool SupportsTarget (string target) { - return Services.ProjectService.GetExtensionChain (this).CanRunTarget (this, target, configuration); + return Services.ProjectService.GetExtensionChain (this).SupportsTarget (this, target); } public BuildResult Build (IProgressMonitor monitor, string configuration) @@ -426,7 +416,7 @@ namespace MonoDevelop.Projects return null; } - internal protected virtual bool OnGetCanRunTarget (string target, ConfigurationSelector configuration) + internal protected virtual bool OnGetSupportsTarget (string target) { return true; } |