| 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 context.directory.manager; | 5 library context.directory.manager; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 import 'dart:collection'; | 8 import 'dart:collection'; |
| 9 import 'dart:convert'; | 9 import 'dart:convert'; |
| 10 import 'dart:core' hide Resource; | 10 import 'dart:core' hide Resource; |
| 11 | 11 |
| 12 import 'package:analysis_server/src/analysis_server.dart'; | 12 import 'package:analysis_server/src/analysis_server.dart'; |
| 13 import 'package:analysis_server/src/server_options.dart'; |
| 13 import 'package:analysis_server/uri/resolver_provider.dart'; | 14 import 'package:analysis_server/uri/resolver_provider.dart'; |
| 14 import 'package:analyzer/file_system/file_system.dart'; | 15 import 'package:analyzer/file_system/file_system.dart'; |
| 15 import 'package:analyzer/instrumentation/instrumentation.dart'; | 16 import 'package:analyzer/instrumentation/instrumentation.dart'; |
| 16 import 'package:analyzer/source/analysis_options_provider.dart'; | 17 import 'package:analyzer/source/analysis_options_provider.dart'; |
| 17 import 'package:analyzer/source/package_map_provider.dart'; | 18 import 'package:analyzer/source/package_map_provider.dart'; |
| 18 import 'package:analyzer/source/package_map_resolver.dart'; | 19 import 'package:analyzer/source/package_map_resolver.dart'; |
| 19 import 'package:analyzer/source/path_filter.dart'; | 20 import 'package:analyzer/source/path_filter.dart'; |
| 20 import 'package:analyzer/source/pub_package_map_provider.dart'; | 21 import 'package:analyzer/source/pub_package_map_provider.dart'; |
| 21 import 'package:analyzer/src/generated/engine.dart'; | 22 import 'package:analyzer/src/generated/engine.dart'; |
| 22 import 'package:analyzer/src/generated/java_io.dart'; | 23 import 'package:analyzer/src/generated/java_io.dart'; |
| (...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 300 } | 301 } |
| 301 | 302 |
| 302 /** | 303 /** |
| 303 * Class that maintains a mapping from included/excluded paths to a set of | 304 * Class that maintains a mapping from included/excluded paths to a set of |
| 304 * folders that should correspond to analysis contexts. | 305 * folders that should correspond to analysis contexts. |
| 305 */ | 306 */ |
| 306 class ContextManagerImpl implements ContextManager { | 307 class ContextManagerImpl implements ContextManager { |
| 307 /** | 308 /** |
| 308 * Temporary flag to hide WIP .packages support (DEP 5). | 309 * Temporary flag to hide WIP .packages support (DEP 5). |
| 309 */ | 310 */ |
| 310 static bool ENABLE_PACKAGESPEC_SUPPORT = false; | 311 static bool ENABLE_PACKAGESPEC_SUPPORT = |
| 312 serverOptions.isSet('ContextManagerImpl.ENABLE_PACKAGESPEC_SUPPORT'); |
| 311 | 313 |
| 312 /** | 314 /** |
| 313 * The name of the `lib` directory. | 315 * The name of the `lib` directory. |
| 314 */ | 316 */ |
| 315 static const String LIB_DIR_NAME = 'lib'; | 317 static const String LIB_DIR_NAME = 'lib'; |
| 316 | 318 |
| 317 /** | 319 /** |
| 318 * The name of `packages` folders. | 320 * The name of `packages` folders. |
| 319 */ | 321 */ |
| 320 static const String PACKAGES_NAME = 'packages'; | 322 static const String PACKAGES_NAME = 'packages'; |
| (...skipping 1011 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1332 | 1334 |
| 1333 PackagesFileDisposition(this.packages) {} | 1335 PackagesFileDisposition(this.packages) {} |
| 1334 | 1336 |
| 1335 @override | 1337 @override |
| 1336 String get packageRoot => null; | 1338 String get packageRoot => null; |
| 1337 | 1339 |
| 1338 @override | 1340 @override |
| 1339 Iterable<UriResolver> createPackageUriResolvers( | 1341 Iterable<UriResolver> createPackageUriResolvers( |
| 1340 ResourceProvider resourceProvider) => const <UriResolver>[]; | 1342 ResourceProvider resourceProvider) => const <UriResolver>[]; |
| 1341 } | 1343 } |
| OLD | NEW |