Fix decompiled.javaClass editor in WSL #4189
Merged
+3
−0
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.
This PR fixes #4114
Problem
When using the extension in Windows Subsystem for Linux (WSL), the
decompiled.javaClass
editor does not work properly. Opening a.class
file results in an error text, "The file is not displayed in the text editor because it is either binary or uses an unsupported text encoding."Screenshot
Clicking "Open Anyway" opens the raw bytecode rather than the decompiled sources:
Screenshot
When right-clicking a
.class
file and selecting "Open With...", thedecompiled.javaClass
editor is not listed:Screenshot
Solution
By adding a new filename pattern to the
package.json
file, the issue is gone. Opening a.class
file directly shows the decompiled code, and the "Open With..." dialog also lists thedecompiled.javaClass
editor.Screenshots