Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(77)

Side by Side Diff: pkg/analysis_server/test/abstract_context.dart

Issue 2639743002: Report StateError if the DartSDK for an AnalysisDriver does not have summary. (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 new SourceFactory([SDK_RESOLVER, packageResolver, resourceResolver]); 147 new SourceFactory([SDK_RESOLVER, packageResolver, resourceResolver]);
148 if (enableNewAnalysisDriver) { 148 if (enableNewAnalysisDriver) {
149 PerformanceLog log = new PerformanceLog(_logBuffer); 149 PerformanceLog log = new PerformanceLog(_logBuffer);
150 AnalysisDriverScheduler scheduler = new AnalysisDriverScheduler(log); 150 AnalysisDriverScheduler scheduler = new AnalysisDriverScheduler(log);
151 _driver = new AnalysisDriver( 151 _driver = new AnalysisDriver(
152 scheduler, 152 scheduler,
153 log, 153 log,
154 provider, 154 provider,
155 new MemoryByteStore(), 155 new MemoryByteStore(),
156 _fileContentOverlay, 156 _fileContentOverlay,
157 'test',
157 sourceFactory, 158 sourceFactory,
158 new AnalysisOptionsImpl()); 159 new AnalysisOptionsImpl());
159 scheduler.start(); 160 scheduler.start();
160 } else { 161 } else {
161 _context = AnalysisEngine.instance.createAnalysisContext(); 162 _context = AnalysisEngine.instance.createAnalysisContext();
162 context.sourceFactory = sourceFactory; 163 context.sourceFactory = sourceFactory;
163 } 164 }
164 AnalysisEngine.instance.logger = PrintLogger.instance; 165 AnalysisEngine.instance.logger = PrintLogger.instance;
165 } 166 }
166 167
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 * [engine.GeneralizingElementVisitor]. 204 * [engine.GeneralizingElementVisitor].
204 */ 205 */
205 class _ElementVisitorFunctionWrapper extends GeneralizingElementVisitor { 206 class _ElementVisitorFunctionWrapper extends GeneralizingElementVisitor {
206 final _ElementVisitorFunction function; 207 final _ElementVisitorFunction function;
207 _ElementVisitorFunctionWrapper(this.function); 208 _ElementVisitorFunctionWrapper(this.function);
208 visitElement(Element element) { 209 visitElement(Element element) {
209 function(element); 210 function(element);
210 super.visitElement(element); 211 super.visitElement(element);
211 } 212 }
212 } 213 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/lib/src/analysis_server.dart ('k') | pkg/analysis_server/test/context_manager_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698