Commit Graph
10 Commits
Author SHA1 Message Date
a-simeshin ba6170bab1 feat(jdtls): surface Lombok-generated methods in document symbols, bump jdtls version (#1434)
* feat(jdtls): surface Lombok-generated methods in document symbols

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.

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,
well before the fix existed.

Changes:
- New ls_specific_settings.java.lombok_show_generated setting (default true);
  forwarded to JDTLS as java.symbols.includeGeneratedCode in initialize
  params. Older servers ignore the unknown preference key silently.
- Bump bundled vscode-java DEFAULT 1.42.0-561 -> 1.54.0-923 (brings JRE
  21.0.10, Lombok 1.18.39 and Equinox launcher 1.7.100). INITIAL stays at
  1.42.0-561, so per the per-version install-dir convention from #1438 the
  new build lands in vscode-java-1.54.0-923/ while legacy vscode-java/
  caches and any explicit vscode_java_version: '1.42.0-561' override keep
  working.
- New VsixResourcePaths dataclass + INITIAL/DEFAULT_VSCODE_JAVA_PATHS pin
  the JRE / Lombok / launcher filenames *inside* the VSIX. Without this,
  bumping the archive would break users on legacy 1.42.0-561 because
  resource paths inside the archive change between releases. Resolution
  mirrors SHA pinning: known versions get their pinned paths; any other
  version raises SolidLSPException with a pointer to upstream-jdtls mode
  (which derives paths dynamically and needs no pinning).
- Drop dead 'static/vscode-java/...' placeholder in initialize params; the
  real runtimes[] is overwritten below from runtime_dependency_paths
  .jre_home_path, which is correct in both default-VSIX and upstream-jdtls
  modes.
- Test fixtures: Lombok provided dep in test_repo/pom.xml plus
  LombokModel / FluentLombokModel / DefaultGreeter covering @Data, @Builder
  (toBuilder=true), @With, @Delegate, @AllArgsConstructor, @NoArgsConstructor
  and @Accessors(fluent=true). Regression test in test_java_basic.py
  asserts every generated-method shape lands in document symbols.

Closes #1432
2026-05-05 15:06:04 +02:00
Michael Panchenko c55e0c900e Diagnostics, implementation and definition tools (WIP) 2026-04-29 23:52:26 +02:00
Michael Panchenko d30cdf8474 Fix symbol name resolution in selected LS (#1247)
Adds tests for name resolution for each language and fixes the name resolution where tests have failed.

Also:

Extends python tests to cover ty
Extends skipping conditions for several LS (but only when not in CI)
Better test output in CI
Removed a wrong python test (started failing for ty and should have failed for pyright too)
2026-04-01 16:29:00 +02:00
Michael Panchenko 0bbd9e375e Reformat (minor, after replacing black with ruff)
Black dependency created a dependabot warning and couldn't be bumped since it collided with pathspec dependencies. Since ruff can also format, black is not needed. But we now have these small format changes, mostly in test files
2026-03-23 21:10:41 +01:00
Dominik Jain 7de68c09c3 Improve handling of languages for which tests are disabled
adding Clojure to list of disabled languages (tests appear to fail randomly)
2025-12-05 20:46:03 +01:00
Dominik Jain b046f2cb24 Skip SerenaAgent tests using Java in CI #788 2025-12-05 02:27:17 +01:00
Dominik Jain 9709be8e7a Skip Java tests only in CI 2025-11-20 06:28:14 +01:00
Dominik Jain 2b157d4e8f Limit Java tests to Windows 2025-11-20 00:38:05 +01:00
Dominik Jain d8cac3aedb Introduce abstraction DocumentSymbols, which is now returned by request_document_symbols 2025-11-12 03:46:18 +01:00
Dominik Jain 719a2c55a8 Update references to multilspy and update READMEs 2025-06-23 20:47:27 +02:00