Chromium Code Reviews| Index: pkg/analysis_server/lib/src/context_directory_manager.dart |
| diff --git a/pkg/analysis_server/lib/src/context_directory_manager.dart b/pkg/analysis_server/lib/src/context_directory_manager.dart |
| index fa1970c813998f3fc6a939594f437e1baf8060d9..2fe5a118a859d97fce2e03a2a149096186e6c69c 100644 |
| --- a/pkg/analysis_server/lib/src/context_directory_manager.dart |
| +++ b/pkg/analysis_server/lib/src/context_directory_manager.dart |
| @@ -241,6 +241,19 @@ abstract class ContextDirectoryManager { |
| } |
| /** |
| + * Returns `true` if the given absolute [path] is in one of the current |
| + * root folders and is not excluded. |
| + */ |
| + bool isInAnalysisRoot(String path) { |
|
Brian Wilkerson
2014/08/06 19:40:43
This doesn't look like it's taking care of exclude
scheglov
2014/08/06 19:58:04
Thanks, I was going to add TODO, but forgot.
Done.
|
| + for (Folder root in _currentDirectoryInfo.keys) { |
| + if (path.startsWith(root.path)) { |
| + return true; |
| + } |
| + } |
| + return false; |
| + } |
| + |
| + /** |
| * Called when a new context needs to be created. |
| */ |
| void addContext(Folder folder, Map<String, List<Folder>> packageMap); |