diff options
author | Michael Hutchinson <m.j.hutchinson@gmail.com> | 2015-01-28 08:17:58 +0300 |
---|---|---|
committer | Michael Hutchinson <m.j.hutchinson@gmail.com> | 2015-01-28 12:18:33 +0300 |
commit | 28d1807f9ab6feb7fb479cf4cc237efe6e854696 (patch) | |
tree | 94d835d847e332001a36f18aff0ff85928041b99 /main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CustomTools | |
parent | aac68649306c68aa6ecb90cf486cff5146fec462 (diff) |
[Ide] Fix generators in shared projects
Diffstat (limited to 'main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CustomTools')
-rw-r--r-- | main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CustomTools/CustomToolService.cs | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CustomTools/CustomToolService.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CustomTools/CustomToolService.cs index dedba299ab..c1177c29fc 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CustomTools/CustomToolService.cs +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CustomTools/CustomToolService.cs @@ -124,12 +124,14 @@ namespace MonoDevelop.Ide.CustomTools { ProjectFile file = fileEnumerator.Current; ProjectFile genFile = null; - ISingleFileCustomTool tool; + ISingleFileCustomTool tool = null; //Find the first file in the collection, which has got generator tool - while (((tool = GetGenerator (file.Generator)) == null - || (genFile = GetGeneratedFile (file, force)) == null) - && fileEnumerator.MoveNext ()); + //and isn't cloned from a shared project + while (((file.Flags & ProjectItemFlags.DontPersist) != 0 + || (tool = GetGenerator (file.Generator)) == null + || (genFile = GetGeneratedFile (file, force)) == null + ) && fileEnumerator.MoveNext ()); //no files which can be generated in remaining elements of the collection, nothing to do if (tool == null || genFile == null) { @@ -213,6 +215,10 @@ namespace MonoDevelop.Ide.CustomTools public static void Update (ProjectFile file, bool force) { + //if file's cloned from a shared project, ignore it + if ((file.Flags & ProjectItemFlags.DontPersist) != 0) + return; + var tool = GetGenerator (file.Generator); if (tool == null) return; |