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

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

Issue 2963773003: Remove the old index. (Closed)
Patch Set: Created 3 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/search/search_domain.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 d23fe8fa45a4ae9cbecb6295ae9f7f51069851ea..06d88ee4f20734114f70f4ec006cf61b2cd4dbd7 100644
--- a/pkg/analysis_server/lib/src/analysis_server.dart
+++ b/pkg/analysis_server/lib/src/analysis_server.dart
@@ -31,7 +31,6 @@ import 'package:analysis_server/src/plugin/server_plugin.dart';
import 'package:analysis_server/src/protocol_server.dart' as server;
import 'package:analysis_server/src/server/diagnostic_server.dart';
import 'package:analysis_server/src/services/correction/namespace.dart';
-import 'package:analysis_server/src/services/index/index.dart';
import 'package:analysis_server/src/services/search/search_engine.dart';
import 'package:analysis_server/src/services/search/search_engine_internal.dart';
import 'package:analysis_server/src/utilities/null_string_sink.dart';
@@ -130,11 +129,6 @@ class AnalysisServer {
final ResourceProvider resourceProvider;
/**
- * The [Index] for this server, may be `null` if indexing is disabled.
- */
- final Index index;
-
- /**
* The [SearchEngine] for this server, may be `null` if indexing is disabled.
*/
SearchEngine searchEngine;
@@ -344,7 +338,6 @@ class AnalysisServer {
this.channel,
this.resourceProvider,
PubPackageMapProvider packageMapProvider,
- this.index,
this.serverPlugin,
this.options,
this.sdkManager,
@@ -419,7 +412,6 @@ class AnalysisServer {
_performance = performanceAfterStartup;
});
});
- _setupIndexInvalidation();
searchEngine = new SearchEngineImpl(driverMap.values);
Notification notification = new ServerConnectedParams(VERSION, io.pid,
sessionId: instrumentationService.sessionId)
@@ -507,7 +499,6 @@ class AnalysisServer {
* The socket from which requests are being read has been closed.
*/
void done() {
- index?.stop();
running = false;
}
@@ -907,9 +898,6 @@ class AnalysisServer {
void shutdown() {
running = false;
- if (index != null) {
- index.stop();
- }
// Defer closing the channel and shutting down the instrumentation server so
// that the shutdown response can be sent and logged.
new Future(() {
@@ -1045,47 +1033,6 @@ class AnalysisServer {
scheduleImplementedNotification(this, files);
}
}
-
- /**
- * Listen for context events and invalidate index.
- *
- * It is possible that this method will do more in the future, e.g. listening
- * for summary information and linking pre-indexed packages into the index,
- * but for now we only invalidate project specific index information.
- */
- void _setupIndexInvalidation() {
- if (index == null) {
- return;
- }
- // TODO(brianwilkerson) onContextsChanged never has anything written to it.
- // Figure out whether we need something like this under the new analysis
- // driver, and remove this method if not.
-// onContextsChanged.listen((ContextsChangedEvent event) {
-// for (AnalysisContext context in event.added) {
-// context
-// .onResultChanged(RESOLVED_UNIT3)
-// .listen((ResultChangedEvent event) {
-// if (event.wasComputed) {
-// Object value = event.value;
-// if (value is CompilationUnit) {
-// index.indexDeclarations(value);
-// }
-// }
-// });
-// context
-// .onResultChanged(RESOLVED_UNIT)
-// .listen((ResultChangedEvent event) {
-// if (event.wasInvalidated) {
-// LibrarySpecificUnit target = event.target;
-// index.removeUnit(event.context, target.library, target.unit);
-// }
-// });
-// }
-// for (AnalysisContext context in event.removed) {
-// index.removeContext(context);
-// }
-// });
- }
}
class AnalysisServerOptions {
« no previous file with comments | « no previous file | pkg/analysis_server/lib/src/search/search_domain.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698