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

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

Issue 2545553007: Add support for generating lints when using the new driver (Closed)
Patch Set: fix some tests Created 4 years 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 | « no previous file | pkg/analysis_server/lib/src/context_manager.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 import 'dart:core'; 9 import 'dart:core';
10 import 'dart:io' as io; 10 import 'dart:io' as io;
(...skipping 889 matching lines...) Expand 10 before | Expand all | Expand 10 after
900 */ 900 */
901 bool hasAnalysisSubscription(AnalysisService service, String file) { 901 bool hasAnalysisSubscription(AnalysisService service, String file) {
902 Set<String> files = analysisServices[service]; 902 Set<String> files = analysisServices[service];
903 return files != null && files.contains(file); 903 return files != null && files.contains(file);
904 } 904 }
905 905
906 /** 906 /**
907 * Return `true` if analysis is complete. 907 * Return `true` if analysis is complete.
908 */ 908 */
909 bool isAnalysisComplete() { 909 bool isAnalysisComplete() {
910 return operationQueue.isEmpty; 910 return operationQueue.isEmpty && !analysisDriverScheduler.isAnalyzing;
911 } 911 }
912 912
913 /** 913 /**
914 * Return `true` if the given path is a valid `FilePath`. 914 * Return `true` if the given path is a valid `FilePath`.
915 * 915 *
916 * This means that it is absolute and normalized. 916 * This means that it is absolute and normalized.
917 */ 917 */
918 bool isValidFilePath(String path) { 918 bool isValidFilePath(String path) {
919 return resourceProvider.absolutePathContext.isValid(path); 919 return resourceProvider.absolutePathContext.isValid(path);
920 } 920 }
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
1145 if (statusAnalyzing == isAnalyzing) { 1145 if (statusAnalyzing == isAnalyzing) {
1146 return; 1146 return;
1147 } 1147 }
1148 statusAnalyzing = isAnalyzing; 1148 statusAnalyzing = isAnalyzing;
1149 AnalysisStatus analysis = new AnalysisStatus(isAnalyzing); 1149 AnalysisStatus analysis = new AnalysisStatus(isAnalyzing);
1150 channel.sendNotification( 1150 channel.sendNotification(
1151 new ServerStatusParams(analysis: analysis).toNotification()); 1151 new ServerStatusParams(analysis: analysis).toNotification());
1152 } 1152 }
1153 1153
1154 /** 1154 /**
1155 * Send status notification to the client. The `operation` is the operation 1155 * Send status notification to the client. The state of analysis is given by
1156 * being performed or `null` if analysis is complete. 1156 * the [status] information.
1157 */ 1157 */
1158 void sendStatusNotificationNew(nd.AnalysisStatus status) { 1158 void sendStatusNotificationNew(nd.AnalysisStatus status) {
1159 if (_onAnalysisCompleteCompleter != null && !status.isAnalyzing) {
1160 _onAnalysisCompleteCompleter.complete();
1161 _onAnalysisCompleteCompleter = null;
1162 }
1159 // Only send status when subscribed. 1163 // Only send status when subscribed.
1160 if (!serverServices.contains(ServerService.STATUS)) { 1164 if (!serverServices.contains(ServerService.STATUS)) {
1161 return; 1165 return;
1162 } 1166 }
1163 // Only send status when it changes 1167 // Only send status when it changes
1164 if (statusAnalyzing == status.isAnalyzing) { 1168 if (statusAnalyzing == status.isAnalyzing) {
1165 return; 1169 return;
1166 } 1170 }
1167 statusAnalyzing = status.isAnalyzing; 1171 statusAnalyzing = status.isAnalyzing;
1168 AnalysisStatus analysis = new AnalysisStatus(status.isAnalyzing); 1172 AnalysisStatus analysis = new AnalysisStatus(status.isAnalyzing);
(...skipping 914 matching lines...) Expand 10 before | Expand all | Expand 10 after
2083 */ 2087 */
2084 static PerformanceTag splitStore = new PerformanceTag('splitStore'); 2088 static PerformanceTag splitStore = new PerformanceTag('splitStore');
2085 } 2089 }
2086 2090
2087 class _NullStringSink implements StringSink { 2091 class _NullStringSink implements StringSink {
2088 void write(Object obj) {} 2092 void write(Object obj) {}
2089 void writeAll(Iterable objects, [String separator = ""]) {} 2093 void writeAll(Iterable objects, [String separator = ""]) {}
2090 void writeCharCode(int charCode) {} 2094 void writeCharCode(int charCode) {}
2091 void writeln([Object obj = ""]) {} 2095 void writeln([Object obj = ""]) {}
2092 } 2096 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analysis_server/lib/src/context_manager.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698