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

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

Issue 2481323002: Send notifications in the scheduled futures. (Closed)
Patch Set: Document delaying sending notifications. Created 4 years, 1 month 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
« no previous file with comments | « pkg/analysis_server/lib/src/analysis_server.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 edbdc62b561075bfe6fe154c18a0f51c5dc7bbf7..b4e3460c9a052af0e523266015a5f8f0e770af7f 100644
--- a/pkg/analysis_server/lib/src/computer/new_notifications.dart
+++ b/pkg/analysis_server/lib/src/computer/new_notifications.dart
@@ -4,10 +4,25 @@
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/protocol_server.dart' as protocol;
import 'package:analyzer/error/error.dart';
import 'package:analyzer/src/dart/analysis/driver.dart';
+void new_sendDartNotificationNavigation(
+ AnalysisServer analysisServer, AnalysisResult result) {
+ var unit = result.unit;
+ if (unit != null) {
+ NavigationCollectorImpl collector = new NavigationCollectorImpl();
+ computeSimpleDartNavigation(collector, unit);
+ collector.createRegions();
+ var params = new protocol.AnalysisNavigationParams(
+ result.path, collector.regions, collector.targets, collector.files);
+ 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') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698