DAS: Correct comment references in services/
Change-Id: I4d896e4e917311513a725460f95ca5561bc80ec8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/403282
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
diff --git a/pkg/analysis_server/lib/src/legacy_analysis_server.dart b/pkg/analysis_server/lib/src/legacy_analysis_server.dart
index 51fcf29..a2a397f 100644
--- a/pkg/analysis_server/lib/src/legacy_analysis_server.dart
+++ b/pkg/analysis_server/lib/src/legacy_analysis_server.dart
@@ -620,7 +620,7 @@
);
}
- /// Handle a [request] that was read from the communication channel.
+ /// Handle a [requestOrResponse] that was read from the communication channel.
void handleRequestOrResponse(RequestOrResponse requestOrResponse) {
if (requestOrResponse is Request) {
var cancellationToken = CancelableToken();
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 fe845e4..e53e875 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
@@ -17,7 +17,6 @@
import 'package:analysis_server_plugin/edit/fix/fix.dart';
import 'package:analysis_server_plugin/src/correction/dart_change_workspace.dart';
import 'package:analysis_server_plugin/src/correction/fix_generators.dart';
-import 'package:analysis_server_plugin/src/correction/fix_processor.dart';
import 'package:analyzer/dart/analysis/analysis_context.dart';
import 'package:analyzer/dart/analysis/analysis_options.dart';
import 'package:analyzer/dart/analysis/results.dart';
@@ -80,9 +79,10 @@
];
/// A map from an error code to a list of generators used to create multiple
- /// correction producers used to build fixes for those diagnostics. The
- /// generators used for lint rules are in the
- /// [FixProcessor.lintMultiProducerMap].
+ /// correction producers used to build fixes for those diagnostics.
+ ///
+ /// The generators used for lint rules are in
+ /// `_RegisteredFixGenerators.lintMultiProducers`.
///
/// The expectation is that only one of the correction producers will produce
/// a change for a given fix. If more than one change is produced the result
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/add_diagnostic_property_reference.dart b/pkg/analysis_server/lib/src/services/correction/dart/add_diagnostic_property_reference.dart
index ed74760..8b303ad 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/add_diagnostic_property_reference.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/add_diagnostic_property_reference.dart
@@ -215,8 +215,8 @@
}
}
- /// Fixes all instances of the [LintNames.diagnostic_describe_all_properties] in the given
- /// [declaration].
+ /// Fixes all instances of the [LintNames.diagnostic_describe_all_properties]
+ /// in the given [declaration].
Future<void> _fixAllDiagnosticPropertyReferences(
ChangeBuilder builder,
ClassDeclaration declaration,
@@ -366,7 +366,8 @@
}
/// Returns a list of all the [AnalysisError]s of type
- /// [DiagnosticDescribeAllProperties.code] fpr the given [declaration].
+ /// [LinterLintCode.diagnostic_describe_all_properties] for the given
+ /// [declaration].
List<AnalysisError> _getAllDiagnosticsInClass(ClassDeclaration declaration) {
var propertyErrors = <AnalysisError>[];
var startOffset = declaration.offset;
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/remove_comparison.dart b/pkg/analysis_server/lib/src/services/correction/dart/remove_comparison.dart
index e219b7e..a9d7ec4 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/remove_comparison.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/remove_comparison.dart
@@ -188,8 +188,8 @@
}
}
- /// Use the [builder] to add an edit to delete the operator and given
- /// [operand] from the [binary] expression.
+ /// Adds an edit with [builder] to delete the operator and [node] from the
+ /// [binary] expression (where [node] is assumed to be one of the operands).
Future<void> _removeOperatorAndOperand(
ChangeBuilder builder,
BinaryExpression binary,
diff --git a/pkg/analysis_server/lib/src/services/correction/fix/data_driven/transform_set_parser.dart b/pkg/analysis_server/lib/src/services/correction/fix/data_driven/transform_set_parser.dart
index fa4b517..0b6dc567 100644
--- a/pkg/analysis_server/lib/src/services/correction/fix/data_driven/transform_set_parser.dart
+++ b/pkg/analysis_server/lib/src/services/correction/fix/data_driven/transform_set_parser.dart
@@ -174,8 +174,8 @@
return _translateTransformSet(node);
}
- /// Convert the given [template] into a list of components. Variable
- /// references in the template are looked up in the map of [generators].
+ /// Converts the given [template] into a list of components. Variable
+ /// references in the template are looked up in [variableScope].
List<TemplateComponent> _extractTemplateComponents(
String template,
VariableScope variableScope,
@@ -301,8 +301,8 @@
return null;
}
- /// Report that the value represented by the [node] does not have the
- /// [expectedType], using the [context] to get the key to use in the message.
+ /// Reports that the value represented by the [node] is not one of the
+ /// [allowedValues], using the [context] to get the key to use in the message.
Null _reportInvalidValueOneOf(
YamlNode node,
ErrorContext context,
diff --git a/pkg/analysis_server/lib/src/services/correction/fix/pubspec/fix_generator.dart b/pkg/analysis_server/lib/src/services/correction/fix/pubspec/fix_generator.dart
index f0d78b1..597fcba 100644
--- a/pkg/analysis_server/lib/src/services/correction/fix/pubspec/fix_generator.dart
+++ b/pkg/analysis_server/lib/src/services/correction/fix/pubspec/fix_generator.dart
@@ -142,9 +142,8 @@
return fixes;
}
- /// Add a fix whose edits were built by the [builder] that has the given
- /// [kind]. If [args] are provided, they will be used to fill in the message
- /// for the fix.
+ /// Adds a fix whose edits were built by the [builder] that has the given
+ /// [kind].
void _addFixFromBuilder(ChangeBuilder builder, FixKind kind) {
var change = builder.sourceChange;
if (change.edits.isEmpty) {
diff --git a/pkg/analysis_server/lib/src/services/correction/namespace.dart b/pkg/analysis_server/lib/src/services/correction/namespace.dart
index 6d0cf3e..64868b4 100644
--- a/pkg/analysis_server/lib/src/services/correction/namespace.dart
+++ b/pkg/analysis_server/lib/src/services/correction/namespace.dart
@@ -207,7 +207,7 @@
return _getImportElement(libraryElement, prefix, usedElement);
}
-/// Returns the [LibraryImport2] that is referenced by [prefixNode] with a
+/// Returns the [LibraryImport] that is referenced by [prefixNode] with a
/// [PrefixElement], maybe `null`.
LibraryImport? _getImportElementInfo2(SimpleIdentifier prefixNode) {
// prepare environment
diff --git a/pkg/analysis_server/lib/src/services/correction/organize_imports.dart b/pkg/analysis_server/lib/src/services/correction/organize_imports.dart
index aa8d238..b1bd666 100644
--- a/pkg/analysis_server/lib/src/services/correction/organize_imports.dart
+++ b/pkg/analysis_server/lib/src/services/correction/organize_imports.dart
@@ -18,8 +18,7 @@
import 'package:analyzer_plugin/src/utilities/directive_sort.dart';
import 'package:meta/meta_meta.dart';
-/// Organizes imports (and other directives) in the [unit], using sorting
-/// rules from [DirectiveSorter].
+/// Organizes imports (and other directives) in the [unit].
class ImportOrganizer {
final String initialCode;
diff --git a/pkg/analysis_server/lib/src/services/correction/sort_members.dart b/pkg/analysis_server/lib/src/services/correction/sort_members.dart
index cdf92f5..7766005 100644
--- a/pkg/analysis_server/lib/src/services/correction/sort_members.dart
+++ b/pkg/analysis_server/lib/src/services/correction/sort_members.dart
@@ -107,7 +107,7 @@
}
}
- /// Sorts all members of the given [classDeclaration].
+ /// Sorts the [membersToSort].
void _sortClassMembers(List<ClassMember> membersToSort) {
var members = <_MemberInfo>[];
for (var member in membersToSort) {
diff --git a/pkg/analysis_server/lib/src/services/correction/status.dart b/pkg/analysis_server/lib/src/services/correction/status.dart
index c86f120..18b94d0 100644
--- a/pkg/analysis_server/lib/src/services/correction/status.dart
+++ b/pkg/analysis_server/lib/src/services/correction/status.dart
@@ -7,7 +7,7 @@
/// An outcome of a condition checking operation.
class RefactoringStatus {
/// The current severity of this [RefactoringStatus] - the maximum of the
- /// severities of its [entries].
+ /// severities of its [problems].
RefactoringProblemSeverity? _severity;
/// A list of [RefactoringProblem]s.
diff --git a/pkg/analysis_server/lib/src/services/correction/util.dart b/pkg/analysis_server/lib/src/services/correction/util.dart
index 2d50d17..886d4fd 100644
--- a/pkg/analysis_server/lib/src/services/correction/util.dart
+++ b/pkg/analysis_server/lib/src/services/correction/util.dart
@@ -329,8 +329,8 @@
return collector.isDeclared;
}
-/// Checks if given [DartNode] is the left hand side of an assignment, or a
-/// declaration of a variable.
+/// Returns whether the given [node] is the left hand side of an assignment, or
+/// a declaration of a variable.
bool isLeftHandOfAssignment(SimpleIdentifier node) {
if (node.inSetterContext()) {
return true;
diff --git a/pkg/analysis_server/lib/src/services/pub/pub_package_service.dart b/pkg/analysis_server/lib/src/services/pub/pub_package_service.dart
index 3385c71..d8c2299 100644
--- a/pkg/analysis_server/lib/src/services/pub/pub_package_service.dart
+++ b/pkg/analysis_server/lib/src/services/pub/pub_package_service.dart
@@ -2,6 +2,9 @@
// 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.
+/// @docImport 'package:analyzer/file_system/physical_file_system.dart';
+library;
+
import 'dart:async';
import 'dart:convert';