Repository navigation
fix(generator): "Align equal signs within groups" preference has no effect on keys after the first in each group - #53
Merged
Conversation
unknowIfGuestInDream
marked this pull request as ready for review
May 15, 2026 12:40
unknowIfGuestInDream
self-requested a review
May 15, 2026 12:40
Copilot
AI
changed the title
[WIP] Fix align equal signs within groups functionality
fix(generator): "Align equal signs within groups" preference has no effect on keys after the first in each group
May 15, 2026
…bled for grouped keys Agent-Logs-Url: https://github.com/tlcsdm/eclipse-rbe/sessions/8455d053-a604-4851-9486-216a7a8ddc32 Co-authored-by: unknowIfGuestInDream <57802425+unknowIfGuestInDream@users.noreply.github.com>
unknowIfGuestInDream
force-pushed
the
copilot/fix-align-equal-signs
branch
from
May 15, 2026 12:47
ea8d98f to
675a1da
Compare
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.
When
groupKeysis enabled,equalIndexwas computed once per group (for the first key) and reused for all subsequent keys in that group. With alignment disabled (alignEqualSigns=falseorgroupAlignEqualSigns=false),getEqualIndex()returnskey.length()— correct for the first key, but wrong for every other key in the group, which has a different length. Result: equal signs were misaligned regardless of the preference setting.Change
Added an
else ifto the group-processing loop inPropertiesGenerator.generate()that updatesequalIndexper-key whenever alignment is disabled:The expensive
getEqualIndex()loop (which scans all keys) is still only called once per group when alignment is actually on. The no-alignment path is now a cheap direct assignment ofkey.length(), consistent with whatgetEqualIndex()already returns for the first key in those cases.