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

Side by Side Diff: pkg/analysis_server/lib/src/analysis_server.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
« no previous file with comments | « no previous file | pkg/analysis_server/test/context_manager_test.dart » ('j') | 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) 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 analysis.server; 5 library analysis.server;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:collection'; 8 import 'dart:collection';
9 import 'dart:core'; 9 import 'dart:core';
10 import 'dart:io' as io; 10 import 'dart:io' as io;
(...skipping 1627 matching lines...) Expand 10 before | Expand all | Expand 10 after
1638 Resource resource = resourceProvider.getResource(path); 1638 Resource resource = resourceProvider.getResource(path);
1639 if (resource.exists) { 1639 if (resource.exists) {
1640 if (resource is File) { 1640 if (resource is File) {
1641 defaultPackageFilePath = path; 1641 defaultPackageFilePath = path;
1642 } else { 1642 } else {
1643 defaultPackagesDirectoryPath = path; 1643 defaultPackagesDirectoryPath = path;
1644 } 1644 }
1645 } 1645 }
1646 } 1646 }
1647 1647
1648 ContextBuilderOptions builderOptions = new ContextBuilderOptions();
1649 builderOptions.defaultOptions = options;
1650 builderOptions.defaultPackageFilePath = defaultPackageFilePath;
1651 builderOptions.defaultPackagesDirectoryPath = defaultPackagesDirectoryPath;
1652 if (analysisServer.options.enablePubSummaryManager) {
1653 builderOptions.pubSummaryManager = analysisServer.pubSummaryManager;
1654 }
1648 ContextBuilder builder = new ContextBuilder(resourceProvider, 1655 ContextBuilder builder = new ContextBuilder(resourceProvider,
1649 analysisServer.sdkManager, analysisServer.overlayState); 1656 analysisServer.sdkManager, analysisServer.overlayState,
1650 builder.defaultOptions = options; 1657 options: builderOptions);
1651 builder.fileResolverProvider = analysisServer.fileResolverProvider; 1658 builder.fileResolverProvider = analysisServer.fileResolverProvider;
1652 builder.packageResolverProvider = analysisServer.packageResolverProvider; 1659 builder.packageResolverProvider = analysisServer.packageResolverProvider;
1653 builder.defaultPackageFilePath = defaultPackageFilePath;
1654 builder.defaultPackagesDirectoryPath = defaultPackagesDirectoryPath;
1655 if (analysisServer.options.enablePubSummaryManager) {
1656 builder.pubSummaryManager = analysisServer.pubSummaryManager;
1657 }
1658 return builder; 1660 return builder;
1659 } 1661 }
1660 1662
1661 @override 1663 @override
1662 void moveContext(Folder from, Folder to) { 1664 void moveContext(Folder from, Folder to) {
1663 // There is nothing to do. 1665 // There is nothing to do.
1664 // This method is mostly for tests. 1666 // This method is mostly for tests.
1665 // Context managers manage folders and contexts themselves. 1667 // Context managers manage folders and contexts themselves.
1666 } 1668 }
1667 1669
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
1780 /** 1782 /**
1781 * The [PerformanceTag] for time spent in server request handlers. 1783 * The [PerformanceTag] for time spent in server request handlers.
1782 */ 1784 */
1783 static PerformanceTag serverRequests = new PerformanceTag('serverRequests'); 1785 static PerformanceTag serverRequests = new PerformanceTag('serverRequests');
1784 1786
1785 /** 1787 /**
1786 * The [PerformanceTag] for time spent in split store microtasks. 1788 * The [PerformanceTag] for time spent in split store microtasks.
1787 */ 1789 */
1788 static PerformanceTag splitStore = new PerformanceTag('splitStore'); 1790 static PerformanceTag splitStore = new PerformanceTag('splitStore');
1789 } 1791 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analysis_server/test/context_manager_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698