diff options
Diffstat (limited to 'main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Templates/SolutionTemplate.cs')
-rw-r--r-- | main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Templates/SolutionTemplate.cs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Templates/SolutionTemplate.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Templates/SolutionTemplate.cs index 2c1acc5cce..f5f888f330 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Templates/SolutionTemplate.cs +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Templates/SolutionTemplate.cs @@ -114,14 +114,18 @@ namespace MonoDevelop.Ide.Templates public void AddGroupTemplate (SolutionTemplate template)
{
groupedTemplates.Add (template);
+ template.Parent = this;
if (!availableLanguages.Contains (template.Language)) {
availableLanguages.Add (template.Language);
}
}
+ internal SolutionTemplate Parent { get; set; }
+
internal void ClearGroupedTemplates ()
{
+ Parent = null;
groupedTemplates.Clear ();
}
@@ -141,6 +145,9 @@ namespace MonoDevelop.Ide.Templates return this;
}
+ if (Parent != null)
+ return Parent.GetTemplate (predicate);
+
return groupedTemplates.FirstOrDefault (template => predicate (template));
}
|