handleAnalysisSetSubscriptions method

Future<AnalysisSetSubscriptionsResult> handleAnalysisSetSubscriptions(
  1. AnalysisSetSubscriptionsParams parameters
)

Handle an 'analysis.setSubscriptions' request. Most subclasses should not override this method, but should instead use the subscriptionManager to access the list of subscriptions for any given file.

Throw a RequestFailure if the request could not be handled.

Implementation

Future<AnalysisSetSubscriptionsResult> handleAnalysisSetSubscriptions(
    AnalysisSetSubscriptionsParams parameters) async {
  var subscriptions = parameters.subscriptions;
  var newSubscriptions = subscriptionManager.setSubscriptions(subscriptions);
  sendNotificationsForSubscriptions(newSubscriptions);
  return AnalysisSetSubscriptionsResult();
}