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

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

Issue 3001413002: Remove uses of the old plugin model from the analysis server (Closed)
Patch Set: Created 3 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 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 ba5c7031143f179b9a326b65dcfa9e0bb077ee88..fc441702d6bfa6eb925eb38ec0c03c8f69d6ca83 100644
--- a/pkg/analysis_server/lib/src/domain_analysis.dart
+++ b/pkg/analysis_server/lib/src/domain_analysis.dart
@@ -5,7 +5,6 @@
import 'dart:async';
import 'dart:core';
-import 'package:analysis_server/plugin/analysis/analysis_domain.dart';
import 'package:analysis_server/protocol/protocol_constants.dart';
import 'package:analysis_server/src/analysis_server.dart';
import 'package:analysis_server/src/computer/computer_hover.dart';
@@ -20,12 +19,10 @@ import 'package:analysis_server/src/protocol/protocol_internal.dart';
import 'package:analysis_server/src/protocol_server.dart';
import 'package:analyzer/dart/ast/ast.dart';
import 'package:analyzer/error/error.dart' as engine;
-import 'package:analyzer/exception/exception.dart';
import 'package:analyzer/file_system/file_system.dart';
import 'package:analyzer/src/dart/analysis/driver.dart';
import 'package:analyzer/src/generated/engine.dart' as engine;
import 'package:analyzer/src/generated/source.dart';
-import 'package:analyzer/task/model.dart' show ResultDescriptor;
import 'package:analyzer_plugin/protocol/protocol.dart' as plugin;
import 'package:analyzer_plugin/protocol/protocol_common.dart';
import 'package:analyzer_plugin/protocol/protocol_constants.dart' as plugin;
@@ -39,9 +36,7 @@ class AnalysisDomainHandler extends AbstractRequestHandler {
/**
* Initialize a newly created handler to handle requests for the given [server].
*/
- AnalysisDomainHandler(AnalysisServer server) : super(server) {
- _callAnalysisDomainReceivers();
- }
+ AnalysisDomainHandler(AnalysisServer server) : super(server);
/**
* Implement the `analysis.getErrors` request.
@@ -434,41 +429,4 @@ class AnalysisDomainHandler extends AbstractRequestHandler {
server.updateOptions(updaters);
return new AnalysisUpdateOptionsResult().toResponse(request.id);
}
-
- /**
- * Call all the registered [SetAnalysisDomain] functions.
- */
- void _callAnalysisDomainReceivers() {
- AnalysisDomain analysisDomain = new AnalysisDomainImpl(server);
- for (SetAnalysisDomain function
- in server.serverPlugin.setAnalysisDomainFunctions) {
- try {
- function(analysisDomain);
- } catch (exception, stackTrace) {
- engine.AnalysisEngine.instance.logger.logError(
- 'Exception from analysis domain receiver: ${function.runtimeType}',
- new CaughtException(exception, stackTrace));
- }
- }
- }
-}
-
-/**
- * An implementation of [AnalysisDomain] for [AnalysisServer].
- */
-class AnalysisDomainImpl implements AnalysisDomain {
- final AnalysisServer server;
-
- final Map<ResultDescriptor, StreamController<engine.ResultChangedEvent>>
- controllers =
- <ResultDescriptor, StreamController<engine.ResultChangedEvent>>{};
-
- AnalysisDomainImpl(this.server) {
- // 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);
-// });
- }
}
« no previous file with comments | « pkg/analysis_server/lib/src/analysis_server.dart ('k') | pkg/analysis_server/lib/src/domain_completion.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698