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

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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 if (errors == null) { 81 if (errors == null) {
82 errors = <AnalysisError>[]; 82 errors = <AnalysisError>[];
83 } 83 }
84 var serverErrors = 84 var serverErrors =
85 protocol.doAnalysisError_listFromEngine(lineInfo, errors); 85 protocol.doAnalysisError_listFromEngine(lineInfo, errors);
86 var params = new protocol.AnalysisErrorsParams(file, serverErrors); 86 var params = new protocol.AnalysisErrorsParams(file, serverErrors);
87 server.sendNotification(params.toNotification()); 87 server.sendNotification(params.toNotification());
88 }); 88 });
89 } 89 }
90 90
91 void sendAnalysisNotificationFlushResults(
92 AnalysisServer server, List<String> files) {
93 _sendNotification(server, () {
94 if (files != null && files.isNotEmpty) {
95 var params = new protocol.AnalysisFlushResultsParams(files);
96 server.sendNotification(params.toNotification());
97 }
98 });
99 }
100
91 void sendAnalysisNotificationHighlights( 101 void sendAnalysisNotificationHighlights(
92 AnalysisServer server, String file, CompilationUnit dartUnit) { 102 AnalysisServer server, String file, CompilationUnit dartUnit) {
93 _sendNotification(server, () { 103 _sendNotification(server, () {
94 var regions = new DartUnitHighlightsComputer(dartUnit).compute(); 104 var regions = new DartUnitHighlightsComputer(dartUnit).compute();
95 var params = new protocol.AnalysisHighlightsParams(file, regions); 105 var params = new protocol.AnalysisHighlightsParams(file, regions);
96 server.sendNotification(params.toNotification()); 106 server.sendNotification(params.toNotification());
97 }); 107 });
98 } 108 }
99 109
100 void sendAnalysisNotificationNavigation( 110 void sendAnalysisNotificationNavigation(
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after
394 abstract class _SingleFileOperation extends SourceSensitiveOperation { 404 abstract class _SingleFileOperation extends SourceSensitiveOperation {
395 final String file; 405 final String file;
396 406
397 _SingleFileOperation(AnalysisContext context, this.file) : super(context); 407 _SingleFileOperation(AnalysisContext context, this.file) : super(context);
398 408
399 @override 409 @override
400 bool shouldBeDiscardedOnSourceChange(Source source) { 410 bool shouldBeDiscardedOnSourceChange(Source source) {
401 return source.fullName == file; 411 return source.fullName == file;
402 } 412 }
403 } 413 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/lib/src/context_manager.dart ('k') | pkg/analyzer/lib/src/generated/engine.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698