8178cb602e
and narrow the SDK version supported by dartfix Change-Id: I63317a3a89d68d74815f5c192970f71bfbc422d4 Reviewed-on: https://dart-review.googlesource.com/c/83720 Reviewed-by: Brian Wilkerson <brianwilkerson@google.com> Commit-Queue: Dan Rubel <danrubel@google.com>
32 lines
1.1 KiB
Dart
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 ??= new Completer<void>();
|
|
return _analysisComplete.future;
|
|
}
|
|
}
|