| 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 test.context.directory.manager; | 5 library test.context.directory.manager; |
| 6 | 6 |
| 7 import 'dart:collection'; | 7 import 'dart:collection'; |
| 8 | 8 |
| 9 import 'package:analysis_server/src/context_manager.dart'; | 9 import 'package:analysis_server/src/context_manager.dart'; |
| 10 import 'package:analysis_server/src/utilities/null_string_sink.dart'; | 10 import 'package:analysis_server/src/utilities/null_string_sink.dart'; |
| (...skipping 2694 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2705 SourceFactory sourceFactory = context.sourceFactory; | 2705 SourceFactory sourceFactory = context.sourceFactory; |
| 2706 AnalysisOptions analysisOptions = context.analysisOptions; | 2706 AnalysisOptions analysisOptions = context.analysisOptions; |
| 2707 context.dispose(); | 2707 context.dispose(); |
| 2708 | 2708 |
| 2709 currentDriver = new AnalysisDriver( | 2709 currentDriver = new AnalysisDriver( |
| 2710 scheduler, | 2710 scheduler, |
| 2711 logger, | 2711 logger, |
| 2712 resourceProvider, | 2712 resourceProvider, |
| 2713 new MemoryByteStore(), | 2713 new MemoryByteStore(), |
| 2714 new FileContentOverlay(), | 2714 new FileContentOverlay(), |
| 2715 path, |
| 2715 sourceFactory, | 2716 sourceFactory, |
| 2716 analysisOptions); | 2717 analysisOptions); |
| 2717 currentDriver.name = path; | |
| 2718 driverMap[path] = currentDriver; | 2718 driverMap[path] = currentDriver; |
| 2719 currentDriver.exceptions.listen((ExceptionResult result) { | 2719 currentDriver.exceptions.listen((ExceptionResult result) { |
| 2720 AnalysisEngine.instance.logger | 2720 AnalysisEngine.instance.logger |
| 2721 .logError('Analysis failed: ${result.path}', result.exception); | 2721 .logError('Analysis failed: ${result.path}', result.exception); |
| 2722 }); | 2722 }); |
| 2723 return currentDriver; | 2723 return currentDriver; |
| 2724 } | 2724 } |
| 2725 | 2725 |
| 2726 @override | 2726 @override |
| 2727 AnalysisContext addContext(Folder folder, AnalysisOptions options) { | 2727 AnalysisContext addContext(Folder folder, AnalysisOptions options) { |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2884 class TestUriResolver extends UriResolver { | 2884 class TestUriResolver extends UriResolver { |
| 2885 Map<Uri, Source> uriMap; | 2885 Map<Uri, Source> uriMap; |
| 2886 | 2886 |
| 2887 TestUriResolver(this.uriMap); | 2887 TestUriResolver(this.uriMap); |
| 2888 | 2888 |
| 2889 @override | 2889 @override |
| 2890 Source resolveAbsolute(Uri uri, [Uri actualUri]) { | 2890 Source resolveAbsolute(Uri uri, [Uri actualUri]) { |
| 2891 return uriMap[uri]; | 2891 return uriMap[uri]; |
| 2892 } | 2892 } |
| 2893 } | 2893 } |
| OLD | NEW |