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

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

Issue 2713513007: Deprecate execution.setSubscriptions. (Closed)
Patch Set: Merge branch 'master' into deprecate_set_subscriptions Created 3 years, 10 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_execution.dart
diff --git a/pkg/analysis_server/lib/src/domain_execution.dart b/pkg/analysis_server/lib/src/domain_execution.dart
index 29449c5b3fa450b6132c75885b2765fa63148135..dfdd2bd9c4457b5dd43fa57f1d87657e172f3f3f 100644
--- a/pkg/analysis_server/lib/src/domain_execution.dart
+++ b/pkg/analysis_server/lib/src/domain_execution.dart
@@ -159,20 +159,25 @@ class ExecutionDomainHandler implements RequestHandler {
* Implement the 'execution.setSubscriptions' request.
*/
Response setSubscriptions(Request request) {
- List<ExecutionService> subscriptions =
- new ExecutionSetSubscriptionsParams.fromRequest(request).subscriptions;
- if (subscriptions.contains(ExecutionService.LAUNCH_DATA)) {
- if (onFileAnalyzed == null) {
- onFileAnalyzed = server.onFileAnalyzed.listen(_fileAnalyzed);
- _reportCurrentFileStatus();
- }
+ if (server.options.enableNewAnalysisDriver) {
+ // Under the analysis driver, setSubscriptions() becomes a no-op.
+ return new ExecutionSetSubscriptionsResult().toResponse(request.id);
} else {
- if (onFileAnalyzed != null) {
- onFileAnalyzed.cancel();
- onFileAnalyzed = null;
+ List<ExecutionService> subscriptions =
+ new ExecutionSetSubscriptionsParams.fromRequest(request).subscriptions;
+ if (subscriptions.contains(ExecutionService.LAUNCH_DATA)) {
+ if (onFileAnalyzed == null) {
+ onFileAnalyzed = server.onFileAnalyzed.listen(_fileAnalyzed);
+ _reportCurrentFileStatus();
+ }
+ } else {
+ if (onFileAnalyzed != null) {
+ onFileAnalyzed.cancel();
+ onFileAnalyzed = null;
+ }
}
+ return new ExecutionSetSubscriptionsResult().toResponse(request.id);
}
- return new ExecutionSetSubscriptionsResult().toResponse(request.id);
}
void _fileAnalyzed(ChangeNotice notice) {
« no previous file with comments | « pkg/analysis_server/lib/plugin/protocol/generated_protocol.dart ('k') | pkg/analysis_server/test/domain_execution_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698