| 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 testing.abstract_context; | 5 library testing.abstract_context; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 | 8 |
| 9 import 'package:analyzer/dart/ast/ast.dart'; | 9 import 'package:analyzer/dart/ast/ast.dart'; |
| 10 import 'package:analyzer/dart/element/element.dart'; | 10 import 'package:analyzer/dart/element/element.dart'; |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 File newFile(String path, [String content]) => | 106 File newFile(String path, [String content]) => |
| 107 provider.newFile(provider.convertPath(path), content ?? ''); | 107 provider.newFile(provider.convertPath(path), content ?? ''); |
| 108 | 108 |
| 109 Folder newFolder(String path) => | 109 Folder newFolder(String path) => |
| 110 provider.newFolder(provider.convertPath(path)); | 110 provider.newFolder(provider.convertPath(path)); |
| 111 | 111 |
| 112 /** | 112 /** |
| 113 * Performs all analysis tasks in [context]. | 113 * Performs all analysis tasks in [context]. |
| 114 */ | 114 */ |
| 115 void performAllAnalysisTasks() { | 115 void performAllAnalysisTasks() { |
| 116 if (enableNewAnalysisDriver) { |
| 117 return; |
| 118 } |
| 116 while (true) { | 119 while (true) { |
| 117 engine.AnalysisResult result = context.performAnalysisTask(); | 120 engine.AnalysisResult result = context.performAnalysisTask(); |
| 118 if (!result.hasMoreWork) { | 121 if (!result.hasMoreWork) { |
| 119 break; | 122 break; |
| 120 } | 123 } |
| 121 } | 124 } |
| 122 } | 125 } |
| 123 | 126 |
| 124 void processRequiredPlugins() { | 127 void processRequiredPlugins() { |
| 125 AnalysisEngine.instance.processRequiredPlugins(); | 128 AnalysisEngine.instance.processRequiredPlugins(); |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 200 * [engine.GeneralizingElementVisitor]. | 203 * [engine.GeneralizingElementVisitor]. |
| 201 */ | 204 */ |
| 202 class _ElementVisitorFunctionWrapper extends GeneralizingElementVisitor { | 205 class _ElementVisitorFunctionWrapper extends GeneralizingElementVisitor { |
| 203 final _ElementVisitorFunction function; | 206 final _ElementVisitorFunction function; |
| 204 _ElementVisitorFunctionWrapper(this.function); | 207 _ElementVisitorFunctionWrapper(this.function); |
| 205 visitElement(Element element) { | 208 visitElement(Element element) { |
| 206 function(element); | 209 function(element); |
| 207 super.visitElement(element); | 210 super.visitElement(element); |
| 208 } | 211 } |
| 209 } | 212 } |
| OLD | NEW |