mirror of
https://github.com/dart-lang/sdk
synced 2024-09-15 23:29:47 +00:00
analyzer: Remove unused CancelCorrectionException
The comment makes it sound like a worthy exception type, but it is never thrown or even instantiated. Change-Id: Icc946250ed730a3eb61cdc39eed3dc68206e9663 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/348083 Commit-Queue: Samuel Rawlins <srawlins@google.com> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
This commit is contained in:
parent
a6e8759888
commit
27ba055f1f
|
@ -229,7 +229,6 @@ import 'package:analysis_server/src/services/correction/dart/wrap_in_text.dart';
|
|||
import 'package:analysis_server/src/services/correction/dart/wrap_in_unawaited.dart';
|
||||
import 'package:analysis_server/src/services/correction/fix.dart';
|
||||
import 'package:analysis_server/src/services/correction/fix_processor.dart';
|
||||
import 'package:analysis_server/src/services/correction/util.dart';
|
||||
import 'package:analysis_server/src/services/linter/lint_names.dart';
|
||||
import 'package:analyzer/error/error.dart';
|
||||
import 'package:analyzer/src/dart/error/ffi_code.g.dart';
|
||||
|
@ -1589,16 +1588,10 @@ void registerBuiltInProducers() {
|
|||
class DartFixContributor implements FixContributor {
|
||||
@override
|
||||
Future<List<Fix>> computeFixes(DartFixContext context) async {
|
||||
try {
|
||||
var processor = FixProcessor(context);
|
||||
var fixes = await processor.compute();
|
||||
var fixInFileProcessor = FixInFileProcessor(context);
|
||||
var fixInFileFixes = await fixInFileProcessor.compute();
|
||||
fixes.addAll(fixInFileFixes);
|
||||
return fixes;
|
||||
} on CancelCorrectionException {
|
||||
return const <Fix>[];
|
||||
}
|
||||
return [
|
||||
...await FixProcessor(context).compute(),
|
||||
...await FixInFileProcessor(context).compute(),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -539,16 +539,6 @@ bool _allListsIdentical(List<List<Object>> lists, int position) {
|
|||
return true;
|
||||
}
|
||||
|
||||
/// This exception is thrown to cancel the current correction operation,
|
||||
/// such as quick assist or quick fix because an inconsistency was detected.
|
||||
/// These inconsistencies may happen as a part of normal workflow, e.g. because
|
||||
/// a resource was deleted, or an analysis result was invalidated.
|
||||
class CancelCorrectionException {
|
||||
final Object? exception;
|
||||
|
||||
CancelCorrectionException({this.exception});
|
||||
}
|
||||
|
||||
class CorrectionUtils {
|
||||
final CompilationUnit unit;
|
||||
final LibraryElement? _library;
|
||||
|
|
Loading…
Reference in a new issue