Index: pkg/analysis_server/lib/src/analysis_server.dart |
diff --git a/pkg/analysis_server/lib/src/analysis_server.dart b/pkg/analysis_server/lib/src/analysis_server.dart |
index 9222f4e97656d34eca58ffefe4d17acf4bbdfb4e..cdf1561b0f9fbdf3f3b4da66e7fc87cbf53bef33 100644 |
--- a/pkg/analysis_server/lib/src/analysis_server.dart |
+++ b/pkg/analysis_server/lib/src/analysis_server.dart |
@@ -1085,7 +1085,8 @@ class AnalysisServer { |
contextFound = true; |
} |
for (AnalysisContext context in folderMap.values) { |
- if (context.getKindOf(source) != SourceKind.UNKNOWN) { |
+ if (context != preferredContext && |
+ context.getKindOf(source) != SourceKind.UNKNOWN) { |
sourceMap.putIfAbsent(context, () => <Source>[]).add(source); |
contextFound = true; |
} |