computeSuggestionsForClass method
Future<void>
computeSuggestionsForClass(
- DartCompletionRequest request,
- CompletionCollector collector,
- ClassElement? classElement, {
- AstNode? entryPoint,
- bool skipChildClass = true,
- CompletionTarget? target,
- OpType? optype,
Clients should not overload this function.
Implementation
Future<void> computeSuggestionsForClass(
DartCompletionRequest request,
CompletionCollector collector,
ClassElement? classElement, {
AstNode? entryPoint,
bool skipChildClass = true,
CompletionTarget? target,
OpType? optype,
}) async {
entryPoint ??= request.result.unit;
target ??= CompletionTarget.forOffset(entryPoint, request.offset);
optype ??= OpType.forCompletion(target, request.offset);
if (!optype.includeIdentifiers) {
return;
}
if (classElement == null) {
var classDecl = _enclosingClass(target);
if (classDecl == null || classDecl.declaredElement == null) {
return;
}
classElement = classDecl.declaredElement;
}
containingLibrary = request.result.libraryElement;
_computeSuggestionsForClass2(collector, target, classElement!, optype,
skipChildClass: skipChildClass);
}