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/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/SystemFileNodeBuilder.cs | |
parent | a2046b6331a271e8203df7d3d0f14500d33d60fa (diff) |
Initial drop of the new project model
Diffstat (limited to 'main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/SystemFileNodeBuilder.cs')
-rw-r--r-- | main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/SystemFileNodeBuilder.cs | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/SystemFileNodeBuilder.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/SystemFileNodeBuilder.cs index f54b033a61..71551dd481 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/SystemFileNodeBuilder.cs +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/SystemFileNodeBuilder.cs @@ -149,8 +149,7 @@ namespace MonoDevelop.Ide.Gui.Pads.ProjectPad [AllowMultiSelection] public void IncludeFileToProject () { - Set<SolutionEntityItem> projects = new Set<SolutionEntityItem> (); - Set<Solution> solutions = new Set<Solution> (); + Set<IWorkspaceFileObject> projects = new Set<IWorkspaceFileObject> (); var nodesByProject = CurrentNodes.GroupBy (n => n.GetParentDataItem (typeof(Project), true) as Project); foreach (var projectGroup in nodesByProject) { @@ -166,21 +165,19 @@ namespace MonoDevelop.Ide.Gui.Pads.ProjectPad SolutionFolder folder = node.GetParentDataItem (typeof(SolutionFolder), true) as SolutionFolder; if (folder != null) { folder.Files.Add (file.Path); - solutions.Add (folder.ParentSolution); + projects.Add (folder.ParentSolution); } else { Solution sol = node.GetParentDataItem (typeof(Solution), true) as Solution; sol.RootFolder.Files.Add (file.Path); - solutions.Add (sol); + projects.Add (sol); } } } if (newFiles.Count > 0) project.AddFiles (newFiles); } - IdeApp.ProjectOperations.Save (projects); - foreach (Solution sol in solutions) - IdeApp.ProjectOperations.Save (sol); + IdeApp.ProjectOperations.SaveAsync (projects); } [CommandUpdateHandler (ProjectCommands.IncludeToProject)] |