Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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.src.task.abstract_context_test; | 5 library test.src.task.abstract_context_test; |
| 6 | 6 |
| 7 import 'package:analyzer/file_system/file_system.dart'; | 7 import 'package:analyzer/file_system/file_system.dart'; |
| 8 import 'package:analyzer/file_system/memory_file_system.dart'; | 8 import 'package:analyzer/file_system/memory_file_system.dart'; |
| 9 import 'package:analyzer/src/context/context.dart'; | 9 import 'package:analyzer/src/context/context.dart'; |
| 10 import 'package:analyzer/src/generated/element.dart'; | 10 import 'package:analyzer/src/generated/element.dart'; |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 78 List<Source> newSources(Map<String, String> sourceMap) { | 78 List<Source> newSources(Map<String, String> sourceMap) { |
| 79 List<Source> sources = <Source>[]; | 79 List<Source> sources = <Source>[]; |
| 80 sourceMap.forEach((String path, String content) { | 80 sourceMap.forEach((String path, String content) { |
| 81 Source source = newSource(path, content); | 81 Source source = newSource(path, content); |
| 82 sources.add(source); | 82 sources.add(source); |
| 83 }); | 83 }); |
| 84 return sources; | 84 return sources; |
| 85 } | 85 } |
| 86 | 86 |
| 87 void setUp() { | 87 void setUp() { |
| 88 // configure TaskManager | |
| 89 { | |
| 90 EnginePlugin plugin = AnalysisEngine.instance.enginePlugin; | |
| 91 if (plugin.taskExtensionPoint == null) { | |
| 92 extensionManager.processPlugins([plugin]); | |
|
scheglov
2015/05/19 21:09:25
I this case the "extensionManager" field is not us
Brian Wilkerson
2015/05/19 21:12:08
Done.
I also removed two unused imports.
| |
| 93 } | |
| 94 } | |
| 95 // prepare AnalysisContext | 88 // prepare AnalysisContext |
| 96 sourceFactory = new SourceFactory(<UriResolver>[ | 89 sourceFactory = new SourceFactory(<UriResolver>[ |
| 97 new DartUriResolver(sdk), | 90 new DartUriResolver(sdk), |
| 98 new ResourceUriResolver(resourceProvider) | 91 new ResourceUriResolver(resourceProvider) |
| 99 ]); | 92 ]); |
| 100 context = createAnalysisContext(); | 93 context = createAnalysisContext(); |
| 101 context.sourceFactory = sourceFactory; | 94 context.sourceFactory = sourceFactory; |
| 102 analysisDriver = context.driver; | 95 analysisDriver = context.driver; |
| 103 } | 96 } |
| 104 | 97 |
| 105 void tearDown() {} | 98 void tearDown() {} |
| 106 } | 99 } |
| OLD | NEW |