| // Copyright (c) 2020, 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. |
| |
| import 'package:analysis_server/lsp_protocol/protocol_generated.dart'; |
| import 'package:analysis_server/lsp_protocol/protocol_special.dart'; |
| import 'package:analysis_server/src/lsp/constants.dart'; |
| import 'package:analysis_server/src/lsp/handlers/handlers.dart'; |
| |
| class ReanalyzeHandler extends MessageHandler<void, void> { |
| ReanalyzeHandler(super.server); |
| @override |
| Method get handlesMessage => CustomMethods.reanalyze; |
| |
| @override |
| LspJsonHandler<void> get jsonHandler => NullJsonHandler; |
| |
| @override |
| Future<ErrorOr<void>> handle( |
| void _, MessageInfo message, CancellationToken token) async { |
| server.reanalyze(); |
| return success(null); |
| } |
| } |