diff options
author | Marius Ungureanu <marius.ungureanu@xamarin.com> | 2016-03-27 13:04:24 +0300 |
---|---|---|
committer | Marius Ungureanu <marius.ungureanu@xamarin.com> | 2016-03-27 13:04:50 +0300 |
commit | 18bb88f6c827e470837f239cd695d6af9ec769c8 (patch) | |
tree | 1903ba52dd44f0a8b28b2e5c4f2a457a4fc86e24 /main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad | |
parent | 1e64a1765415f30e633371ace1195c770eef64d7 (diff) |
[Ide] Speed up insertion of file/folder nodes in the solution tree.
Diffstat (limited to 'main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad')
-rw-r--r-- | main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/FolderNodeBuilder.cs | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/FolderNodeBuilder.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/FolderNodeBuilder.cs index 1518bcc5c7..dee86e78bb 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/FolderNodeBuilder.cs +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/FolderNodeBuilder.cs @@ -71,12 +71,9 @@ namespace MonoDevelop.Ide.Gui.Pads.ProjectPad List<string> folders; GetFolderContent (project, path, out files, out folders); - - foreach (ProjectFile file in files) - builder.AddChild (file); - - foreach (string folder in folders) - builder.AddChild (new ProjectFolder (folder, project, dataObject)); + + builder.AddChildren (files); + builder.AddChildren (folders.Select (f => new ProjectFolder (f, project, dataObject))); } void GetFolderContent (Project project, string folder, out ProjectFileCollection files, out List<string> folders) |