diff options
author | Lluis Sanchez <lluis@novell.com> | 2009-04-28 16:48:00 +0400 |
---|---|---|
committer | Lluis Sanchez <lluis@novell.com> | 2009-04-28 16:48:00 +0400 |
commit | 71a45e74516e3afb3b82849ab8913983ac9cc097 (patch) | |
tree | 74b630518d0a8ebcf1ee2f21811fe1d2aeb38607 /main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/ProjectFolderNodeBuilder.cs | |
parent | 511caefc132b9fc27a6aa551c56f91cd3d5d0a66 (diff) |
* src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/SystemFile.cs:
* src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/ProjectFolder.cs:
* src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/ProjectFolderNodeBuilder.cs:
* src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/VersionControlNodeExtension.cs:
* src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/VersionControlCommandHandler.cs:
Added ParentWorkspaceObject to SystemFile and ProjectFolder, which
replaces the old Project property. It is required because now it is
possible to show hiddem folders and files as children of a solution.
svn path=/trunk/monodevelop/; revision=132839
Diffstat (limited to 'main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/ProjectFolderNodeBuilder.cs')
-rw-r--r-- | main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/ProjectFolderNodeBuilder.cs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/ProjectFolderNodeBuilder.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/ProjectFolderNodeBuilder.cs index e461c74821..e8cef9c3e5 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/ProjectFolderNodeBuilder.cs +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/ProjectFolderNodeBuilder.cs @@ -175,9 +175,9 @@ namespace MonoDevelop.Ide.Gui.Pads.ProjectPad foreach (ITreeNavigator node in CurrentNodes) { ProjectFolder folder = (ProjectFolder) node.DataItem as ProjectFolder; Project project = folder.Project; - ProjectFile[] files = folder.Project.Files.GetFilesInPath (folder.Path); + ProjectFile[] files = project != null ? project.Files.GetFilesInPath (folder.Path) : null; - if (files.Length == 0) { + if (files != null && files.Length == 0) { bool yes = MessageService.Confirm (GettextCatalog.GetString ("Are you sure you want to permanently delete the folder {0}?", folder.Path), AlertButton.Delete); if (!yes) return; @@ -203,9 +203,9 @@ namespace MonoDevelop.Ide.Gui.Pads.ProjectPad } foreach (ProjectFile file in files) - folder.Project.Files.Remove (file); + project.Files.Remove (file); - projects.Add (folder.Project); + projects.Add (project); } } IdeApp.ProjectOperations.Save (projects); @@ -244,7 +244,7 @@ namespace MonoDevelop.Ide.Gui.Pads.ProjectPad foreach (ITreeNavigator nav in CurrentNodes) { Project project = nav.GetParentDataItem (typeof (Project), true) as Project; string thisPath = GetFolderPath (nav.DataItem); - if (PathExistsInProject (project, thisPath)) { + if (project == null || PathExistsInProject (project, thisPath)) { item.Visible = false; return; } |