Skip to content

Commit fe9c469

Browse files
srawlinsCommit Queue
authored andcommitted
DAS: Correct some comment references
Change-Id: Iec84f23655298662eef0b0e44f7bb8586348833d Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/402423 Reviewed-by: Konstantin Shcheglov <[email protected]> Commit-Queue: Samuel Rawlins <[email protected]>
1 parent c02b3a4 commit fe9c469

23 files changed

+74
-66
lines changed

pkg/analysis_server/lib/src/channel/channel.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44

5+
/// @docImport 'package:analysis_server/src/analysis_server.dart';
6+
library;
7+
58
import 'dart:convert';
69

710
import 'package:analysis_server/protocol/protocol.dart';

pkg/analysis_server/lib/src/cider/fixes.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class CiderFixesComputer {
3636

3737
CiderFixesComputer(this._logger, this._fileResolver);
3838

39-
/// Compute quick fixes for errors on the line with the [offset].
39+
/// Compute quick fixes for errors on the line at [lineNumber].
4040
Future<List<CiderErrorFixes>> compute(String path, int lineNumber) async {
4141
var result = <CiderErrorFixes>[];
4242
var resolvedLibrary = await _fileResolver.resolveLibrary2(path: path);

pkg/analysis_server/lib/src/cider/rename.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ class CheckNameResponse {
335335
return FlutterWidgetRename(stateName, match, replacements);
336336
}
337337

338-
/// If the given [reference] is before an interpolated [SimpleIdentifier] in
338+
/// If the reference at [loc] is before an interpolated [SimpleIdentifier] in
339339
/// an [InterpolationExpression] without surrounding curly brackets, return
340340
/// it. Otherwise return `null`.
341341
Future<SimpleIdentifier?> _getInterpolationIdentifier(

pkg/analysis_server/lib/src/computer/computer_call_hierarchy.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import 'package:analyzer/src/dart/element/element.dart';
1515

1616
/// Returns the container for [element] that should be used in Call Hierarchy.
1717
///
18-
/// Returns `null` if none of [elements] are valid containers.
18+
/// Returns `null` if none of [element]'s ancestors are valid containers.
1919
///
2020
/// This is used to construct (and group calls by) a [CallHierarchyItem] that
2121
/// contains calls and also locate their containers for additional labelling.
@@ -316,7 +316,7 @@ class DartCallHierarchyComputer {
316316

317317
/// Finds a target for starting call hierarchy navigation at [offset].
318318
///
319-
/// If [offset] is an invocation, returns information about the [Element] it
319+
/// If [offset] is an invocation, returns information about the [Element2] it
320320
/// refers to.
321321
CallHierarchyItem? findTarget(int offset) {
322322
var node = _findTargetNode(offset);
@@ -359,7 +359,7 @@ class DartCallHierarchyComputer {
359359
return node;
360360
}
361361

362-
/// Return the [Element] of the given [node], or `null` if [node] is `null`,
362+
/// Return the [Element2] of the given [node], or `null` if [node] is `null`,
363363
/// does not have an element, or the element is not a valid target for call
364364
/// hierarchy.
365365
Element2? _getElementOfNode(AstNode? node) {

pkg/analysis_server/lib/src/computer/computer_color.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,7 @@ class _ColorBuilder extends RecursiveAstVisitor<void> {
412412
}
413413

414414
extension _DartObjectExtensions on DartObject {
415-
/// Reads the value of the field [field] from this object.
415+
/// Reads the value of the field named [fieldName] from this object.
416416
///
417417
/// If the field is not found, recurses up the super classes.
418418
DartObject? getFieldFromHierarchy(String fieldName) =>

pkg/analysis_server/lib/src/computer/computer_inlay_hint.dart

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,12 @@ class DartInlayHintComputer {
3535
return _hints;
3636
}
3737

38-
/// Adds a parameter name hint before [node] showing a the name for
38+
/// Adds a parameter name hint before [nodeOrToken] showing a the name for
3939
/// [parameter].
4040
///
4141
/// If the parameter has no name, no hint will be added.
4242
///
43-
/// A colon and padding will be added between the hint and [node]
43+
/// A colon and padding will be added between the hint and [nodeOrToken]
4444
/// automatically.
4545
void _addParameterNamePrefix(
4646
SyntacticEntity nodeOrToken,
@@ -68,7 +68,8 @@ class DartInlayHintComputer {
6868
);
6969
}
7070

71-
/// Adds a type hint for [node] showing a label for type arguments [types].
71+
/// Adds a type hint for [nodeOrToken] showing a label for type arguments
72+
/// [types].
7273
///
7374
/// Hints will be added before the node unless [suffix] is `true`.
7475
///
@@ -98,9 +99,9 @@ class DartInlayHintComputer {
9899
);
99100
}
100101

101-
/// Adds a type hint before [node] showing a label for the type [type].
102+
/// Adds a type hint before [nodeOrToken] showing a label for the type [type].
102103
///
103-
/// Padding will be added between the hint and [node] automatically.
104+
/// Padding will be added between the hint and [nodeOrToken] automatically.
104105
void _addTypePrefix(SyntacticEntity nodeOrToken, DartType type) {
105106
var offset = nodeOrToken.offset;
106107
var position = toPosition(_lineInfo.getLocation(offset));

pkg/analysis_server/lib/src/computer/computer_lazy_type_hierarchy.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ class DartLazyTypeHierarchyComputer {
112112
return element is InterfaceElement2 ? element : null;
113113
}
114114

115-
/// Gets immediate sub types for the class/mixin [element].
115+
/// Gets immediate subtypes for the class/mixin [target].
116116
Future<List<TypeHierarchyRelatedItem>> _getSubtypes(
117117
InterfaceElement2 target,
118118
SearchEngine searchEngine,

pkg/analysis_server/lib/src/computer/computer_overrides.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ class DartUnitOverridesComputer {
4040
return _overrides;
4141
}
4242

43-
/// Add a new [Override] for the declaration with the given name [token].
43+
/// Add a new [proto.Override] for the declaration with the given name
44+
/// [token].
4445
void _addOverride(Token token, Element2? element) {
4546
if (element != null) {
4647
var overridesResult = _OverriddenElementsFinder(element).find();

pkg/analysis_server/lib/src/computer/import_elements_computer.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ class ImportElementsComputer {
2828
/// Initialize a newly created builder.
2929
ImportElementsComputer(this.resourceProvider, this.libraryResult);
3030

31-
/// Create the edits that will cause the list of [importedElements] to be
32-
/// imported into the library at the given [path].
31+
/// Creates the edits that will cause the list of [importedElementsList] to be
32+
/// imported into the library.
3333
Future<SourceChange> createEdits(
3434
List<ImportedElements> importedElementsList,
3535
) async {

pkg/analysis_server/lib/src/context_manager.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -768,8 +768,7 @@ class ContextManagerImpl implements ContextManager {
768768
}
769769
}
770770

771-
/// Establishes watch(es) for the Blaze generated files provided in
772-
/// [notification].
771+
/// Establishes watch(es) for the Blaze-generated files provided in [folder].
773772
///
774773
/// Whenever the files change, we trigger re-analysis. This allows us to react
775774
/// to creation/modification of files that were generated by Blaze.

0 commit comments

Comments
 (0)