| OLD | NEW |
| 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 domain.execution; | 5 library domain.execution; |
| 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_server.dart'; | 10 import 'package:analysis_server/src/analysis_server.dart'; |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 onFileAnalyzed.cancel(); | 135 onFileAnalyzed.cancel(); |
| 136 onFileAnalyzed = null; | 136 onFileAnalyzed = null; |
| 137 } | 137 } |
| 138 } | 138 } |
| 139 return new ExecutionSetSubscriptionsResult().toResponse(request.id); | 139 return new ExecutionSetSubscriptionsResult().toResponse(request.id); |
| 140 } | 140 } |
| 141 | 141 |
| 142 void _fileAnalyzed(ChangeNotice notice) { | 142 void _fileAnalyzed(ChangeNotice notice) { |
| 143 Source source = notice.source; | 143 Source source = notice.source; |
| 144 String filePath = source.fullName; | 144 String filePath = source.fullName; |
| 145 if (!notice.resolved || !_isInAnalysisRoot(filePath)) { | 145 if (!_isInAnalysisRoot(filePath)) { |
| 146 return; | 146 return; |
| 147 } | 147 } |
| 148 AnalysisContext context = server.getAnalysisContext(filePath); | 148 AnalysisContext context = server.getAnalysisContext(filePath); |
| 149 if (AnalysisEngine.isDartFileName(filePath)) { | 149 if (AnalysisEngine.isDartFileName(filePath)) { |
| 150 ExecutableKind kind = ExecutableKind.NOT_EXECUTABLE; | 150 ExecutableKind kind = ExecutableKind.NOT_EXECUTABLE; |
| 151 if (context.isClientLibrary(source)) { | 151 if (context.isClientLibrary(source)) { |
| 152 kind = ExecutableKind.CLIENT; | 152 kind = ExecutableKind.CLIENT; |
| 153 if (context.isServerLibrary(source)) { | 153 if (context.isServerLibrary(source)) { |
| 154 kind = ExecutableKind.EITHER; | 154 kind = ExecutableKind.EITHER; |
| 155 } | 155 } |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 216 if (_isInAnalysisRoot(filePath)) { | 216 if (_isInAnalysisRoot(filePath)) { |
| 217 server.sendNotification( | 217 server.sendNotification( |
| 218 new ExecutionLaunchDataParams(filePath, kind: kind).toNotification()); | 218 new ExecutionLaunchDataParams(filePath, kind: kind).toNotification()); |
| 219 } | 219 } |
| 220 } | 220 } |
| 221 | 221 |
| 222 static List<String> _getFullNames(List<Source> sources) { | 222 static List<String> _getFullNames(List<Source> sources) { |
| 223 return sources.map((Source source) => source.fullName).toList(); | 223 return sources.map((Source source) => source.fullName).toList(); |
| 224 } | 224 } |
| 225 } | 225 } |
| OLD | NEW |