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

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

Issue 2425423009: Split out options from ContextBuilder (Closed)
Patch Set: Created 4 years, 2 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 test.context.directory.manager; 5 library test.context.directory.manager;
6 6
7 import 'dart:collection'; 7 import 'dart:collection';
8 8
9 import 'package:analysis_server/src/context_manager.dart'; 9 import 'package:analysis_server/src/context_manager.dart';
10 import 'package:analyzer/error/error.dart'; 10 import 'package:analyzer/error/error.dart';
(...skipping 2689 matching lines...) Expand 10 before | Expand all | Expand 10 after
2700 } 2700 }
2701 2701
2702 @override 2702 @override
2703 void computingPackageMap(bool computing) { 2703 void computingPackageMap(bool computing) {
2704 // Do nothing. 2704 // Do nothing.
2705 } 2705 }
2706 2706
2707 @override 2707 @override
2708 ContextBuilder createContextBuilder(Folder folder, AnalysisOptions options) { 2708 ContextBuilder createContextBuilder(Folder folder, AnalysisOptions options) {
2709 DartSdkManager sdkManager = new DartSdkManager('/', false); 2709 DartSdkManager sdkManager = new DartSdkManager('/', false);
2710 ContextBuilder builder = 2710 ContextBuilderOptions builderOptions = new ContextBuilderOptions();
2711 new ContextBuilder(resourceProvider, sdkManager, new ContentCache()); 2711 builderOptions.defaultOptions = options;
2712 builder.defaultOptions = options; 2712 ContextBuilder builder = new ContextBuilder(
2713 resourceProvider, sdkManager, new ContentCache(),
2714 options: builderOptions);
2713 return builder; 2715 return builder;
2714 } 2716 }
2715 2717
2716 @override 2718 @override
2717 void moveContext(Folder from, Folder to) { 2719 void moveContext(Folder from, Folder to) {
2718 String path = from.path; 2720 String path = from.path;
2719 String path2 = to.path; 2721 String path2 = to.path;
2720 expect(currentContextFilePaths, contains(path)); 2722 expect(currentContextFilePaths, contains(path));
2721 expect(currentContextTimestamps, contains(path)); 2723 expect(currentContextTimestamps, contains(path));
2722 expect(currentContextSources, contains(path)); 2724 expect(currentContextSources, contains(path));
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
2757 class TestUriResolver extends UriResolver { 2759 class TestUriResolver extends UriResolver {
2758 Map<Uri, Source> uriMap; 2760 Map<Uri, Source> uriMap;
2759 2761
2760 TestUriResolver(this.uriMap); 2762 TestUriResolver(this.uriMap);
2761 2763
2762 @override 2764 @override
2763 Source resolveAbsolute(Uri uri, [Uri actualUri]) { 2765 Source resolveAbsolute(Uri uri, [Uri actualUri]) {
2764 return uriMap[uri]; 2766 return uriMap[uri];
2765 } 2767 }
2766 } 2768 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/lib/src/analysis_server.dart ('k') | pkg/analyzer/lib/src/context/builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698