| 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 analyzer.test.src.context.abstract_context; |    5 library analyzer.test.src.context.abstract_context; | 
|    6  |    6  | 
|    7 import 'package:analyzer/dart/ast/ast.dart'; |    7 import 'package:analyzer/dart/ast/ast.dart'; | 
|    8 import 'package:analyzer/dart/element/element.dart'; |    8 import 'package:analyzer/dart/element/element.dart'; | 
|    9 import 'package:analyzer/dart/element/visitor.dart'; |    9 import 'package:analyzer/dart/element/visitor.dart'; | 
|   10 import 'package:analyzer/file_system/file_system.dart'; |   10 import 'package:analyzer/file_system/file_system.dart'; | 
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  155     analysisDriver = context.driver; |  155     analysisDriver = context.driver; | 
|  156   } |  156   } | 
|  157  |  157  | 
|  158   CompilationUnit resolveLibraryUnit(Source source) { |  158   CompilationUnit resolveLibraryUnit(Source source) { | 
|  159     return context.resolveCompilationUnit2(source, source); |  159     return context.resolveCompilationUnit2(source, source); | 
|  160   } |  160   } | 
|  161  |  161  | 
|  162   void setUp() { |  162   void setUp() { | 
|  163     List<Plugin> plugins = <Plugin>[]; |  163     List<Plugin> plugins = <Plugin>[]; | 
|  164     plugins.addAll(AnalysisEngine.instance.requiredPlugins); |  164     plugins.addAll(AnalysisEngine.instance.requiredPlugins); | 
|  165     plugins.add(AnalysisEngine.instance.commandLinePlugin); |  | 
|  166  |  165  | 
|  167     ExtensionManager manager = new ExtensionManager(); |  166     ExtensionManager manager = new ExtensionManager(); | 
|  168     manager.processPlugins(plugins); |  167     manager.processPlugins(plugins); | 
|  169  |  168  | 
|  170     prepareAnalysisContext(); |  169     prepareAnalysisContext(); | 
|  171   } |  170   } | 
|  172  |  171  | 
|  173   void tearDown() {} |  172   void tearDown() {} | 
|  174 } |  173 } | 
|  175  |  174  | 
|  176 /** |  175 /** | 
|  177  * Wraps the given [_ElementVisitorFunction] into an instance of |  176  * Wraps the given [_ElementVisitorFunction] into an instance of | 
|  178  * [GeneralizingElementVisitor]. |  177  * [GeneralizingElementVisitor]. | 
|  179  */ |  178  */ | 
|  180 class _ElementVisitorFunctionWrapper extends GeneralizingElementVisitor { |  179 class _ElementVisitorFunctionWrapper extends GeneralizingElementVisitor { | 
|  181   final _ElementVisitorFunction function; |  180   final _ElementVisitorFunction function; | 
|  182  |  181  | 
|  183   _ElementVisitorFunctionWrapper(this.function); |  182   _ElementVisitorFunctionWrapper(this.function); | 
|  184  |  183  | 
|  185   visitElement(Element element) { |  184   visitElement(Element element) { | 
|  186     function(element); |  185     function(element); | 
|  187     super.visitElement(element); |  186     super.visitElement(element); | 
|  188   } |  187   } | 
|  189 } |  188 } | 
| OLD | NEW |