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

Side by Side Diff: pkg/analysis_server/lib/src/analysis_server.dart

Issue 2009303002: Embedder support refactoring (phase 1). (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 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
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' hide Resource; 9 import 'dart:core' hide Resource;
10 import 'dart:math' show max; 10 import 'dart:math' show max;
(...skipping 1621 matching lines...) Expand 10 before | Expand all | Expand 10 after
1632 ContextManager contextManager = analysisServer.contextManager; 1632 ContextManager contextManager = analysisServer.contextManager;
1633 if (contextManager is ContextManagerImpl) { 1633 if (contextManager is ContextManagerImpl) {
1634 EmbeddedResolverProvider resolverProvider = 1634 EmbeddedResolverProvider resolverProvider =
1635 contextManager.embeddedUriResolverProvider; 1635 contextManager.embeddedUriResolverProvider;
1636 if (resolverProvider != null) { 1636 if (resolverProvider != null) {
1637 embedderUriResolver = resolverProvider(folder); 1637 embedderUriResolver = resolverProvider(folder);
1638 } 1638 }
1639 } 1639 }
1640 1640
1641 // If no embedded URI resolver was provided, defer to a locator-backed one. 1641 // If no embedded URI resolver was provided, defer to a locator-backed one.
1642 embedderUriResolver ??= 1642 embedderUriResolver ??= new EmbedderUriResolver(
1643 new EmbedderUriResolver(context.embedderYamlLocator.embedderYamls); 1643 new EmbedderSdk(context.embedderYamlLocator.embedderYamls));
1644 if (embedderUriResolver.length == 0) { 1644 if (embedderUriResolver.length == 0) {
1645 // The embedder uri resolver has no mappings. Use the default Dart SDK 1645 // The embedder uri resolver has no mappings. Use the default Dart SDK
1646 // uri resolver. 1646 // uri resolver.
1647 resolvers.add(new DartUriResolver( 1647 resolvers.add(new DartUriResolver(
1648 analysisServer.sdkManager.getSdkForOptions(options))); 1648 analysisServer.sdkManager.getSdkForOptions(options)));
1649 } else { 1649 } else {
1650 // The embedder uri resolver has mappings, use it instead of the default 1650 // The embedder uri resolver has mappings, use it instead of the default
1651 // Dart SDK uri resolver. 1651 // Dart SDK uri resolver.
1652 resolvers.add(embedderUriResolver); 1652 resolvers.add(embedderUriResolver);
1653 } 1653 }
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
1765 /** 1765 /**
1766 * The [PerformanceTag] for time spent in server request handlers. 1766 * The [PerformanceTag] for time spent in server request handlers.
1767 */ 1767 */
1768 static PerformanceTag serverRequests = new PerformanceTag('serverRequests'); 1768 static PerformanceTag serverRequests = new PerformanceTag('serverRequests');
1769 1769
1770 /** 1770 /**
1771 * The [PerformanceTag] for time spent in split store microtasks. 1771 * The [PerformanceTag] for time spent in split store microtasks.
1772 */ 1772 */
1773 static PerformanceTag splitStore = new PerformanceTag('splitStore'); 1773 static PerformanceTag splitStore = new PerformanceTag('splitStore');
1774 } 1774 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analysis_server/lib/src/context_manager.dart » ('j') | pkg/analyzer/test/source/embedder_test.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698