| OLD | NEW |
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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.src.single_context_manager; | 5 library analysis_server.src.single_context_manager; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 import 'dart:core'; | 8 import 'dart:core'; |
| 9 import 'dart:math' as math; | 9 import 'dart:math' as math; |
| 10 | 10 |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 AnalysisContext getContextFor(String path) { | 140 AnalysisContext getContextFor(String path) { |
| 141 if (context == null) { | 141 if (context == null) { |
| 142 return null; | 142 return null; |
| 143 } else if (_isContainedIn(includedPaths, path)) { | 143 } else if (_isContainedIn(includedPaths, path)) { |
| 144 return context; | 144 return context; |
| 145 } | 145 } |
| 146 return null; | 146 return null; |
| 147 } | 147 } |
| 148 | 148 |
| 149 @override | 149 @override |
| 150 List<AnalysisDriver> getDriversInAnalysisRoot(Folder analysisRoot) { |
| 151 throw new UnimplementedError( |
| 152 'Unexpected invocation of getDriversInAnalysisRoot in SingleContextManag
er'); |
| 153 } |
| 154 |
| 155 @override |
| 150 bool isIgnored(String path) { | 156 bool isIgnored(String path) { |
| 151 return !_isContainedIn(includedPaths, path) || _isExcludedPath(path); | 157 return !_isContainedIn(includedPaths, path) || _isExcludedPath(path); |
| 152 } | 158 } |
| 153 | 159 |
| 154 @override | 160 @override |
| 155 bool isInAnalysisRoot(String path) { | 161 bool isInAnalysisRoot(String path) { |
| 156 return _isContainedIn(includedPaths, path) && | 162 return _isContainedIn(includedPaths, path) && |
| 157 !_isContainedIn(excludedPaths, path); | 163 !_isContainedIn(excludedPaths, path); |
| 158 } | 164 } |
| 159 | 165 |
| (...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 506 static List<Resource> _getChildrenSafe(Folder folder) { | 512 static List<Resource> _getChildrenSafe(Folder folder) { |
| 507 try { | 513 try { |
| 508 return folder.getChildren(); | 514 return folder.getChildren(); |
| 509 } on FileSystemException { | 515 } on FileSystemException { |
| 510 // The folder either doesn't exist or cannot be read. | 516 // The folder either doesn't exist or cannot be read. |
| 511 // Either way, there are no children. | 517 // Either way, there are no children. |
| 512 return const <Resource>[]; | 518 return const <Resource>[]; |
| 513 } | 519 } |
| 514 } | 520 } |
| 515 } | 521 } |
| OLD | NEW |