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>[]; |