Lombok generated code by annotation not showing in outline
When I add Lombok annotations to a Java entity class, I expect to see the generated code (constructors, getters, setters, etc.) appear in the outline view — just like it does in NetBeans, Eclipse, Intellij. See also https://github.com/microsoft/vscode/issues/239634
This seems pretty reasonable. The only reason for us not having done this that I can think of is conceptual. We use the language server integration in VS Code to generate the outline view. It's connected to textDocument/documentSymbol. The spec makes reference to the idea that these should represent symbols present in the document. The generated content by Lombok for a given source file doesn't quite match that.
However, we ran into an even more annoying case. Most IDEs have a way to show inherited symbols in the same outline view. In that case we did it in the quick-open as that seemed more useful (See https://github.com/redhat-developer/vscode-java/pull/2590 ).
This is weird, the generated builder is shown in the outline, but not the other generated code. @snjeza any idea why?
. @snjeza any idea why?
@fbricon You may want to take a look at
- https://github.com/eclipse-jdtls/eclipse.jdt.ls/issues/2446
- https://github.com/eclipse-jdtls/eclipse.jdt.ls/pull/2452
@snjeza ok so we might want to expose a setting to show generated symbols in the outline. So that we can keep it fast by default and users who really want it can toggle them on
and that also means #2452 did not cover the case of generated classes, only methods.