ff75aeb6af
To support this feature: * Remove `DartAssistContextImpl` as it has no differences from `DartAssistContext`. Thus the getters `DartAssistContext` are made into fields, and all callers now call `DartAssistContext()`. * Add a top level `computeAssists` function, similar to the top-level `computeFixes` function. Change-Id: I3ef5fd9ee9430150004b29c11ab972939b85b214 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/417360 Reviewed-by: Brian Wilkerson <brianwilkerson@google.com> Reviewed-by: Phil Quitslund <pquitslund@google.com> Commit-Queue: Samuel Rawlins <srawlins@google.com>
23 lines
941 B
Dart
23 lines
941 B
Dart
// Copyright (c) 2024, 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_plugin/src/correction/fix_generators.dart';
|
|
import 'package:analyzer/error/error.dart';
|
|
import 'package:analyzer/src/lint/linter.dart';
|
|
|
|
abstract class PluginRegistry {
|
|
/// Registers this assist [generator] with the analyzer's rule registry.
|
|
void registerAssist(ProducerGenerator generator);
|
|
|
|
/// Registers this fix [generator] for the given lint [code] with the
|
|
/// analyzer's rule registry.
|
|
void registerFixForRule(LintCode code, ProducerGenerator generator);
|
|
|
|
/// Registers this [rule] with the analyzer's rule registry.
|
|
void registerLintRule(AnalysisRule rule);
|
|
|
|
/// Registers this [rule] with the analyzer's rule registry.
|
|
void registerWarningRule(AnalysisRule rule);
|
|
}
|