Skip to content

Add decompile module#221

Merged
tartarughina merged 4 commits intozed-extensions:mainfrom
tartarughina:virtual-files
Apr 19, 2026
Merged

Add decompile module#221
tartarughina merged 4 commits intozed-extensions:mainfrom
tartarughina:virtual-files

Conversation

@tartarughina
Copy link
Copy Markdown
Collaborator

Implement a workaround to get decompiled files working within Zed.
The proxy intercepts definitions requests being returned from JDTLS with a URI starting with jdt:// and creates a temp java file which Zed is then able to read and further decompilation can happen.

To work, JDTLS needs to receive additional client capabilities within the initialization options. If the user has not set such the extension will enable those by default.

Cache decompiled Java class files and rewrite jdt://
URIs in definition/typeDefinition/implementation responses
to point to local file URIs instead.
Remove the unused `lsp_info!` macro import from decompile.rs and
clean up verbose logging throughout the decompile and proxy code.
Replace generic log messages with more specific ones where useful.

Improve cache_path parsing to handle URL-encoded class names in
jdt:// URIs more robustly.

Set extendedClientCapabilities defaults in Java language server
initialization options.
Extracted platform-specific logic for converting paths to `file://`
URIs into a dedicated function. Unix and Windows require different
handling due to path separator differences.
Copy link
Copy Markdown
Collaborator

@playdohface playdohface left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work!

@tartarughina tartarughina merged commit c55c60a into zed-extensions:main Apr 19, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants