Skip to content

Commit d3fed40

Browse files
srawlinsCommit Queue
authored andcommitted
DAS: Clean up some broken comment references
Change-Id: I319620941b6051b138326cab9bbb8985b43216eb Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/402426 Auto-Submit: Samuel Rawlins <[email protected]> Commit-Queue: Konstantin Shcheglov <[email protected]> Reviewed-by: Konstantin Shcheglov <[email protected]>
1 parent 3cf0093 commit d3fed40

12 files changed

+83
-92
lines changed

pkg/analysis_server/lib/src/search/element_references.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ class ElementReferencesComputer {
4747
}
4848

4949
/// Returns a [Future] completing with a [List] of references to [element] or
50-
/// to the corresponding hierarchy [Element]s.
50+
/// to the corresponding hierarchy [Element2]s.
5151
Future<List<SearchMatch>> _findElementsReferences(
5252
Element2 element,
5353
OperationPerformanceImpl performance,
@@ -74,10 +74,10 @@ class ElementReferencesComputer {
7474
return searchEngine.searchReferences(element);
7575
}
7676

77-
/// Returns a [Future] completing with [Element]s to search references to.
77+
/// Returns a [Future] completing with [Element2]s to search references to.
7878
///
79-
/// If a [ClassMemberElement] or a named [ParameterElement] is given, each
80-
/// corresponding [Element] in the hierarchy is returned.
79+
/// If an instance member or a named [FormalParameterElement] is given, each
80+
/// corresponding [Element2] in the hierarchy is returned.
8181
///
8282
/// Otherwise, only references to [element] should be searched.
8383
Future<Iterable<Element2>> _getRefElements(

pkg/analysis_server/lib/src/server/detachable_filesystem_manager.dart

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,15 @@
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/legacy_analysis_server.dart';
6+
library;
7+
58
import 'package:analysis_server/src/analysis_server.dart';
69

710
/// A class that can be used to configure an analysis server instance to better
811
/// support intermittent file systems.
912
///
10-
/// See also [AnalysisServerOptions.detachableFileSystemManager].
13+
/// See also [LegacyAnalysisServer.detachableFileSystemManager].
1114
abstract class DetachableFileSystemManager {
1215
/// Indicate that the [DetachableFileSystemManager] and the containing
1316
/// analysis server are being shut down.

pkg/analysis_server/lib/src/server/lsp_stdio_server.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ import 'dart:io';
77
import 'package:analysis_server/src/lsp/channel/lsp_byte_stream_channel.dart';
88
import 'package:analysis_server/src/lsp/lsp_socket_server.dart';
99

10-
/// Instances of the class [StdioServer] implement a simple server operating
11-
/// over standard input and output. The primary responsibility of this server
12-
/// is to split incoming messages on newlines and pass them along to the
10+
/// Instances of the class [LspStdioAnalysisServer] implement a simple server
11+
/// operating over standard input and output. The primary responsibility of this
12+
/// server is to split incoming messages on newlines and pass them along to the
1313
/// analysis server.
1414
class LspStdioAnalysisServer {
1515
/// An object that can handle either a WebSocket connection or a connection

pkg/analysis_server/lib/src/server/stdio_server.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
import 'package:analysis_server/src/channel/byte_stream_channel.dart';
66
import 'package:analysis_server/src/socket_server.dart';
77

8-
/// Instances of the class [StdioServer] implement a simple server operating
9-
/// over standard input and output. The primary responsibility of this server
10-
/// is to split incoming messages on newlines and pass them along to the
8+
/// Instances of the class [StdioAnalysisServer] implement a simple server
9+
/// operating over standard input and output. The primary responsibility of this
10+
/// server is to split incoming messages on newlines and pass them along to the
1111
/// analysis server.
1212
class StdioAnalysisServer {
1313
/// An object that can handle either a WebSocket connection or a connection

pkg/analysis_server/lib/src/services/completion/dart/candidate_suggestion.dart

Lines changed: 4 additions & 2 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:analyzer/src/utilities/completion_matcher.dart';
6+
library;
7+
58
import 'package:analysis_server/src/protocol_server.dart'
69
show CompletionSuggestionKind;
710
import 'package:analysis_server/src/services/completion/dart/feature_computer.dart';
@@ -375,7 +378,6 @@ final class FunctionCall extends CandidateSuggestion {
375378
String get completion => 'call()';
376379
}
377380

378-
379381
/// The information about a candidate suggestion based on a getter.
380382
final class GetterSuggestion extends ImportableSuggestion
381383
with MemberSuggestion {
@@ -502,7 +504,7 @@ final class ImportData {
502504
final String? prefix;
503505

504506
/// Initialize data representing an import of a library, using the
505-
/// [libraryUriStr], with the [prefix].
507+
/// [libraryUri], with the [prefix].
506508
ImportData({
507509
required this.libraryUri,
508510
required this.prefix,

pkg/analysis_server/lib/src/services/completion/dart/completion_manager.dart

Lines changed: 11 additions & 8 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/lsp/handlers/handler_completion.dart';
6+
library;
7+
58
import 'package:analysis_server/src/computer/computer_documentation.dart';
69
import 'package:analysis_server/src/protocol_server.dart';
710
import 'package:analysis_server/src/provisional/completion/completion_core.dart';
@@ -78,9 +81,8 @@ class DartCompletionManager {
7881
/// with the import index property updated.
7982
final NotImportedSuggestions? notImportedSuggestions;
8083

81-
/// Whether the number of suggestions initallly computed was
82-
/// greater than the [maxSuggestions] for a given request, and they were
83-
/// truncated to fit.
84+
/// Whether the number of suggestions initallly computed was greater than the
85+
/// `maxSuggestions` for a given request, and they were truncated to fit.
8486
bool isTruncated = false;
8587

8688
DartCompletionManager({
@@ -271,10 +273,11 @@ class DartCompletionRequest {
271273
/// Return the source in which the completion is being requested.
272274
final Source source;
273275

274-
/// Return the completion target. This determines what part of the parse tree
275-
/// will receive the newly inserted text.
276-
/// At a minimum, all declarations in the completion scope in [target.unit]
277-
/// will be resolved if they can be resolved.
276+
/// The completion target.
277+
///
278+
/// This determines what part of the parse tree will receive the newly
279+
/// inserted text. At a minimum, all declarations in the completion scope in
280+
/// `target.unit` will be resolved if they can be resolved.
278281
final CompletionTarget target;
279282

280283
/// The compilation unit in which completion is being requested.
@@ -501,7 +504,7 @@ class DartCompletionRequest {
501504
}
502505
}
503506

504-
/// Information provided by [NotImportedContributor] in addition to suggestions.
507+
/// Information provided by [CompletionHandler]s in addition to suggestions.
505508
class NotImportedSuggestions {
506509
/// This flag is set to `true` if the contributor decided to stop before it
507510
/// processed all available libraries, e.g. we ran out of budget.

pkg/analysis_server/lib/src/services/completion/dart/declaration_helper.dart

Lines changed: 11 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -664,7 +664,7 @@ class DeclarationHelper {
664664
}
665665

666666
/// Adds suggestions for any constructors that are visible through type
667-
/// aliases declared within the [library].
667+
/// aliases declared within the `importData.libraryUri`.
668668
void _addConstructorsForAliasedElement(
669669
TypeAliasElement2 alias,
670670
ImportData? importData,
@@ -1345,8 +1345,8 @@ class DeclarationHelper {
13451345
}
13461346
}
13471347

1348-
/// Add the static [accessors], [constructors], [fields], and [methods]
1349-
/// defined by the [containingElement].
1348+
/// Adds the static [getters], [setters], [constructors], [fields], and
1349+
/// [methods] defined by the [containingElement].
13501350
void _addStaticMembers({
13511351
required List<GetterElement> getters,
13521352
required List<SetterElement> setters,
@@ -1582,8 +1582,7 @@ class DeclarationHelper {
15821582
return null;
15831583
}
15841584

1585-
/// Adds a suggestion for the class represented by the [element]. The [prefix]
1586-
/// is the prefix by which the element is imported.
1585+
/// Adds a suggestion for the class represented by the [element].
15871586
void _suggestClass(ClassElement2 element, ImportData? importData) {
15881587
if (visibilityTracker.isVisible(element: element, importData: importData)) {
15891588
if ((mustBeExtendable &&
@@ -1615,8 +1614,7 @@ class DeclarationHelper {
16151614
}
16161615
}
16171616

1618-
/// Adds a suggestion for the constructor represented by the [element]. The
1619-
/// [prefix] is the prefix by which the class is imported.
1617+
/// Adds a suggestion for the constructor represented by the [element].
16201618
void _suggestConstructor(
16211619
ConstructorElement2 element, {
16221620
required ImportData? importData,
@@ -1694,8 +1692,7 @@ class DeclarationHelper {
16941692
}
16951693
}
16961694

1697-
/// Adds a suggestion for the enum represented by the [element]. The [prefix]
1698-
/// is the prefix by which the element is imported.
1695+
/// Adds a suggestion for the enum represented by the [element].
16991696
void _suggestEnum(EnumElement2 element, ImportData? importData) {
17001697
if (visibilityTracker.isVisible(element: element, importData: importData)) {
17011698
if (mustBeExtendable || mustBeImplementable || mustBeMixable) {
@@ -1722,8 +1719,7 @@ class DeclarationHelper {
17221719
}
17231720
}
17241721

1725-
/// Adds a suggestion for the extension represented by the [element]. The
1726-
/// [prefix] is the prefix by which the element is imported.
1722+
/// Adds a suggestion for the extension represented by the [element].
17271723
void _suggestExtension(ExtensionElement2 element, ImportData? importData) {
17281724
if (visibilityTracker.isVisible(element: element, importData: importData)) {
17291725
if (mustBeExtendable || mustBeImplementable || mustBeMixable) {
@@ -1744,8 +1740,7 @@ class DeclarationHelper {
17441740
}
17451741
}
17461742

1747-
/// Adds a suggestion for the extension type represented by the [element]. The
1748-
/// [prefix] is the prefix by which the element is imported.
1743+
/// Adds a suggestion for the extension type represented by the [element].
17491744
void _suggestExtensionType(
17501745
ExtensionTypeElement2 element,
17511746
ImportData? importData,
@@ -1879,8 +1874,7 @@ class DeclarationHelper {
18791874
}
18801875
}
18811876

1882-
/// Adds a suggestion for the mixin represented by the [element]. The [prefix]
1883-
/// is the prefix by which the element is imported.
1877+
/// Adds a suggestion for the mixin represented by the [element].
18841878
void _suggestMixin(MixinElement2 element, ImportData? importData) {
18851879
if (visibilityTracker.isVisible(element: element, importData: importData)) {
18861880
if (mustBeExtendable ||
@@ -2095,8 +2089,7 @@ class DeclarationHelper {
20952089
}
20962090
}
20972091

2098-
/// Adds a suggestion for the function represented by the [element]. The
2099-
/// [prefix] is the prefix by which the element is imported.
2092+
/// Adds a suggestion for the function represented by the [element].
21002093
void _suggestTopLevelFunction(
21012094
TopLevelFunctionElement element,
21022095
ImportData? importData,
@@ -2122,7 +2115,6 @@ class DeclarationHelper {
21222115
}
21232116

21242117
/// Adds a suggestion for the getter or setter represented by the [element].
2125-
/// The [prefix] is the prefix by which the element is imported.
21262118
void _suggestTopLevelProperty(
21272119
PropertyAccessorElement2 element,
21282120
ImportData? importData,
@@ -2151,7 +2143,6 @@ class DeclarationHelper {
21512143
}
21522144

21532145
/// Adds a suggestion for the getter or setter represented by the [element].
2154-
/// The [prefix] is the prefix by which the element is imported.
21552146
void _suggestTopLevelVariable(
21562147
TopLevelVariableElement2 element,
21572148
ImportData? importData,
@@ -2174,8 +2165,7 @@ class DeclarationHelper {
21742165
}
21752166
}
21762167

2177-
/// Adds a suggestion for the type alias represented by the [element]. The
2178-
/// [prefix] is the prefix by which the element is imported.
2168+
/// Adds a suggestion for the type alias represented by the [element].
21792169
void _suggestTypeAlias(TypeAliasElement2 element, ImportData? importData) {
21802170
if (visibilityTracker.isVisible(element: element, importData: importData)) {
21812171
var matcherScore = state.matcher.score(element.displayName);

pkg/analysis_server/lib/src/services/completion/dart/feature_computer.dart

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1314,9 +1314,7 @@ parent3: ${node.parent?.parent?.parent}
13141314
return null;
13151315
}
13161316

1317-
/// Return the result of visiting the parent of the [node] after setting the
1318-
/// [childNode] to the [node]. Note that this method is destructive in that it
1319-
/// does not reset the [childNode] before returning.
1317+
/// Returns the result of visiting the parent of the [node].
13201318
DartType? _visitParent(AstNode node) {
13211319
var parent = node.parent;
13221320
if (parent == null) {

pkg/analysis_server/lib/src/services/completion/dart/relevance_computer.dart

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ class RelevanceComputer {
6565
return _cachedContainingMemberName;
6666
}
6767

68-
/// Compute the relevance for [FieldElement] suggestion.
68+
/// Compute the relevance for [FieldElement2] suggestion.
6969
int computeFieldElementRelevance(
7070
FieldElement2 element,
7171
double inheritanceDistance,
@@ -420,7 +420,7 @@ class RelevanceComputer {
420420
);
421421
}
422422

423-
/// Compute the relevance for [ConstructorElement].
423+
/// Compute the relevance for [ConstructorElement2].
424424
int _computeConstructorRelevance(
425425
ConstructorElement2 element,
426426
NeverType neverType,
@@ -564,7 +564,7 @@ class RelevanceComputer {
564564
);
565565
}
566566

567-
/// Compute the relevance for [MethodElement].
567+
/// Compute the relevance for [MethodElement2].
568568
int _computeMethodRelevance(
569569
MethodElement2 method,
570570
double inheritanceDistance,
@@ -605,7 +605,7 @@ class RelevanceComputer {
605605
);
606606
}
607607

608-
/// Compute the relevance for [PropertyAccessorElement].
608+
/// Compute the relevance for [PropertyAccessorElement2].
609609
int _computePropertyAccessorRelevance(
610610
PropertyAccessorElement2 accessor,
611611
double inheritanceDistance,
@@ -639,7 +639,7 @@ class RelevanceComputer {
639639
return 0;
640640
}
641641

642-
/// Compute the relevance for a static [FieldElement].
642+
/// Compute the relevance for a static [FieldElement2].
643643
int _computeStaticFieldRelevance(
644644
FieldElement2 element,
645645
double inheritanceDistance,
@@ -663,7 +663,7 @@ class RelevanceComputer {
663663
return 0;
664664
}
665665

666-
/// Compute the relevance for top level [PropertyAccessorElement].
666+
/// Compute the relevance for top level [PropertyAccessorElement2].
667667
int _computeTopLevelPropertyAccessorRelevance(
668668
PropertyAccessorElement2 accessor,
669669
bool isNotImportedLibrary,

0 commit comments

Comments
 (0)