Repository navigation
Conversation
xmlIdentifierAcceptor now accepts only characters for which Character.isJavaIdentifierPart is true, which keeps letters, digits, and underscore in the word and excludes punctuation. XmlCamelCaseInterceptor is registered for text/xml and, when the useCamelCaseStyleNavigation preference is on, sets the next or previous offset to an uppercase boundary inside a TAG, ARGUMENT, TEXT, VALUE, PI_TARGET, PI_CONTENT, or CDATA_SECTION token, and only while the run up to that boundary is still an identifier. A disabled preference, a non-text token such as a comment, or a rejected character before the hump leaves the offset unset so the default word scan runs. XmlCamelCaseInterceptorTest covers the acceptor and those forward, backward, punctuation, markup, and comment offsets. Fixes apache#9664 Assisted-by: AI
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.
LLMs, Commit messages and PR description:
xmlIdentifierAcceptor now accepts only characters for which Character.isJavaIdentifierPart is true, which keeps letters, digits, and underscore in the word and excludes punctuation. XmlCamelCaseInterceptor is registered for text/xml and, when the useCamelCaseStyleNavigation preference is on, sets the next or previous offset to an uppercase boundary inside a TAG, ARGUMENT, TEXT, VALUE, PI_TARGET, PI_CONTENT, or CDATA_SECTION token, and only while the run up to that boundary is still an identifier. A disabled preference, a non-text token such as a comment, or a rejected character before the hump leaves the offset unset so the default word scan runs. XmlCamelCaseInterceptorTest covers the acceptor and those forward, backward, punctuation, markup, and comment offsets.
In an XML buffer such as a Maven POM, Ctrl-Shift-Left and Ctrl-Shift-Right extend the selection across a whole element name or value. Movement does not stop at punctuation in values such as org.apache.maven or maven-compiler-plugin, or at camel-case boundaries in names such as artifactId. The XML identifier acceptor treated every character as part of a word except whitespace and the markup characters <, >, &, quotes, slash, and backslash, so dots and hyphens stayed inside the word. text/xml had no CamelCaseInterceptor, so a run of identifier characters was never split where a lowercase sequence meets an uppercase letter.
Fixes #9664
PR approval and merge checklist:
If this PR targets the delivery branch: don't merge. (full wiki article)
AI was used for assistance.