diff options
author | Lluis Sanchez <lluis@xamarin.com> | 2014-01-20 19:32:53 +0400 |
---|---|---|
committer | Lluis Sanchez Gual <lluis@xamarin.com> | 2014-10-21 18:39:14 +0400 |
commit | f73b2a9990495587d514aa1856919c21170a3940 (patch) | |
tree | 9842411ee8644ead5915a715ee7e53984a601df4 /main/src/addins/AspNet/ProjectPad/AspNetProjectNodeCommandHandler.cs | |
parent | a2046b6331a271e8203df7d3d0f14500d33d60fa (diff) |
Initial drop of the new project model
Diffstat (limited to 'main/src/addins/AspNet/ProjectPad/AspNetProjectNodeCommandHandler.cs')
-rw-r--r-- | main/src/addins/AspNet/ProjectPad/AspNetProjectNodeCommandHandler.cs | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/main/src/addins/AspNet/ProjectPad/AspNetProjectNodeCommandHandler.cs b/main/src/addins/AspNet/ProjectPad/AspNetProjectNodeCommandHandler.cs index 3bf027f7c8..3373c62b1b 100644 --- a/main/src/addins/AspNet/ProjectPad/AspNetProjectNodeCommandHandler.cs +++ b/main/src/addins/AspNet/ProjectPad/AspNetProjectNodeCommandHandler.cs @@ -42,21 +42,25 @@ namespace MonoDevelop.AspNet.ProjectPad [CommandHandler (AspNetCommands.AddAspNetDirectory)] public void OnAddSpecialDirectory (object ob) { - AspNetAppProject proj = CurrentNode.DataItem as AspNetAppProject; + var proj = CurrentNode.DataItem as DotNetProject; if (proj == null) return; proj.AddDirectory ((string) ob); - IdeApp.ProjectOperations.Save (proj); + IdeApp.ProjectOperations.SaveAsync (proj); } [CommandUpdateHandler (AspNetCommands.AddAspNetDirectory)] public void OnAddSpecialDirectoryUpdate (CommandArrayInfo info) { - AspNetAppProject proj = CurrentNode.DataItem as AspNetAppProject; - if (proj == null) - return; - - List<string> dirs = new List<string> (proj.GetSpecialDirectories ()); + var proj = CurrentNode.DataItem as DotNetProject; + if (proj == null)
+ return;
+
+ var asp = proj.GetFlavor<AspNetFlavor> ();
+ if (asp == null)
+ return;
+ + List<string> dirs = new List<string> (asp.GetSpecialDirectories ()); dirs.Sort ();
List<FilePath> fullPaths = new List<FilePath> (dirs.Count); foreach (string s in dirs) |