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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « pkg/analysis_server/lib/src/analysis_server.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 import 'package:analysis_server/plugin/protocol/protocol.dart' as protocol; 5 import 'package:analysis_server/plugin/protocol/protocol.dart' as protocol;
6 import 'package:analysis_server/src/analysis_server.dart' show AnalysisServer; 6 import 'package:analysis_server/src/analysis_server.dart' show AnalysisServer;
7 import 'package:analysis_server/src/domains/analysis/navigation.dart';
8 import 'package:analysis_server/src/domains/analysis/navigation_dart.dart';
7 import 'package:analysis_server/src/protocol_server.dart' as protocol; 9 import 'package:analysis_server/src/protocol_server.dart' as protocol;
8 import 'package:analyzer/error/error.dart'; 10 import 'package:analyzer/error/error.dart';
9 import 'package:analyzer/src/dart/analysis/driver.dart'; 11 import 'package:analyzer/src/dart/analysis/driver.dart';
10 12
13 void new_sendDartNotificationNavigation(
14 AnalysisServer analysisServer, AnalysisResult result) {
15 var unit = result.unit;
16 if (unit != null) {
17 NavigationCollectorImpl collector = new NavigationCollectorImpl();
18 computeSimpleDartNavigation(collector, unit);
19 collector.createRegions();
20 var params = new protocol.AnalysisNavigationParams(
21 result.path, collector.regions, collector.targets, collector.files);
22 analysisServer.sendNotification(params.toNotification());
23 }
24 }
25
11 void new_sendErrorNotification( 26 void new_sendErrorNotification(
12 AnalysisServer analysisServer, AnalysisResult result) { 27 AnalysisServer analysisServer, AnalysisResult result) {
13 var serverErrors = <protocol.AnalysisError>[]; 28 var serverErrors = <protocol.AnalysisError>[];
14 for (AnalysisError error in result.errors) { 29 for (AnalysisError error in result.errors) {
15 serverErrors 30 serverErrors
16 .add(protocol.newAnalysisError_fromEngine(result.lineInfo, error)); 31 .add(protocol.newAnalysisError_fromEngine(result.lineInfo, error));
17 } 32 }
18 var params = new protocol.AnalysisErrorsParams(result.path, serverErrors); 33 var params = new protocol.AnalysisErrorsParams(result.path, serverErrors);
19 analysisServer.sendNotification(params.toNotification()); 34 analysisServer.sendNotification(params.toNotification());
20 } 35 }
OLDNEW
« 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