diff options
author | Alan McGovern <alan.mcgovern@gmail.com> | 2012-05-31 15:16:49 +0400 |
---|---|---|
committer | Alan McGovern <alan.mcgovern@gmail.com> | 2012-05-31 15:41:24 +0400 |
commit | 7098b8c53f280c195e628ec4969bad7aabd3c2fe (patch) | |
tree | 73b053226b98ce27d38a4f954b19e3767c960bfe /main/src | |
parent | e61bbd6fd885d2b343743217a4c9da81a76446c4 (diff) |
[MonoDevelop.Ide] Link a csproj file to its owning project
I've also added a test to verify the new behaviour so that this does not
regress.
Fixes bug #5434.
Diffstat (limited to 'main/src')
-rw-r--r-- | main/src/core/MonoDevelop.Core/MonoDevelop.Projects/SolutionFolder.cs | 2 | ||||
-rw-r--r-- | main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/Workbench.cs | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/SolutionFolder.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/SolutionFolder.cs index 169605edea..28eb0caac4 100644 --- a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/SolutionFolder.cs +++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/SolutionFolder.cs @@ -488,7 +488,7 @@ namespace MonoDevelop.Projects { ReadOnlyCollection<Project> projects = GetAllProjects (); foreach (Project projectEntry in projects) { - if (projectEntry.IsFileInProject(fileName)) { + if (projectEntry.FileName == fileName || projectEntry.IsFileInProject(fileName)) { return projectEntry; } } diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/Workbench.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/Workbench.cs index dfa61ac71b..4712de293b 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/Workbench.cs +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/Workbench.cs @@ -697,6 +697,8 @@ namespace MonoDevelop.Ide.Gui if (IdeApp.ProjectOperations.CurrentSelectedProject != null) { if (IdeApp.ProjectOperations.CurrentSelectedProject.Files.GetFile (fileName) != null) project = IdeApp.ProjectOperations.CurrentSelectedProject; + else if (IdeApp.ProjectOperations.CurrentSelectedProject.FileName == fileName) + project = IdeApp.ProjectOperations.CurrentSelectedProject; } if (project == null && IdeApp.ProjectOperations.CurrentSelectedWorkspaceItem != null) { project = IdeApp.ProjectOperations.CurrentSelectedWorkspaceItem.GetProjectContainingFile (fileName); |