You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Language controls in the toolbar only sets the language used to parse / syntax color the editor:
But the XPath autocomplete / actual rule language is managed separately down here:
it's fixed upon creation. So if I change the language in the toolbar, the editor will immediately respond, but the XPath editor will continue working on the previous language until I manually click on the "+" to create a new rule for the current language.
This is particularly bad considering that the XPath expression will match against the current code regardless of the target language, so I can write an expression, have it work, but then upon exporting it, have it published for a separate language.
I think the most intuitive thing would be to drop the language from the xpath editor, and have it bound to always match the language set in the code editor.
To Reproduce
Steps to reproduce the behavior:
Launch the designer from pmd designer
Notice the current language. If Java switch to XML. If not Java, switch to Java.
Notice the editor automatically matches the new language.
Notice the rule tab says "java/NewRule" or "xml/NewRule", and this is a mismatch to the current editor language.
Click "+" to add a new rule tab, which should now be "java/NewRule" or "xml/NewRule", this time matching the current editor language.
In the "java/NewRule" editor, notice it suggests to autocomplete with Java AST nodes.
Write any valid expression for the current editor language into both rules. Notice they match regardless of current language.
Try and export both "working" rules for the current editor language. Notice them being exported for either "java" or "xml" accordingly.
The text was updated successfully, but these errors were encountered:
Language controls in the toolbar only sets the language used to parse / syntax color the editor:
But the XPath autocomplete / actual rule language is managed separately down here:
it's fixed upon creation. So if I change the language in the toolbar, the editor will immediately respond, but the XPath editor will continue working on the previous language until I manually click on the "+" to create a new rule for the current language.
This is particularly bad considering that the XPath expression will match against the current code regardless of the target language, so I can write an expression, have it work, but then upon exporting it, have it published for a separate language.
I think the most intuitive thing would be to drop the language from the xpath editor, and have it bound to always match the language set in the code editor.
To Reproduce
Steps to reproduce the behavior:
pmd designer
The text was updated successfully, but these errors were encountered: