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 AnalysisDriver getDriverFor(String path) { | |
151 return null; | |
Paul Berry
2016/12/12 21:11:37
Would it be better to throw UnimplementedError lik
scheglov
2016/12/12 21:13:08
It would.
Thank you.
Fixed.
| |
152 } | |
153 | |
154 @override | |
150 List<AnalysisDriver> getDriversInAnalysisRoot(Folder analysisRoot) { | 155 List<AnalysisDriver> getDriversInAnalysisRoot(Folder analysisRoot) { |
151 throw new UnimplementedError( | 156 throw new UnimplementedError( |
152 'Unexpected invocation of getDriversInAnalysisRoot in SingleContextManag er'); | 157 'Unexpected invocation of getDriversInAnalysisRoot in SingleContextManag er'); |
153 } | 158 } |
154 | 159 |
155 @override | 160 @override |
156 bool isIgnored(String path) { | 161 bool isIgnored(String path) { |
157 return !_isContainedIn(includedPaths, path) || _isExcludedPath(path); | 162 return !_isContainedIn(includedPaths, path) || _isExcludedPath(path); |
158 } | 163 } |
159 | 164 |
(...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
512 static List<Resource> _getChildrenSafe(Folder folder) { | 517 static List<Resource> _getChildrenSafe(Folder folder) { |
513 try { | 518 try { |
514 return folder.getChildren(); | 519 return folder.getChildren(); |
515 } on FileSystemException { | 520 } on FileSystemException { |
516 // The folder either doesn't exist or cannot be read. | 521 // The folder either doesn't exist or cannot be read. |
517 // Either way, there are no children. | 522 // Either way, there are no children. |
518 return const <Resource>[]; | 523 return const <Resource>[]; |
519 } | 524 } |
520 } | 525 } |
521 } | 526 } |
OLD | NEW |