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

Unified Diff: pkg/analysis_server/lib/src/computer/new_notifications.dart

Issue 2566223002: Implement 'analysis.occurrences' for the new analysis driver. (Closed)
Patch Set: Created 4 years 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/computer/new_notifications.dart
diff --git a/pkg/analysis_server/lib/src/computer/new_notifications.dart b/pkg/analysis_server/lib/src/computer/new_notifications.dart
index b4e3460c9a052af0e523266015a5f8f0e770af7f..8511e264407eba7d4fa2e0f4c4f90f550d0b458e 100644
--- a/pkg/analysis_server/lib/src/computer/new_notifications.dart
+++ b/pkg/analysis_server/lib/src/computer/new_notifications.dart
@@ -6,6 +6,8 @@ import 'package:analysis_server/plugin/protocol/protocol.dart' as protocol;
import 'package:analysis_server/src/analysis_server.dart' show AnalysisServer;
import 'package:analysis_server/src/domains/analysis/navigation.dart';
import 'package:analysis_server/src/domains/analysis/navigation_dart.dart';
+import 'package:analysis_server/src/domains/analysis/occurrences.dart';
+import 'package:analysis_server/src/domains/analysis/occurrences_dart.dart';
import 'package:analysis_server/src/protocol_server.dart' as protocol;
import 'package:analyzer/error/error.dart';
import 'package:analyzer/src/dart/analysis/driver.dart';
@@ -23,6 +25,18 @@ void new_sendDartNotificationNavigation(
}
}
+void new_sendDartNotificationOccurrences(
+ AnalysisServer analysisServer, AnalysisResult result) {
+ var unit = result.unit;
+ if (unit != null) {
+ OccurrencesCollectorImpl collector = new OccurrencesCollectorImpl();
+ addDartOccurrences(collector, unit);
+ var params = new protocol.AnalysisOccurrencesParams(
+ result.path, collector.allOccurrences);
+ analysisServer.sendNotification(params.toNotification());
+ }
+}
+
void new_sendErrorNotification(
AnalysisServer analysisServer, AnalysisResult result) {
var serverErrors = <protocol.AnalysisError>[];
« no previous file with comments | « pkg/analysis_server/lib/src/analysis_server.dart ('k') | pkg/analysis_server/lib/src/domains/analysis/occurrences_dart.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698