[analyzer] remove `BulkFixProcessor.fixOfTypeInUnit`
Fixes #49406
Change-Id: Ib755f918f91ceca1ac4c282e18a9eab9224882e2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/250746
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
diff --git a/pkg/analysis_server/lib/src/services/correction/bulk_fix_processor.dart b/pkg/analysis_server/lib/src/services/correction/bulk_fix_processor.dart
index 276a876..372d262 100644
--- a/pkg/analysis_server/lib/src/services/correction/bulk_fix_processor.dart
+++ b/pkg/analysis_server/lib/src/services/correction/bulk_fix_processor.dart
@@ -200,37 +200,6 @@
return builder;
}
- /// Return a change builder that has been used to create all fixes for a
- /// specific diagnostic code in the given [unit].
- Future<ChangeBuilder> fixOfTypeInUnit(
- ResolvedUnitResult unit,
- String errorCode,
- ) async {
- final errorCodeLowercase = errorCode.toLowerCase();
- final errors = unit.errors.where(
- (error) => error.errorCode.name.toLowerCase() == errorCodeLowercase,
- );
-
- final analysisOptions = unit.session.analysisContext.analysisOptions;
-
- var overrideSet = _readOverrideSet(unit);
- for (var error in errors) {
- final processor = ErrorProcessor.getProcessor(analysisOptions, error);
- // Only fix errors not filtered out in analysis options.
- if (processor == null || processor.severity != null) {
- final fixContext = DartFixContextImpl(
- instrumentationService,
- workspace,
- unit,
- error,
- );
- await _fixSingleError(fixContext, unit, error, overrideSet);
- }
- }
-
- return builder;
- }
-
Future<void> _applyProducer(
CorrectionProducerContext context, CorrectionProducer producer) async {
producer.configure(context);
diff --git a/pkg/analyzer/lib/src/dart/analysis/file_state.dart b/pkg/analyzer/lib/src/dart/analysis/file_state.dart
index 1bdbc40..5120f96 100644
--- a/pkg/analyzer/lib/src/dart/analysis/file_state.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/file_state.dart
@@ -316,7 +316,9 @@
abstract class FileContent {
String get content;
+
String get contentHash;
+
bool get exists;
}
@@ -1818,8 +1820,8 @@
file._fsState._libraryNameToFiles.add(this);
}
- /// The list of files files that this library consists of, i.e. this library
- /// file itself, its [parts], and augmentations.
+ /// The list of files that this library consists of, i.e. this library file
+ /// itself, its [parts], and augmentations.
List<FileState> get files {
final files = [
file,