| 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 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 170 } | 170 } |
| 171 | 171 |
| 172 /** | 172 /** |
| 173 * Return `true` if the given [filePath] represents a file that is in an | 173 * Return `true` if the given [filePath] represents a file that is in an |
| 174 * analysis root. | 174 * analysis root. |
| 175 */ | 175 */ |
| 176 bool _isInAnalysisRoot(String filePath) | 176 bool _isInAnalysisRoot(String filePath) |
| 177 => server.contextDirectoryManager.isInAnalysisRoot(filePath); | 177 => server.contextDirectoryManager.isInAnalysisRoot(filePath); |
| 178 | 178 |
| 179 void _reportCurrentFileStatus() { | 179 void _reportCurrentFileStatus() { |
| 180 Map<String, List<String>> dartToHtml = new HashMap<String, List<String>>(); | |
| 181 Map<String, List<String>> htmlToDart = new HashMap<String, List<String>>(); | |
| 182 for (AnalysisContext context in server.getAnalysisContexts()) { | 180 for (AnalysisContext context in server.getAnalysisContexts()) { |
| 183 List<Source> librarySources = context.librarySources; | 181 List<Source> librarySources = context.librarySources; |
| 184 List<Source> clientSources = context.launchableClientLibrarySources; | 182 List<Source> clientSources = context.launchableClientLibrarySources; |
| 185 List<Source> serverSources = context.launchableServerLibrarySources; | 183 List<Source> serverSources = context.launchableServerLibrarySources; |
| 186 for (Source source in clientSources) { | 184 for (Source source in clientSources) { |
| 187 if (serverSources.remove(source)) { | 185 if (serverSources.remove(source)) { |
| 188 _sendKindNotification(source.fullName, ExecutableKind.EITHER); | 186 _sendKindNotification(source.fullName, ExecutableKind.EITHER); |
| 189 } else { | 187 } else { |
| 190 _sendKindNotification(source.fullName, ExecutableKind.CLIENT); | 188 _sendKindNotification(source.fullName, ExecutableKind.CLIENT); |
| 191 } | 189 } |
| (...skipping 27 matching lines...) Expand all Loading... |
| 219 if (_isInAnalysisRoot(filePath)) { | 217 if (_isInAnalysisRoot(filePath)) { |
| 220 server.sendNotification( | 218 server.sendNotification( |
| 221 new ExecutionLaunchDataParams(filePath, kind: kind).toNotification()); | 219 new ExecutionLaunchDataParams(filePath, kind: kind).toNotification()); |
| 222 } | 220 } |
| 223 } | 221 } |
| 224 | 222 |
| 225 static List<String> _getFullNames(List<Source> sources) { | 223 static List<String> _getFullNames(List<Source> sources) { |
| 226 return sources.map((Source source) => source.fullName).toList(); | 224 return sources.map((Source source) => source.fullName).toList(); |
| 227 } | 225 } |
| 228 } | 226 } |
| OLD | NEW |