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

Side by Side Diff: pkg/analysis_server/lib/src/operation/operation_analysis.dart

Issue 987143002: Fix for dartbug.com/22656- analysis.flushedResults implementation. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 9 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 unified diff | Download patch | Annotate | Revision Log
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 library operation.analysis; 5 library operation.analysis;
6 6
7 import 'package:analysis_server/src/analysis_server.dart'; 7 import 'package:analysis_server/src/analysis_server.dart';
8 import 'package:analysis_server/src/computer/computer_highlights.dart'; 8 import 'package:analysis_server/src/computer/computer_highlights.dart';
9 import 'package:analysis_server/src/computer/computer_navigation.dart'; 9 import 'package:analysis_server/src/computer/computer_navigation.dart';
10 import 'package:analysis_server/src/computer/computer_occurrences.dart'; 10 import 'package:analysis_server/src/computer/computer_occurrences.dart';
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 if (errors == null) { 89 if (errors == null) {
90 errors = <AnalysisError>[]; 90 errors = <AnalysisError>[];
91 } 91 }
92 var serverErrors = 92 var serverErrors =
93 protocol.doAnalysisError_listFromEngine(lineInfo, errors); 93 protocol.doAnalysisError_listFromEngine(lineInfo, errors);
94 var params = new protocol.AnalysisErrorsParams(file, serverErrors); 94 var params = new protocol.AnalysisErrorsParams(file, serverErrors);
95 server.sendNotification(params.toNotification()); 95 server.sendNotification(params.toNotification());
96 }); 96 });
97 } 97 }
98 98
99 void sendAnalysisNotificationFlushResults(
100 AnalysisServer server, List<String> files) {
101 _sendNotification(server, () {
102 if (files != null && files.isNotEmpty) {
103 var params = new protocol.AnalysisFlushResultsParams(files);
104 server.sendNotification(params.toNotification());
105 }
106 });
107 }
108
99 void sendAnalysisNotificationHighlights( 109 void sendAnalysisNotificationHighlights(
100 AnalysisServer server, String file, CompilationUnit dartUnit) { 110 AnalysisServer server, String file, CompilationUnit dartUnit) {
101 _sendNotification(server, () { 111 _sendNotification(server, () {
102 var regions = new DartUnitHighlightsComputer(dartUnit).compute(); 112 var regions = new DartUnitHighlightsComputer(dartUnit).compute();
103 var params = new protocol.AnalysisHighlightsParams(file, regions); 113 var params = new protocol.AnalysisHighlightsParams(file, regions);
104 server.sendNotification(params.toNotification()); 114 server.sendNotification(params.toNotification());
105 }); 115 });
106 } 116 }
107 117
108 void sendAnalysisNotificationNavigation( 118 void sendAnalysisNotificationNavigation(
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
403 abstract class _SingleFileOperation extends SourceSensitiveOperation { 413 abstract class _SingleFileOperation extends SourceSensitiveOperation {
404 final String file; 414 final String file;
405 415
406 _SingleFileOperation(AnalysisContext context, this.file) : super(context); 416 _SingleFileOperation(AnalysisContext context, this.file) : super(context);
407 417
408 @override 418 @override
409 bool shouldBeDiscardedOnSourceChange(Source source) { 419 bool shouldBeDiscardedOnSourceChange(Source source) {
410 return source.fullName == file; 420 return source.fullName == file;
411 } 421 }
412 } 422 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698