handleAnalysisHandleWatchEvents method
Future<AnalysisHandleWatchEventsResult>
handleAnalysisHandleWatchEvents(
- AnalysisHandleWatchEventsParams parameters
Handle an 'analysis.handleWatchEvents' request.
Throw a RequestFailure if the request could not be handled.
Implementation
Future<AnalysisHandleWatchEventsResult> handleAnalysisHandleWatchEvents(
AnalysisHandleWatchEventsParams parameters) async {
for (var event in parameters.events) {
switch (event.type) {
case WatchEventType.ADD:
// TODO(brianwilkerson): Handle the event.
break;
case WatchEventType.MODIFY:
await contentChanged([event.path]);
break;
case WatchEventType.REMOVE:
// TODO(brianwilkerson): Handle the event.
break;
}
}
return AnalysisHandleWatchEventsResult();
}