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>
This commit is contained in:
Sam Rawlins
2025-01-07 08:03:49 -08:00
committed by Commit Queue
parent 7e94becfe4
commit 1830689c80
12 changed files with 26 additions and 24 deletions
@@ -620,7 +620,7 @@ class LegacyAnalysisServer extends AnalysisServer {
);
}
/// 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();
@@ -17,7 +17,6 @@ import 'package:analysis_server_plugin/edit/fix/dart_fix_context.dart';
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 @@ class BulkFixProcessor {
];
/// 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
@@ -215,8 +215,8 @@ class AddDiagnosticPropertyReference extends ResolvedCorrectionProducer {
}
}
/// 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 @@ class AddDiagnosticPropertyReference extends ResolvedCorrectionProducer {
}
/// 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;
@@ -188,8 +188,8 @@ class RemoveComparison extends ResolvedCorrectionProducer {
}
}
/// 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,
@@ -174,8 +174,8 @@ class TransformSetParser {
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 @@ class TransformSetParser {
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,
@@ -142,9 +142,8 @@ class PubspecFixGenerator {
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) {
@@ -207,7 +207,7 @@ LibraryImportElement? _getImportElementInfo(SimpleIdentifier prefixNode) {
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
@@ -18,8 +18,7 @@ import 'package:analyzer_plugin/protocol/protocol_common.dart'
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;
@@ -107,7 +107,7 @@ class MemberSorter {
}
}
/// Sorts all members of the given [classDeclaration].
/// Sorts the [membersToSort].
void _sortClassMembers(List<ClassMember> membersToSort) {
var members = <_MemberInfo>[];
for (var member in membersToSort) {
@@ -7,7 +7,7 @@ import 'package:analyzer_plugin/protocol/protocol_common.dart';
/// 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.
@@ -329,8 +329,8 @@ bool isDeclaredIn(AstNode root, String name) {
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;
@@ -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';