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

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

Issue 2949103003: Remove more dead code from analysis server (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
Index: pkg/analysis_server/lib/src/domain_analysis.dart
diff --git a/pkg/analysis_server/lib/src/domain_analysis.dart b/pkg/analysis_server/lib/src/domain_analysis.dart
index 2351ef6d4ab1580ea7e377e8d77371fe8f25b73d..a84e05854bb802db03757108dd0a2dd705e2e752 100644
--- a/pkg/analysis_server/lib/src/domain_analysis.dart
+++ b/pkg/analysis_server/lib/src/domain_analysis.dart
@@ -20,7 +20,6 @@ import 'package:analysis_server/src/plugin/request_converter.dart';
import 'package:analysis_server/src/plugin/result_merger.dart';
import 'package:analysis_server/src/protocol/protocol_internal.dart';
import 'package:analysis_server/src/protocol_server.dart';
-import 'package:analysis_server/src/services/dependencies/library_dependencies.dart';
import 'package:analyzer/dart/ast/ast.dart';
import 'package:analyzer/error/error.dart' as engine;
import 'package:analyzer/exception/exception.dart';
@@ -103,22 +102,26 @@ class AnalysisDomainHandler extends AbstractRequestHandler {
new AnalysisGetHoverResult(hovers).toResponse(request.id));
}
- /// Implement the `analysis.getLibraryDependencies` request.
+ /**
+ * Implement the `analysis.getLibraryDependencies` request.
+ */
Response getLibraryDependencies(Request request) {
- server.onAnalysisComplete.then((_) {
- LibraryDependencyCollector collector =
- new LibraryDependencyCollector(server.analysisContexts);
- Set<String> libraries = collector.collectLibraryDependencies();
- Map<String, Map<String, List<String>>> packageMap =
- collector.calculatePackageMap(server.folderMap);
- server.sendResponse(new AnalysisGetLibraryDependenciesResult(
- libraries.toList(growable: false), packageMap)
- .toResponse(request.id));
- }).catchError((error, st) {
- server.sendResponse(new Response.serverError(request, error, st));
- });
- // delay response
- return Response.DELAYED_RESPONSE;
+ return new Response.unsupportedFeature(request.id,
+ 'Please contact the Dart analyzer team if you need this request.');
+// server.onAnalysisComplete.then((_) {
+// LibraryDependencyCollector collector =
+// new LibraryDependencyCollector(server.analysisContexts);
+// Set<String> libraries = collector.collectLibraryDependencies();
+// Map<String, Map<String, List<String>>> packageMap =
+// collector.calculatePackageMap(server.folderMap);
+// server.sendResponse(new AnalysisGetLibraryDependenciesResult(
+// libraries.toList(growable: false), packageMap)
+// .toResponse(request.id));
+// }).catchError((error, st) {
+// server.sendResponse(new Response.serverError(request, error, st));
+// });
+// // delay response
+// return Response.DELAYED_RESPONSE;
}
/**
@@ -429,20 +432,12 @@ class AnalysisDomainImpl implements AnalysisDomain {
<ResultDescriptor, StreamController<engine.ResultChangedEvent>>{};
AnalysisDomainImpl(this.server) {
- server.onContextsChanged.listen((ContextsChangedEvent event) {
- event.added.forEach(_subscribeForContext);
- });
- }
-
- @override
- Stream<engine.ResultChangedEvent> onResultChanged(
- ResultDescriptor descriptor) {
- Stream<engine.ResultChangedEvent> stream =
- controllers.putIfAbsent(descriptor, () {
- return new StreamController<engine.ResultChangedEvent>.broadcast();
- }).stream;
- server.analysisContexts.forEach(_subscribeForContext);
- return stream;
+ // TODO(brianwilkerson) The onContextsChanged stream is no longer written to.
+ // Figure out whether this code still needs to be here and convert it to use
+ // the analysis driver if it does.
+// server.onContextsChanged.listen((ContextsChangedEvent event) {
+// event.added.forEach(_subscribeForContext);
+// });
}
@override
« no previous file with comments | « pkg/analysis_server/lib/src/context_manager.dart ('k') | pkg/analysis_server/lib/src/operation/operation_analysis.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698