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

Unified Diff: pkg/analysis_server/lib/src/analysis_server.dart

Issue 346963006: Index Dart/HTML units after analysis. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fixes for review comments Created 6 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | pkg/analysis_server/lib/src/index/index.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/lib/src/analysis_server.dart
diff --git a/pkg/analysis_server/lib/src/analysis_server.dart b/pkg/analysis_server/lib/src/analysis_server.dart
index c29aa8a91f64a38f0b619a4abd10117242411ce8..3ddb9f7e7c7234fee6320706e610ce16b437592d 100644
--- a/pkg/analysis_server/lib/src/analysis_server.dart
+++ b/pkg/analysis_server/lib/src/analysis_server.dart
@@ -27,6 +27,7 @@ import 'package:analyzer/src/generated/sdk.dart';
import 'package:analyzer/src/generated/sdk_io.dart';
import 'package:analyzer/src/generated/source_io.dart';
import 'package:analyzer/src/generated/java_engine.dart';
+import 'package:analyzer/src/generated/index.dart';
/**
@@ -83,6 +84,11 @@ class AnalysisServer {
final ServerCommunicationChannel channel;
/**
+ * The [Index] for this server.
+ */
+ final Index index;
+
+ /**
* [ContextDirectoryManager] which handles the mapping from analysis roots
* to context directories.
*/
@@ -155,7 +161,7 @@ class AnalysisServer {
* running a full analysis server.
*/
AnalysisServer(this.channel, ResourceProvider resourceProvider,
- this.packageMapProvider, {this.rethrowExceptions: true}) {
+ this.packageMapProvider, this.index, {this.rethrowExceptions: true}) {
operationQueue = new ServerOperationQueue(this);
contextDirectoryManager = new AnalysisServerContextDirectoryManager(this, resourceProvider);
AnalysisEngine.instance.logger = new AnalysisLogger();
@@ -263,6 +269,7 @@ class AnalysisServer {
* The socket from which requests are being read has been closed.
*/
void done() {
+ index.stop();
running = false;
}
@@ -594,7 +601,7 @@ class ContextDirectory {
_context = AnalysisEngine.instance.createAnalysisContext();
// TODO(scheglov) replace FileUriResolver with an Resource based resolver
List<UriResolver> resolvers = <UriResolver>[new DartUriResolver(sdk),
- new FileUriResolver(),
+ new ResourceUriResolver(_resourceProvider),
];
if (packageMap != null) {
resolvers.add(new PackageMapUriResolver(_resourceProvider, packageMap));
« no previous file with comments | « no previous file | pkg/analysis_server/lib/src/index/index.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698