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

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

Issue 362793004: Update analysis.errors notification to the newest spec. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 5 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
« no previous file with comments | « no previous file | pkg/analysis_server/lib/src/constants.dart » ('j') | 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 library analysis.server; 5 library analysis.server;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:collection'; 8 import 'dart:collection';
9 9
10 import 'package:analysis_server/src/analysis_logger.dart'; 10 import 'package:analysis_server/src/analysis_logger.dart';
(...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after
457 */ 457 */
458 void setAnalysisSubscriptions(HashMap<AnalysisService, Set<String>> subscripti ons) { 458 void setAnalysisSubscriptions(HashMap<AnalysisService, Set<String>> subscripti ons) {
459 // send notifications for already analyzed sources 459 // send notifications for already analyzed sources
460 subscriptions.forEach((service, Set<String> newFiles) { 460 subscriptions.forEach((service, Set<String> newFiles) {
461 Set<String> oldFiles = analysisServices[service]; 461 Set<String> oldFiles = analysisServices[service];
462 Set<String> todoFiles = oldFiles != null ? newFiles.difference(oldFiles) : newFiles; 462 Set<String> todoFiles = oldFiles != null ? newFiles.difference(oldFiles) : newFiles;
463 for (String file in todoFiles) { 463 for (String file in todoFiles) {
464 if (service == AnalysisService.ERRORS) { 464 if (service == AnalysisService.ERRORS) {
465 Source source = _getSource(file); 465 Source source = _getSource(file);
466 AnalysisContext analysisContext = _getAnalysisContext(file); 466 AnalysisContext analysisContext = _getAnalysisContext(file);
467 LineInfo lineInfo = analysisContext.getLineInfo(source);
467 List<AnalysisError> errors = analysisContext.getErrors(source).errors; 468 List<AnalysisError> errors = analysisContext.getErrors(source).errors;
468 sendAnalysisNotificationErrors(this, file, errors); 469 sendAnalysisNotificationErrors(this, file, lineInfo, errors);
469 } 470 }
470 // Dart unit notifications. 471 // Dart unit notifications.
471 if (AnalysisEngine.isDartFileName(file)) { 472 if (AnalysisEngine.isDartFileName(file)) {
472 CompilationUnit dartUnit = getResolvedCompilationUnitToResendNotificat ion(file); 473 CompilationUnit dartUnit = getResolvedCompilationUnitToResendNotificat ion(file);
473 if (dartUnit != null) { 474 if (dartUnit != null) {
474 switch (service) { 475 switch (service) {
475 case AnalysisService.HIGHLIGHTS: 476 case AnalysisService.HIGHLIGHTS:
476 sendAnalysisNotificationHighlights(this, file, dartUnit); 477 sendAnalysisNotificationHighlights(this, file, dartUnit);
477 break; 478 break;
478 case AnalysisService.NAVIGATION: 479 case AnalysisService.NAVIGATION:
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
596 /** 597 /**
597 * An enumeration of the services provided by the server domain. 598 * An enumeration of the services provided by the server domain.
598 */ 599 */
599 class ServerService extends Enum2<ServerService> { 600 class ServerService extends Enum2<ServerService> {
600 static const ServerService STATUS = const ServerService('STATUS', 0); 601 static const ServerService STATUS = const ServerService('STATUS', 0);
601 602
602 static const List<ServerService> VALUES = const [STATUS]; 603 static const List<ServerService> VALUES = const [STATUS];
603 604
604 const ServerService(String name, int ordinal) : super(name, ordinal); 605 const ServerService(String name, int ordinal) : super(name, ordinal);
605 } 606 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analysis_server/lib/src/constants.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698