Skip to content

Commit

Permalink
add log for missing name in DocumentSymbol
Browse files Browse the repository at this point in the history
  • Loading branch information
milesziemer committed Jun 13, 2024
1 parent 2ae801a commit 66e6279
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -637,6 +637,10 @@ public CompletableFuture<CompletionItem> resolveCompletionItem(CompletionItem un
break;
}
String symbolName = documentShape.shapeName().toString();
if (symbolName.isEmpty()) {
LOGGER.warning("[DocumentSymbols] Empty shape name for " + documentShape);
continue;
}
Range symbolRange = documentShape.range();
DocumentSymbol symbol = new DocumentSymbol(symbolName, symbolKind, symbolRange, symbolRange);
documentSymbols.add(Either.forRight(symbol));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,16 @@ public int hashCode() {
return Objects.hash(range, shapeName, kind);
}

@Override
public String toString() {
return "DocumentShape{" +
"range=" + range +
", shapeName=" + shapeName +
", kind=" + kind +
", targetReference=" + targetReference +
'}';
}

public enum Kind {
DefinedShape,
DefinedMember,
Expand Down

0 comments on commit 66e6279

Please sign in to comment.