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

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

Issue 2260593003: Allow file resolver provider to return null, just like package resolver provider (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 4 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 | 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) 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:io' as io; 10 import 'dart:io' as io;
(...skipping 1695 matching lines...) Expand 10 before | Expand all | Expand 10 after
1706 embedderSdk.analysisOptions = options; 1706 embedderSdk.analysisOptions = options;
1707 // TODO(brianwilkerson) Enable summary use after we have decided where 1707 // TODO(brianwilkerson) Enable summary use after we have decided where
1708 // summary files for embedder files will live. 1708 // summary files for embedder files will live.
1709 embedderSdk.useSummary = false; 1709 embedderSdk.useSummary = false;
1710 return embedderSdk; 1710 return embedderSdk;
1711 }); 1711 });
1712 resolvers.add(new DartUriResolver(dartSdk)); 1712 resolvers.add(new DartUriResolver(dartSdk));
1713 } 1713 }
1714 1714
1715 resolvers.addAll(packageUriResolvers); 1715 resolvers.addAll(packageUriResolvers);
1716 if (context.fileResolverProvider == null) { 1716 UriResolver fileResolver;
1717 resolvers.add(new ResourceUriResolver(resourceProvider)); 1717 if (context.fileResolverProvider != null) {
1718 } else { 1718 fileResolver = context.fileResolverProvider(folder);
1719 resolvers.add(context.fileResolverProvider(folder));
1720 } 1719 }
1720 resolvers.add(fileResolver ?? new ResourceUriResolver(resourceProvider));
1721 return new SourceFactory(resolvers, disposition.packages); 1721 return new SourceFactory(resolvers, disposition.packages);
1722 } 1722 }
1723 } 1723 }
1724 1724
1725 /** 1725 /**
1726 * A class used by [AnalysisServer] to record performance information 1726 * A class used by [AnalysisServer] to record performance information
1727 * such as request latency. 1727 * such as request latency.
1728 */ 1728 */
1729 class ServerPerformance { 1729 class ServerPerformance {
1730 /** 1730 /**
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
1816 /** 1816 /**
1817 * The [PerformanceTag] for time spent in server request handlers. 1817 * The [PerformanceTag] for time spent in server request handlers.
1818 */ 1818 */
1819 static PerformanceTag serverRequests = new PerformanceTag('serverRequests'); 1819 static PerformanceTag serverRequests = new PerformanceTag('serverRequests');
1820 1820
1821 /** 1821 /**
1822 * The [PerformanceTag] for time spent in split store microtasks. 1822 * The [PerformanceTag] for time spent in split store microtasks.
1823 */ 1823 */
1824 static PerformanceTag splitStore = new PerformanceTag('splitStore'); 1824 static PerformanceTag splitStore = new PerformanceTag('splitStore');
1825 } 1825 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698