Files
sdk/pkg/dartfix/lib/handler/analysis_complete_handler.dart
T
Nicholas Shahan d992f55094 [dartfix] Bump pedantic dep to v1.8.0 and cleanup lint violations
This version added three new lints:
* prefer_iterable_whereType
* unnecessary_const
* unnecessary_new

Change-Id: I99b5f3df86a0243091699cd2f3e1d38b5c5a9216
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/108381
Reviewed-by: Dan Rubel <danrubel@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2019-07-09 16:25:19 +00:00

32 lines
1.1 KiB
Dart

// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
//
// This file has been automatically generated. Please do not edit it manually.
// To regenerate the file, use the script
// "pkg/analysis_server/tool/spec/generate_files".
import 'dart:async';
import 'package:analysis_server_client/handler/notification_handler.dart';
import 'package:analysis_server_client/protocol.dart';
/// [AnalysisCompleteHandler] listens to analysis server notifications
/// and detects when analysis has finished.
mixin AnalysisCompleteHandler on NotificationHandler {
Completer<void> _analysisComplete;
@override
void onServerStatus(ServerStatusParams params) {
if (params.analysis != null && !params.analysis.isAnalyzing) {
_analysisComplete?.complete();
_analysisComplete = null;
}
}
Future<void> analysisComplete() {
_analysisComplete ??= Completer<void>();
return _analysisComplete.future;
}
}