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

Side by Side Diff: pkg/analyzer/test/src/context/abstract_context.dart

Issue 1140313003: Create default tasks if plugins are not being used (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: sort Created 5 years, 7 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
« no previous file with comments | « pkg/analyzer/lib/src/generated/engine.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/generated/engine.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698