Skip to content

Commit

Permalink
try fix ls crash on typing
Browse files Browse the repository at this point in the history
  • Loading branch information
brachy84 committed Mar 12, 2024
1 parent b0b3ebc commit d065523
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ private void populateItemsFromNode(Position position, ASTNode offsetNode, Comple
}
}

// TODO this will change
private void populateItemsFromConstantExpression(ConstantExpression node, ASTNode parent, Completions items) {
if (node.getType().getName().equals(String.class.getName())) {
ASTNode parentParent = astContext.getVisitor().getParent(parent);
Expand Down Expand Up @@ -455,6 +454,7 @@ private void populateItemsFromGlobalScope(String memberNamePrefix,

List<CompletionItem> staticMethodItems = astContext.getLanguageServerContext().getSandbox().getStaticImports().stream()
.map(staticImport -> astContext.getLanguageServerContext().getScanResult().getClassInfo(staticImport.getName()))
.filter(Objects::nonNull)
.flatMap(classInfo -> classInfo.getMethodInfo().stream().filter(ClassMemberInfo::isStatic))
.filter(methodInfo -> {
String methodName = methodInfo.getName();
Expand Down

0 comments on commit d065523

Please sign in to comment.