Repository navigation
fix(xtext): count selector fragment siblings the way they are resolved - #1585
Open
joaodinissf wants to merge 1 commit into
Open
joaodinissf wants to merge 1 commit into
joaodinissf wants to merge 1 commit into
Conversation
computeSelectorFragmentSegment counted earlier siblings with the same selector value using equals(), while getEObjectFromSegment matches them ignoring case unless the class is an ICaseSensitiveNamedElement. For a case-insensitive class with siblings "foo" and "FOO", the fragment of "FOO" got index 0 and resolved to "foo". Both sides now use the same comparison. Fragments change only for case-insensitive siblings whose selector values differ only in case. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
joaodinissf
marked this pull request as ready for review
October 29, 2026 13:34
joaodinissf
enabled auto-merge
October 29, 2026 13:43
This branch has not been deployed
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.
AbstractSelectorFragmentProvidercounted earlier siblings with the same selector value usingequals()when computing a fragment, butgetEObjectFromSegmentmatches them ignoring case unless the class is anICaseSensitiveNamedElement. For a case-insensitive class with siblingsfooandFOO, the fragment ofFOOwas…(…='FOO')#0, which resolved tofoo. References, index entries and navigation toFOOsilently landed onfoo.Both sides now use one
matcheshelper.Scope
.exportdeclares a non-uniqueuri-fragment = attribute(...)on a type that isn't anICaseSensitiveNamedElement, with siblings whose values differ only in case (for example overloads in a case-insensitive language). DDK's own languages don't useuri-fragment.uniqueform is unchanged.Tests. These are the first case-sensitivity tests in
AbstractSelectorFragmentProviderTest, using a dynamic EMF model:fooandFOO;'FOO'tofoo;fooandFOOeach round-trip to themselves. This fails without the fix.Follow-up to #1584.
🤖 Generated with Claude Code