[mono/monodevelop] fd81164a: Fixed 'Bug 16155 - Automatically disable Source Analysis for projects
| Newsgroups | gmane.comp.gnome.mono.patches |
|---|---|
| Message-ID | <0000014251066eb2-21467fef-59dd-4c5a-ad05-9d6371ee6561-000000@email.amazonses.com> |
Branch: refs/heads/master
Home: https://github.com/mono/monodevelop
Compare: https://github.com/mono/monodevelop/compare/d0d98a2ca894...fd81164a1d38
Commit: fd81164a1d381fdc662b29962402d157bd3832f3
Author: Mike Krüger <[email protected]> (mkrueger)
Date: 2013-11-13 11:32:48 GMT
URL: https://github.com/mono/monodevelop/commit/fd81164a1d381fdc662b29962402d157bd3832f3
Fixed 'Bug 16155 - Automatically disable Source Analysis for projects
excluded from current build configuration'.
Changed paths:
M main/src/addins/MonoDevelop.Refactoring/MonoDevelop.CodeIssues/CodeAnalysisRunner.cs
M main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/Document.cs
Modified: main/src/addins/MonoDevelop.Refactoring/MonoDevelop.CodeIssues/CodeAnalysisRunner.cs
===================================================================
@@ -57,7 +57,7 @@ static IEnumerable<BaseCodeIssueProvider> EnumerateProvider (CodeIssueProvider p
public static IEnumerable<Result> Check (Document input, CancellationToken cancellationToken)
{
- if (!QuickTaskStrip.EnableFancyFeatures || input.Project == null)
+ if (!QuickTaskStrip.EnableFancyFeatures || input.Project == null || !input.IsCompileableInProject)
return Enumerable.Empty<Result> ();
#if PROFILE
Modified: main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/Document.cs
===================================================================
@@ -204,6 +204,14 @@ public Document (IWorkbenchWindow window)
var project = Project;
if (project == null)
return false;
+ var solution = project.ParentSolution;
+
+ if (solution != null && IdeApp.Workspace != null) {
+ var config = IdeApp.Workspace.ActiveConfiguration;
+ if (config != null && !solution.GetConfiguration (config).BuildEnabledForItem (project))
+ return false;
+ }
+
var pf = project.GetProjectFile (FileName);
return pf != null && pf.BuildAction == BuildAction.Compile;
}
@@ -546,7 +554,7 @@ void OnClosed (object s, EventArgs a)
internal void DisposeDocument ()
{
- DetachExtensionChain ();
+ DetachExtensionChain ();
RemoveAnnotations (typeof(System.Object));
if (window is SdiWorkspaceWindow)
((SdiWorkspaceWindow)window).DetachFromPathedDocument ();
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches