Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(146)

Unified Diff: pkg/analysis_server/lib/src/domain_diagnostic.dart

Issue 1750683002: Move folderMap from AnalysisContext to ContextManager (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: pkg/analysis_server/lib/src/domain_diagnostic.dart
diff --git a/pkg/analysis_server/lib/src/domain_diagnostic.dart b/pkg/analysis_server/lib/src/domain_diagnostic.dart
index 94b1c3a5eff46c2599fcc96914286425203392f3..96be80628f6c3c253c678929d7be9a1eb22fd251 100644
--- a/pkg/analysis_server/lib/src/domain_diagnostic.dart
+++ b/pkg/analysis_server/lib/src/domain_diagnostic.dart
@@ -9,7 +9,6 @@ import 'dart:core' hide Resource;
import 'package:analysis_server/plugin/protocol/protocol.dart';
import 'package:analysis_server/src/analysis_server.dart';
-import 'package:analyzer/file_system/file_system.dart';
import 'package:analyzer/src/context/cache.dart';
import 'package:analyzer/src/context/context.dart';
import 'package:analyzer/src/generated/engine.dart';
@@ -40,15 +39,16 @@ class DiagnosticDomainHandler implements RequestHandler {
/// Answer the `diagnostic.diagnostics` request.
Response computeDiagnostics(Request request) {
List<ContextData> infos = <ContextData>[];
- server.folderMap.forEach((Folder folder, AnalysisContext context) {
- infos.add(extractData(folder, context));
- });
+ for (AnalysisContext context in server.analysisContexts) {
+ infos.add(extractData(context));
+ }
+ ;
scheglov 2016/02/29 19:03:37 Remove this line.
Brian Wilkerson 2016/02/29 20:45:11 Done
return new DiagnosticGetDiagnosticsResult(infos).toResponse(request.id);
}
/// Extract context data from the given [context].
- ContextData extractData(Folder folder, AnalysisContext context) {
+ ContextData extractData(AnalysisContext context) {
int explicitFiles = 0;
int implicitFiles = 0;
int workItems = 0;

Powered by Google App Engine
This is Rietveld 408576698