| 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:async'; | 7 import 'dart:async'; |
| 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/plugin/notification_manager.dart'; | 10 import 'package:analysis_server/src/plugin/notification_manager.dart'; |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 import 'package:analyzer/src/generated/source_io.dart'; | 25 import 'package:analyzer/src/generated/source_io.dart'; |
| 26 import 'package:analyzer/src/services/lint.dart'; | 26 import 'package:analyzer/src/services/lint.dart'; |
| 27 import 'package:analyzer/src/summary/summary_file_builder.dart'; | 27 import 'package:analyzer/src/summary/summary_file_builder.dart'; |
| 28 import 'package:analyzer/src/util/glob.dart'; | 28 import 'package:analyzer/src/util/glob.dart'; |
| 29 import 'package:front_end/src/base/performace_logger.dart'; | 29 import 'package:front_end/src/base/performace_logger.dart'; |
| 30 import 'package:front_end/src/byte_store/byte_store.dart'; | 30 import 'package:front_end/src/byte_store/byte_store.dart'; |
| 31 import 'package:linter/src/rules.dart'; | 31 import 'package:linter/src/rules.dart'; |
| 32 import 'package:linter/src/rules/avoid_as.dart'; | 32 import 'package:linter/src/rules/avoid_as.dart'; |
| 33 import 'package:path/path.dart' as path; | 33 import 'package:path/path.dart' as path; |
| 34 import 'package:plugin/manager.dart'; | 34 import 'package:plugin/manager.dart'; |
| 35 import 'package:plugin/plugin.dart'; | |
| 36 import 'package:test/test.dart'; | 35 import 'package:test/test.dart'; |
| 37 import 'package:test_reflective_loader/test_reflective_loader.dart'; | 36 import 'package:test_reflective_loader/test_reflective_loader.dart'; |
| 38 import 'package:watcher/watcher.dart'; | 37 import 'package:watcher/watcher.dart'; |
| 39 | 38 |
| 40 import 'mock_sdk.dart'; | 39 import 'mock_sdk.dart'; |
| 41 import 'mocks.dart'; | 40 import 'mocks.dart'; |
| 42 import 'src/plugin/plugin_manager_test.dart'; | 41 import 'src/plugin/plugin_manager_test.dart'; |
| 43 | 42 |
| 44 main() { | 43 main() { |
| 45 defineReflectiveSuite(() { | 44 defineReflectiveSuite(() { |
| (...skipping 1716 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1762 return filePath; | 1761 return filePath; |
| 1763 } | 1762 } |
| 1764 | 1763 |
| 1765 String newFolder(List<String> pathComponents) { | 1764 String newFolder(List<String> pathComponents) { |
| 1766 String folderPath = path.posix.joinAll(pathComponents); | 1765 String folderPath = path.posix.joinAll(pathComponents); |
| 1767 resourceProvider.newFolder(folderPath); | 1766 resourceProvider.newFolder(folderPath); |
| 1768 return folderPath; | 1767 return folderPath; |
| 1769 } | 1768 } |
| 1770 | 1769 |
| 1771 void processRequiredPlugins() { | 1770 void processRequiredPlugins() { |
| 1772 List<Plugin> plugins = <Plugin>[]; | |
| 1773 plugins.addAll(AnalysisEngine.instance.requiredPlugins); | |
| 1774 ExtensionManager manager = new ExtensionManager(); | 1771 ExtensionManager manager = new ExtensionManager(); |
| 1775 manager.processPlugins(plugins); | 1772 manager.processPlugins(AnalysisEngine.instance.requiredPlugins); |
| 1776 | 1773 |
| 1777 registerLintRules(); | 1774 registerLintRules(); |
| 1778 } | 1775 } |
| 1779 | 1776 |
| 1780 UriResolver providePackageResolver(Folder folder) => packageResolver; | 1777 UriResolver providePackageResolver(Folder folder) => packageResolver; |
| 1781 | 1778 |
| 1782 void setUp() { | 1779 void setUp() { |
| 1783 processRequiredPlugins(); | 1780 processRequiredPlugins(); |
| 1784 resourceProvider = new MemoryResourceProvider(); | 1781 resourceProvider = new MemoryResourceProvider(); |
| 1785 resourceProvider.newFolder(projPath); | 1782 resourceProvider.newFolder(projPath); |
| (...skipping 900 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2686 class TestUriResolver extends UriResolver { | 2683 class TestUriResolver extends UriResolver { |
| 2687 Map<Uri, Source> uriMap; | 2684 Map<Uri, Source> uriMap; |
| 2688 | 2685 |
| 2689 TestUriResolver(this.uriMap); | 2686 TestUriResolver(this.uriMap); |
| 2690 | 2687 |
| 2691 @override | 2688 @override |
| 2692 Source resolveAbsolute(Uri uri, [Uri actualUri]) { | 2689 Source resolveAbsolute(Uri uri, [Uri actualUri]) { |
| 2693 return uriMap[uri]; | 2690 return uriMap[uri]; |
| 2694 } | 2691 } |
| 2695 } | 2692 } |
| OLD | NEW |