feat(jdtls): surface Lombok-generated methods in document symbols#1434
Open
a-simeshin wants to merge 3 commits intooraios:mainfrom
Open
feat(jdtls): surface Lombok-generated methods in document symbols#1434a-simeshin wants to merge 3 commits intooraios:mainfrom
a-simeshin wants to merge 3 commits intooraios:mainfrom
Conversation
vscode-java VSIX archives ship some plugin jars (e.g. slf4j.api_*.jar) with mode 0o444. When re-extracting the archive over an existing install — for example after bumping vscode_java_version — open(target, "wb") would fail with EACCES because the prior file is read-only. Unlink any pre-existing entry before writing so re-extracts always land cleanly. Added a unit test that mirrors the exact failure mode (read-only target, zip storing 0o444 mode). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
JDTLS' DocumentSymbolHandler filtered out every SourceMethod where JDTUtils.isGenerated() was true, so Lombok-synthesised methods (getX/setX, builder(), equals/hashCode/toString, withX, fluent accessors, ...) never reached the LSP client. As a result Serena's symbol-aware tools — find_symbol, get_symbols_overview, replace_symbol_body, insert_before_symbol, insert_after_symbol — could not see, address or edit any Lombok-generated member; only search_for_pattern / replace_content (text-based) worked. Generated classes / fields / constructors were already visible because the filter only ran on SourceMethod, which exactly matches the asymmetric behaviour reported in oraios#1432. Upstream introduced an opt-in preference java.symbols.includeGeneratedCode in eclipse-jdtls/eclipse.jdt.ls#3706 (merged 2026-02-24) and surfaced it through redhat-developer/vscode-java#4335. First vscode-java release with the new JDTLS build is v1.53.0 (2026-02-26). Serena was pinned to v1.42.0-561 (May 2025) — well before the fix existed. Changes: - Bump bundled vscode-java from 1.42.0-561 to 1.54.0-923 (also brings JRE 21.0.10, Lombok 1.18.39 and Equinox launcher 1.7.100 — paths and SHA256 hashes updated for all 5 platforms). - Send java.symbols.includeGeneratedCode in JDTLS init params, controlled by a new ls_specific_settings.java.lombok_show_generated setting (default true). Set to false to restore the pre-fix outline if the extra getters / setters are noise on @Data-heavy classes. - Test fixture: add Lombok dep to the Java test repo's pom.xml plus a @DaTa @builder LombokModel class. Regression test verifies that getName/setName/builder appear in document symbols by default. - Docs + CHANGELOG: document the new setting and the runtime bump. Closes oraios#1432 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Contributor
…ing annotations The issue (oraios#1432) lists every Lombok annotation that was failing — initial fixture only covered @DaTa + @builder. Expanded LombokModel and the test to verify @DaTa, @builder(toBuilder=true), @with, @AllArgsConstructor, @NoArgsConstructor, @DeleGate plus a separate FluentLombokModel for @accessors(fluent=true) prefix-stripped accessors. Asserts every representative generated symbol surfaces in document symbols: - @DaTa: getX/setX/equals/hashCode/toString - @builder(toBuilder=true): builder()/toBuilder()/build() + inner builder class - @with: withX - @DeleGate: forwarder methods (greet/farewell) for the delegate target - ctors: @AllArgsConstructor + @NoArgsConstructor (kind=9) - @accessors(fluent=true): prefix-stripped host()/tag() Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1432.
Bumps bundled vscode-java
1.42.0-561→1.54.0-923and enables JDTLS' newjava.symbols.includeGeneratedCodepreference (eclipse.jdt.ls#3706) so Lombok-generated methods (getX/setX,builder(),equals/hashCode/toString, ...) finally appear infind_symbol/get_symbols_overview/replace_symbol_body/insert_*_symbol.Changes
ls_specific_settings.java.lombok_show_generatedsetting (defaulttrue) — flip tofalseto hide synthetic methods if@Dataclasses overload the outline.FileUtils._extract_zip_archive: unlink existing entries before write — fixesPermissionErrorre-extracting over read-only plugin jars (every user hits this on the version bump).@Data @Builderclass, regression test onfind_symbol.Test plan
uv run pytest test/solidlsp/java/— 40/40 passed (including new Lombok regression test, full VSIX 1.54 download verified).