Skip to content

Commit

Permalink
DAS: Clean up some broken comment references
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
srawlins authored and Commit Queue committed Dec 30, 2024
1 parent 3cf0093 commit d3fed40
Show file tree
Hide file tree
Showing 12 changed files with 83 additions and 92 deletions.
8 changes: 4 additions & 4 deletions pkg/analysis_server/lib/src/search/element_references.dart
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class ElementReferencesComputer {
}

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

/// Returns a [Future] completing with [Element]s to search references to.
/// Returns a [Future] completing with [Element2]s to search references to.
///
/// If a [ClassMemberElement] or a named [ParameterElement] is given, each
/// corresponding [Element] in the hierarchy is returned.
/// If an instance member or a named [FormalParameterElement] is given, each
/// corresponding [Element2] in the hierarchy is returned.
///
/// Otherwise, only references to [element] should be searched.
Future<Iterable<Element2>> _getRefElements(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,15 @@
// 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:analysis_server/src/legacy_analysis_server.dart';
library;

import 'package:analysis_server/src/analysis_server.dart';

/// A class that can be used to configure an analysis server instance to better
/// support intermittent file systems.
///
/// See also [AnalysisServerOptions.detachableFileSystemManager].
/// See also [LegacyAnalysisServer.detachableFileSystemManager].
abstract class DetachableFileSystemManager {
/// Indicate that the [DetachableFileSystemManager] and the containing
/// analysis server are being shut down.
Expand Down
6 changes: 3 additions & 3 deletions pkg/analysis_server/lib/src/server/lsp_stdio_server.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import 'dart:io';
import 'package:analysis_server/src/lsp/channel/lsp_byte_stream_channel.dart';
import 'package:analysis_server/src/lsp/lsp_socket_server.dart';

/// Instances of the class [StdioServer] implement a simple server operating
/// over standard input and output. The primary responsibility of this server
/// is to split incoming messages on newlines and pass them along to the
/// Instances of the class [LspStdioAnalysisServer] implement a simple server
/// operating over standard input and output. The primary responsibility of this
/// server is to split incoming messages on newlines and pass them along to the
/// analysis server.
class LspStdioAnalysisServer {
/// An object that can handle either a WebSocket connection or a connection
Expand Down
6 changes: 3 additions & 3 deletions pkg/analysis_server/lib/src/server/stdio_server.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
import 'package:analysis_server/src/channel/byte_stream_channel.dart';
import 'package:analysis_server/src/socket_server.dart';

/// Instances of the class [StdioServer] implement a simple server operating
/// over standard input and output. The primary responsibility of this server
/// is to split incoming messages on newlines and pass them along to the
/// Instances of the class [StdioAnalysisServer] implement a simple server
/// operating over standard input and output. The primary responsibility of this
/// server is to split incoming messages on newlines and pass them along to the
/// analysis server.
class StdioAnalysisServer {
/// An object that can handle either a WebSocket connection or a connection
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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/src/utilities/completion_matcher.dart';
library;

import 'package:analysis_server/src/protocol_server.dart'
show CompletionSuggestionKind;
import 'package:analysis_server/src/services/completion/dart/feature_computer.dart';
Expand Down Expand Up @@ -375,7 +378,6 @@ final class FunctionCall extends CandidateSuggestion {
String get completion => 'call()';
}


/// The information about a candidate suggestion based on a getter.
final class GetterSuggestion extends ImportableSuggestion
with MemberSuggestion {
Expand Down Expand Up @@ -502,7 +504,7 @@ final class ImportData {
final String? prefix;

/// Initialize data representing an import of a library, using the
/// [libraryUriStr], with the [prefix].
/// [libraryUri], with the [prefix].
ImportData({
required this.libraryUri,
required this.prefix,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:analysis_server/src/lsp/handlers/handler_completion.dart';
library;

import 'package:analysis_server/src/computer/computer_documentation.dart';
import 'package:analysis_server/src/protocol_server.dart';
import 'package:analysis_server/src/provisional/completion/completion_core.dart';
Expand Down Expand Up @@ -78,9 +81,8 @@ class DartCompletionManager {
/// with the import index property updated.
final NotImportedSuggestions? notImportedSuggestions;

/// Whether the number of suggestions initallly computed was
/// greater than the [maxSuggestions] for a given request, and they were
/// truncated to fit.
/// Whether the number of suggestions initallly computed was greater than the
/// `maxSuggestions` for a given request, and they were truncated to fit.
bool isTruncated = false;

DartCompletionManager({
Expand Down Expand Up @@ -271,10 +273,11 @@ class DartCompletionRequest {
/// Return the source in which the completion is being requested.
final Source source;

/// Return the completion target. This determines what part of the parse tree
/// will receive the newly inserted text.
/// At a minimum, all declarations in the completion scope in [target.unit]
/// will be resolved if they can be resolved.
/// The completion target.
///
/// This determines what part of the parse tree will receive the newly
/// inserted text. At a minimum, all declarations in the completion scope in
/// `target.unit` will be resolved if they can be resolved.
final CompletionTarget target;

/// The compilation unit in which completion is being requested.
Expand Down Expand Up @@ -501,7 +504,7 @@ class DartCompletionRequest {
}
}

/// Information provided by [NotImportedContributor] in addition to suggestions.
/// Information provided by [CompletionHandler]s in addition to suggestions.
class NotImportedSuggestions {
/// This flag is set to `true` if the contributor decided to stop before it
/// processed all available libraries, e.g. we ran out of budget.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -664,7 +664,7 @@ class DeclarationHelper {
}

/// Adds suggestions for any constructors that are visible through type
/// aliases declared within the [library].
/// aliases declared within the `importData.libraryUri`.
void _addConstructorsForAliasedElement(
TypeAliasElement2 alias,
ImportData? importData,
Expand Down Expand Up @@ -1345,8 +1345,8 @@ class DeclarationHelper {
}
}

/// Add the static [accessors], [constructors], [fields], and [methods]
/// defined by the [containingElement].
/// Adds the static [getters], [setters], [constructors], [fields], and
/// [methods] defined by the [containingElement].
void _addStaticMembers({
required List<GetterElement> getters,
required List<SetterElement> setters,
Expand Down Expand Up @@ -1582,8 +1582,7 @@ class DeclarationHelper {
return null;
}

/// Adds a suggestion for the class represented by the [element]. The [prefix]
/// is the prefix by which the element is imported.
/// Adds a suggestion for the class represented by the [element].
void _suggestClass(ClassElement2 element, ImportData? importData) {
if (visibilityTracker.isVisible(element: element, importData: importData)) {
if ((mustBeExtendable &&
Expand Down Expand Up @@ -1615,8 +1614,7 @@ class DeclarationHelper {
}
}

/// Adds a suggestion for the constructor represented by the [element]. The
/// [prefix] is the prefix by which the class is imported.
/// Adds a suggestion for the constructor represented by the [element].
void _suggestConstructor(
ConstructorElement2 element, {
required ImportData? importData,
Expand Down Expand Up @@ -1694,8 +1692,7 @@ class DeclarationHelper {
}
}

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

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

/// Adds a suggestion for the extension type represented by the [element]. The
/// [prefix] is the prefix by which the element is imported.
/// Adds a suggestion for the extension type represented by the [element].
void _suggestExtensionType(
ExtensionTypeElement2 element,
ImportData? importData,
Expand Down Expand Up @@ -1879,8 +1874,7 @@ class DeclarationHelper {
}
}

/// Adds a suggestion for the mixin represented by the [element]. The [prefix]
/// is the prefix by which the element is imported.
/// Adds a suggestion for the mixin represented by the [element].
void _suggestMixin(MixinElement2 element, ImportData? importData) {
if (visibilityTracker.isVisible(element: element, importData: importData)) {
if (mustBeExtendable ||
Expand Down Expand Up @@ -2095,8 +2089,7 @@ class DeclarationHelper {
}
}

/// Adds a suggestion for the function represented by the [element]. The
/// [prefix] is the prefix by which the element is imported.
/// Adds a suggestion for the function represented by the [element].
void _suggestTopLevelFunction(
TopLevelFunctionElement element,
ImportData? importData,
Expand All @@ -2122,7 +2115,6 @@ class DeclarationHelper {
}

/// Adds a suggestion for the getter or setter represented by the [element].
/// The [prefix] is the prefix by which the element is imported.
void _suggestTopLevelProperty(
PropertyAccessorElement2 element,
ImportData? importData,
Expand Down Expand Up @@ -2151,7 +2143,6 @@ class DeclarationHelper {
}

/// Adds a suggestion for the getter or setter represented by the [element].
/// The [prefix] is the prefix by which the element is imported.
void _suggestTopLevelVariable(
TopLevelVariableElement2 element,
ImportData? importData,
Expand All @@ -2174,8 +2165,7 @@ class DeclarationHelper {
}
}

/// Adds a suggestion for the type alias represented by the [element]. The
/// [prefix] is the prefix by which the element is imported.
/// Adds a suggestion for the type alias represented by the [element].
void _suggestTypeAlias(TypeAliasElement2 element, ImportData? importData) {
if (visibilityTracker.isVisible(element: element, importData: importData)) {
var matcherScore = state.matcher.score(element.displayName);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1314,9 +1314,7 @@ parent3: ${node.parent?.parent?.parent}
return null;
}

/// Return the result of visiting the parent of the [node] after setting the
/// [childNode] to the [node]. Note that this method is destructive in that it
/// does not reset the [childNode] before returning.
/// Returns the result of visiting the parent of the [node].
DartType? _visitParent(AstNode node) {
var parent = node.parent;
if (parent == null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class RelevanceComputer {
return _cachedContainingMemberName;
}

/// Compute the relevance for [FieldElement] suggestion.
/// Compute the relevance for [FieldElement2] suggestion.
int computeFieldElementRelevance(
FieldElement2 element,
double inheritanceDistance,
Expand Down Expand Up @@ -420,7 +420,7 @@ class RelevanceComputer {
);
}

/// Compute the relevance for [ConstructorElement].
/// Compute the relevance for [ConstructorElement2].
int _computeConstructorRelevance(
ConstructorElement2 element,
NeverType neverType,
Expand Down Expand Up @@ -564,7 +564,7 @@ class RelevanceComputer {
);
}

/// Compute the relevance for [MethodElement].
/// Compute the relevance for [MethodElement2].
int _computeMethodRelevance(
MethodElement2 method,
double inheritanceDistance,
Expand Down Expand Up @@ -605,7 +605,7 @@ class RelevanceComputer {
);
}

/// Compute the relevance for [PropertyAccessorElement].
/// Compute the relevance for [PropertyAccessorElement2].
int _computePropertyAccessorRelevance(
PropertyAccessorElement2 accessor,
double inheritanceDistance,
Expand Down Expand Up @@ -639,7 +639,7 @@ class RelevanceComputer {
return 0;
}

/// Compute the relevance for a static [FieldElement].
/// Compute the relevance for a static [FieldElement2].
int _computeStaticFieldRelevance(
FieldElement2 element,
double inheritanceDistance,
Expand All @@ -663,7 +663,7 @@ class RelevanceComputer {
return 0;
}

/// Compute the relevance for top level [PropertyAccessorElement].
/// Compute the relevance for top level [PropertyAccessorElement2].
int _computeTopLevelPropertyAccessorRelevance(
PropertyAccessorElement2 accessor,
bool isNotImportedLibrary,
Expand Down
Loading

0 comments on commit d3fed40

Please sign in to comment.