jj-language-server 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (99) hide show
  1. package/LICENSE +191 -0
  2. package/README.md +170 -0
  3. package/lib/cli.d.ts +2 -0
  4. package/lib/cli.d.ts.map +1 -0
  5. package/lib/cli.mjs +3 -0
  6. package/lib/cli.mjs.map +1 -0
  7. package/lib/diagnostics.d.ts +7 -0
  8. package/lib/diagnostics.d.ts.map +1 -0
  9. package/lib/features/call-hierarchy.d.ts +11 -0
  10. package/lib/features/call-hierarchy.d.ts.map +1 -0
  11. package/lib/features/code-actions.d.ts +10 -0
  12. package/lib/features/code-actions.d.ts.map +1 -0
  13. package/lib/features/code-lens.d.ts +8 -0
  14. package/lib/features/code-lens.d.ts.map +1 -0
  15. package/lib/features/completion.d.ts +8 -0
  16. package/lib/features/completion.d.ts.map +1 -0
  17. package/lib/features/document-links.d.ts +6 -0
  18. package/lib/features/document-links.d.ts.map +1 -0
  19. package/lib/features/document-symbols.d.ts +7 -0
  20. package/lib/features/document-symbols.d.ts.map +1 -0
  21. package/lib/features/folding-ranges.d.ts +9 -0
  22. package/lib/features/folding-ranges.d.ts.map +1 -0
  23. package/lib/features/formatting.d.ts +13 -0
  24. package/lib/features/formatting.d.ts.map +1 -0
  25. package/lib/features/hover.d.ts +8 -0
  26. package/lib/features/hover.d.ts.map +1 -0
  27. package/lib/features/inlay-hints.d.ts +8 -0
  28. package/lib/features/inlay-hints.d.ts.map +1 -0
  29. package/lib/features/linked-editing.d.ts +10 -0
  30. package/lib/features/linked-editing.d.ts.map +1 -0
  31. package/lib/features/navigation.d.ts +35 -0
  32. package/lib/features/navigation.d.ts.map +1 -0
  33. package/lib/features/on-type-formatting.d.ts +7 -0
  34. package/lib/features/on-type-formatting.d.ts.map +1 -0
  35. package/lib/features/organize-imports.d.ts +6 -0
  36. package/lib/features/organize-imports.d.ts.map +1 -0
  37. package/lib/features/refactoring.d.ts +31 -0
  38. package/lib/features/refactoring.d.ts.map +1 -0
  39. package/lib/features/selection-range.d.ts +9 -0
  40. package/lib/features/selection-range.d.ts.map +1 -0
  41. package/lib/features/semantic-diagnostics.d.ts +14 -0
  42. package/lib/features/semantic-diagnostics.d.ts.map +1 -0
  43. package/lib/features/semantic-tokens.d.ts +12 -0
  44. package/lib/features/semantic-tokens.d.ts.map +1 -0
  45. package/lib/features/signature-help.d.ts +7 -0
  46. package/lib/features/signature-help.d.ts.map +1 -0
  47. package/lib/features/source-generation.d.ts +7 -0
  48. package/lib/features/source-generation.d.ts.map +1 -0
  49. package/lib/features/token-utils.d.ts +6 -0
  50. package/lib/features/token-utils.d.ts.map +1 -0
  51. package/lib/features/type-hierarchy.d.ts +7 -0
  52. package/lib/features/type-hierarchy.d.ts.map +1 -0
  53. package/lib/java/annotation-processor.d.ts +57 -0
  54. package/lib/java/annotation-processor.d.ts.map +1 -0
  55. package/lib/java/class-file-reader.d.ts +57 -0
  56. package/lib/java/class-file-reader.d.ts.map +1 -0
  57. package/lib/java/cst-utils.d.ts +33 -0
  58. package/lib/java/cst-utils.d.ts.map +1 -0
  59. package/lib/java/expression-type-resolver.d.ts +24 -0
  60. package/lib/java/expression-type-resolver.d.ts.map +1 -0
  61. package/lib/java/import-resolver.d.ts +40 -0
  62. package/lib/java/import-resolver.d.ts.map +1 -0
  63. package/lib/java/javadoc.d.ts +41 -0
  64. package/lib/java/javadoc.d.ts.map +1 -0
  65. package/lib/java/parser.d.ts +13 -0
  66. package/lib/java/parser.d.ts.map +1 -0
  67. package/lib/java/scope-resolver.d.ts +20 -0
  68. package/lib/java/scope-resolver.d.ts.map +1 -0
  69. package/lib/java/symbol-table.d.ts +43 -0
  70. package/lib/java/symbol-table.d.ts.map +1 -0
  71. package/lib/java/type-resolver.d.ts +73 -0
  72. package/lib/java/type-resolver.d.ts.map +1 -0
  73. package/lib/lsp-client.d.ts +14 -0
  74. package/lib/lsp-client.d.ts.map +1 -0
  75. package/lib/lsp-connection.d.ts +6 -0
  76. package/lib/lsp-connection.d.ts.map +1 -0
  77. package/lib/lsp-server.d.ts +87 -0
  78. package/lib/lsp-server.d.ts.map +1 -0
  79. package/lib/project/classpath-resolver.d.ts +80 -0
  80. package/lib/project/classpath-resolver.d.ts.map +1 -0
  81. package/lib/project/document-cache.d.ts +58 -0
  82. package/lib/project/document-cache.d.ts.map +1 -0
  83. package/lib/project/gradle.d.ts +32 -0
  84. package/lib/project/gradle.d.ts.map +1 -0
  85. package/lib/project/jar-index.d.ts +71 -0
  86. package/lib/project/jar-index.d.ts.map +1 -0
  87. package/lib/project/jdk-model.d.ts +39 -0
  88. package/lib/project/jdk-model.d.ts.map +1 -0
  89. package/lib/project/maven.d.ts +37 -0
  90. package/lib/project/maven.d.ts.map +1 -0
  91. package/lib/project/multi-root.d.ts +52 -0
  92. package/lib/project/multi-root.d.ts.map +1 -0
  93. package/lib/project/source-jar.d.ts +62 -0
  94. package/lib/project/source-jar.d.ts.map +1 -0
  95. package/lib/project/workspace-index.d.ts +67 -0
  96. package/lib/project/workspace-index.d.ts.map +1 -0
  97. package/lib/utils/logger.d.ts +18 -0
  98. package/lib/utils/logger.d.ts.map +1 -0
  99. package/package.json +57 -0
package/LICENSE ADDED
@@ -0,0 +1,191 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to the Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by the Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding any notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ Copyright 2025 jj-language-server contributors
180
+
181
+ Licensed under the Apache License, Version 2.0 (the "License");
182
+ you may not use this file except in compliance with the License.
183
+ You may obtain a copy of the License at
184
+
185
+ http://www.apache.org/licenses/LICENSE-2.0
186
+
187
+ Unless required by applicable law or agreed to in writing, software
188
+ distributed under the License is distributed on an "AS IS" BASIS,
189
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
190
+ See the License for the specific language governing permissions and
191
+ limitations under the License.
package/README.md ADDED
@@ -0,0 +1,170 @@
1
+ # jj-language-server
2
+
3
+ > [!WARNING]
4
+ > **Experimental project** — Developed by [Julien Dubois](https://github.com/jdubois). This software is provided "as is", without warranty of any kind, express or implied. See the [Apache-2.0 License](LICENSE) for details.
5
+
6
+ A Java Language Server implemented in TypeScript/JavaScript — **no JVM required**.
7
+
8
+ Installable via npm, works with any editor that supports the [Language Server Protocol](https://microsoft.github.io/language-server-protocol/).
9
+
10
+ ## Installing
11
+
12
+ ```sh
13
+ npm install -g jj-language-server
14
+ ```
15
+
16
+ ## Running
17
+
18
+ ```sh
19
+ jj-language-server --stdio
20
+ ```
21
+
22
+ See the **[LSP Configuration Guide](LSP-CONFIGURATION.md)** for detailed setup instructions for VS Code, Neovim, Sublime Text, Emacs, Helix, and GitHub Copilot CLI (Windows/macOS/Linux).
23
+
24
+ ## CLI Options
25
+
26
+ ```
27
+ Usage: jj-language-server [options]
28
+
29
+ Options:
30
+ -V, --version output the version number
31
+ --stdio use stdio (required)
32
+ --log-level <logLevel> Log level: 4=log, 3=info, 2=warn, 1=error (default: 3)
33
+ -h, --help display help for command
34
+ ```
35
+
36
+ ## How It Works
37
+
38
+ Unlike the [Eclipse JDT Language Server](https://github.com/eclipse-jdtls/eclipse.jdt.ls) which requires a JVM, jj-language-server parses Java source code using [java-parser](https://github.com/jhipster/prettier-java/tree/main/packages/java-parser) (a Chevrotain-based parser written in pure JavaScript) and implements the LSP protocol using [vscode-languageserver](https://github.com/microsoft/vscode-languageserver-node).
39
+
40
+ ## Performance Benchmarks
41
+
42
+ Benchmarked against Eclipse JDTLS 1.56 on Spring PetClinic (30 Java files), measured via JSON-RPC over stdio. JDTLS is configured with Maven import (Gradle disabled due to Java toolchain requirements). Both Node.js and Bun runtimes are tested for jj-language-server:
43
+
44
+ | Metric | jj (Node.js) | jj (Bun) | Eclipse JDTLS |
45
+ |---|---|---|---|
46
+ | **Startup time** | **~295 ms** | ~2,200 ms | ~2,350 ms (8×) |
47
+ | **Memory after init** (RSS) | 220 MB | **202 MB** | 2,427 MB |
48
+ | **Memory final** (RSS) | 345 MB | **254 MB** | 2,516 MB |
49
+ | **Bulk open** (30 files) | **~1,500 ms** | ~1,500 ms | ~5,000 ms |
50
+
51
+ ### Operation Latency (avg of 3 runs, largest file)
52
+
53
+ | Operation | jj (Node.js) | jj (Bun) | Eclipse JDTLS |
54
+ |---|---|---|---|
55
+ | `hover` | 3.2 ms | 2.2 ms | **1.9 ms** |
56
+ | `completion` | **1.2 ms** | 3.9 ms | 36.1 ms |
57
+ | `documentSymbol` | **0.6 ms** | 1.3 ms | 1.1 ms |
58
+ | `definition` | 1.5 ms (∅) | 2.1 ms (∅) | 1.5 ms (∅) |
59
+ | `references` | 11 ms | **5.2 ms** | 42.1 ms |
60
+ | `formatting` | 7.5 ms | 24.3 ms | **7 ms** |
61
+ | `codeAction` | **1.3 ms** | **1.3 ms** | 31.6 ms (∅) |
62
+ | `foldingRange` | 1.2 ms | 2.0 ms | **1.1 ms** |
63
+ | `semanticTokens` | 2.9 ms | 3.3 ms | **1.5 ms** |
64
+
65
+ > (∅) = response was null or empty (not yet supported for cross-file definition)
66
+
67
+ > **Key takeaway:** jj-language-server is **30× faster** at completion and **8× faster** at references than JDTLS, while using **7× less memory** (~345 MB vs ~2.5 GB). Bun offers the lowest memory footprint (254 MB final). JDTLS excels at semantic tokens and folding ranges thanks to full type resolution. For cold-start scenarios (opening a project for the first time, CI environments, quick edits), jj-language-server is dramatically faster.
68
+
69
+ Run benchmarks locally:
70
+
71
+ ```bash
72
+ # Download JDTLS, then:
73
+ npm run benchmark # all three (Node.js + Bun + JDTLS)
74
+ npm run benchmark:jj # jj-language-server only (Node.js)
75
+ node benchmarks/lsp-benchmark.mjs --bun-only # jj (Bun) only
76
+ node benchmarks/lsp-benchmark.mjs --no-jdtls # Node.js + Bun, skip JDTLS
77
+ ```
78
+
79
+ ## Development
80
+
81
+ ### Build
82
+
83
+ ```sh
84
+ npm install
85
+ npm run build
86
+ ```
87
+
88
+ ### Test
89
+
90
+ ```sh
91
+ npm test
92
+ ```
93
+
94
+ There are **503 tests** across 35 test files. Integration tests use the [Spring PetClinic](https://github.com/spring-projects/spring-petclinic) project as a realistic fixture. The pinned commit is tracked in `test-fixtures/spring-petclinic-sha.txt`.
95
+
96
+ ### CI / CD
97
+
98
+ | Workflow | Trigger | Description |
99
+ |----------|---------|-------------|
100
+ | **CI** (`.github/workflows/ci.yml`) | PR / push to `main` | Lint, build, test (Node 22 & 24) with Spring PetClinic integration |
101
+ | **Update Spring PetClinic** (`.github/workflows/update-spring-petclinic.yml`) | Weekly (Monday) / manual | Checks for new PetClinic commits, runs tests, opens a PR |
102
+ | **Dependabot** (`.github/dependabot.yml`) | Weekly (Monday) | Updates npm dependencies and GitHub Action versions |
103
+
104
+ ## Features
105
+
106
+ ### ✅ Fully Implemented
107
+
108
+ All features are wired into the LSP server and fully functional:
109
+
110
+ - **Document symbols** — hierarchical: classes, methods, fields, constructors, enums, records, interfaces, annotations
111
+ - **Workspace symbols** — search across all indexed Java files
112
+ - **Code folding** — blocks, methods, imports, comments, annotations
113
+ - **Code formatting** — via Prettier Java, with on-type formatting (auto-indent, auto-close braces)
114
+ - **Selection range** — smart expand/shrink via CST hierarchy
115
+ - **Code lens** — reference counts above declarations
116
+ - **Source generation** — generate constructors, getters/setters, toString, equals/hashCode (real TextEdit insertions)
117
+ - **Diagnostics** — parse errors, duplicate declarations, unused imports, missing return statements, unreachable code, unresolved type references, deprecated API warnings (`@Deprecated`), unresolved method detection, access control violations, missing `@Override` hints
118
+ - **Maven/Gradle parsing** — extracts project metadata, dependencies, source directories, Java version
119
+ - **Javadoc** — parses `/** */` comments, renders in hover & completion
120
+ - **Type hierarchy** — real supertypes/subtypes using symbol table
121
+ - **File watcher** — `workspace/didChangeWatchedFiles` to re-index on external changes
122
+ - **Workspace configuration** — settings for formatter, Java version, classpath hints
123
+ - **Import resolution** — resolves `import` statements, maps unqualified names throughout the file
124
+ - **Type inference** — local variable types, expression types (method calls, field access, literals, operators), type resolver for symbols, members, method return types, field types
125
+ - **JDK API model** — 238 built-in JDK types covering core packages (java.lang, java.util, java.io, java.nio, java.net, java.time, java.sql, java.math, java.text, java.util.concurrent, java.util.stream, java.util.function, java.util.regex, java.security)
126
+ - **Hover** — symbol signatures + JDK type info + Javadoc from source comments + dependency JAR type info via source JARs
127
+ - **Code completion** — scope-aware symbols, JDK types with auto-import, keywords, snippets, overload-aware (each overload shown separately with argument-count ranking)
128
+ - **Signature help** — parameter hints for methods in scope, shows all overloads with best-match selection based on argument count
129
+ - **Go-to-definition** — local + cross-file via workspace index, import-resolved, source JAR navigation for dependency types
130
+ - **Go-to-implementation** — finds subclasses/implementors across workspace
131
+ - **Go-to-type-definition** — navigates to type declaration of a variable
132
+ - **Find references / Document highlight** — finds matching identifiers, cross-file search
133
+ - **Rename** — cross-file rename via workspace index
134
+ - **Semantic tokens** — classifies identifiers via symbol table (20 token types, 10 modifiers), generic type parameter classification
135
+ - **Code actions** — organize imports, extract variable, extract method, extract constant, inline variable, surround with try-catch, add import for JDK types, move class to package, change method signature
136
+ - **Inlay hints** — parameter name hints on method calls, `var` type inference hints (shows inferred type for `var` declarations)
137
+ - **Call hierarchy** — incoming/outgoing calls, cross-file via workspace index
138
+ - **Classpath resolution** — automatically runs `mvn dependency:build-classpath` or Gradle to resolve all transitive dependencies (including downloads); falls back to scanning `~/.m2/repository` and `~/.gradle/caches` if Maven/Gradle CLI is unavailable; detects JDK path and version
139
+ - **Java class file reader** — parses `.class` files from JARs to extract type metadata (classes, methods, fields, access flags) without a JVM
140
+ - **JAR type index** — builds a searchable type index from resolved dependency JARs (ZIP parsing, class extraction, type search)
141
+ - **Annotation processing** — Lombok support (`@Data`, `@Getter`, `@Setter`, `@Builder`, `@Value`, `@Slf4j`, `@NoArgsConstructor`, `@AllArgsConstructor`, `@RequiredArgsConstructor`) and Spring annotations (`@Component`, `@Service`, `@RestController`, `@GetMapping`, etc.); integrated into symbol table
142
+ - **Document cache** — version-aware caching with debounced reparsing for performance
143
+ - **Multi-root workspace** — supports multiple workspace folders, each with its own index; handles `workspace/didChangeWorkspaceFolders`
144
+ - **Linked editing ranges** — synchronized editing of all occurrences of an identifier
145
+ - **Generics support** — type parameters extracted from classes, interfaces, methods; classified in semantic tokens; bounded type parameter tracking
146
+ - **Source JAR navigation** — go-to-definition into dependency source JARs with virtual URI scheme, Javadoc from source JARs in hover
147
+
148
+ ### Roadmap
149
+
150
+ | Phase | Focus | Status |
151
+ |-------|-------|--------|
152
+ | 1. Semantic Diagnostics | Parse-level semantic checks | ✅ Done |
153
+ | 2. Source Generation | Constructor, getters/setters, toString, equals/hashCode | ✅ Done |
154
+ | 3. Enhanced Features | Real code action edits, semantic tokens, cross-file rename | ✅ Done |
155
+ | 4. Navigation | Go-to-implementation, type definition, improved cross-file def | ✅ Done |
156
+ | 5. Quick Wins | Javadoc extraction, type hierarchy wiring, file watcher, workspace config | ✅ Done |
157
+ | 6. Type Resolution | Import resolution, local type inference, expression types, type resolver | ✅ Done |
158
+ | 7. Advanced Diagnostics | Deprecated warnings, unresolved methods, access control, missing @Override | ✅ Done |
159
+ | 8. Advanced Refactoring | Extract method, extract constant, inline variable | ✅ Done |
160
+ | 9. Classpath Resolution | Classpath resolver, class file reader, JDK model, annotation processing | ✅ Done |
161
+ | 10. Performance & Polish | Document cache, multi-root workspace, linked editing, document links | ✅ Done |
162
+ | 11. Quick Wins | `var` inlay hints, cross-file call hierarchy | ✅ Done |
163
+ | 12. Generics Foundation | Type parameters in symbol table, semantic token classification | ✅ Done |
164
+ | 13. Overload Resolution | Overload-aware completion, best-match signature help | ✅ Done |
165
+ | 14. Advanced Refactoring | Move class to package, change method signature | ✅ Done |
166
+ | 15. Source JAR Navigation | Source JAR extraction/caching, go-to-definition into JARs | ✅ Done |
167
+
168
+ ## License
169
+
170
+ [Apache-2.0](LICENSE)
package/lib/cli.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=cli.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":""}