Repository navigation
Add --realignLineNumbers option - #184
Merged
kwart merged 16 commits intoNov 22, 2026
Merged
Conversation
Closes intoolswetrust#102 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…dering Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Compile the sample with --release 17 and showcase member re-ordering with explicit members (the implicit inner class constructor is not emitted by javac 17). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…lignLineNumbers Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ked sample Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…t file Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…chain to the test Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ring builder chains Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…lign fixture Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…lign fixture Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Member
|
Thanks a lot for this, @nbauma109! The option works well. I tried it from the CLI and statements land on their original lines, and the default method on I'm merging it as is. We'll do a few small follow-ups ourselves afterwards. |
Contributor
Author
|
You're welcome ! |
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 #102.
Adds a
--realignLineNumbers/-rnoption which passes jd-core'srealignLineNumbersconfiguration to the decompiler, so that the statements of the decompiled code land on the same line numbers as in the original source (e.g. to set breakpoints or read stack traces against it). It needs line number debug info in the classes, and can be combined with--displayLineNumbers.DecompilerOptions.isRealignLineNumbers()is a default method returningfalse, so existing implementers still compile.JavaDecompilerpasses the option in the configuration map of jd-core.--helpdescribe the option. Note that jd-core orders fields, methods and inner classes by their original line number whether the option is enabled or not.JavaDecompilerTest.realignLineNumbersTestdecompiles a sample with builder chains (one call per line, with javadoc) and compares the whole output, with the line numbers displayed, with an expected file.It was reviewed and built on a fork before: nbauma109#6
🤖 Generated with Claude Code