-
Notifications
You must be signed in to change notification settings - Fork 908
improve jsf class autocomplete #8550
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
enterprise/web.jsf.editor/src/org/netbeans/modules/web/jsf/editor/HtmlSourceTask.java
Outdated
Show resolved
Hide resolved
enterprise/web.jsf.editor/src/org/netbeans/modules/web/jsf/editor/HtmlSourceTask.java
Outdated
Show resolved
Hide resolved
enterprise/web.jsf.editor/src/org/netbeans/modules/web/jsf/editor/HtmlSourceTask.java
Show resolved
Hide resolved
Updated and squashed |
In general looks sane to me. But given that this a heuristic, we might try to draw a cleaner line: looking at the "now supported" list, I notice, that using the logic "ends with classes or class" would work too and reduce possible false positives. I don't remember whether JSF is case sensitive regarding its attributes, if so, not normalizing casing to lowercase might add another factor. |
Makes sense. I'll give it a try. |
It works. Updated and squashed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change looks sane and survived a quick local test. Lets get this in.
@NicolaIsotta thank you!
This PR aims at improving the logic/heuristic behind the recognition of attributes of faces components as css classes.
In the current version, only the standard "h" library is considered; this PR adds third-party libraries (eg. PrimeFaces) as well. It also simplifies/improves the logic behind the attribute recognition.
I have tested using the primefaces-test project and the new logic seems to work well, here's the result of my tests:
Attributes found with the current logic
Attributes found with the PR applied
^Add meaningful description above
Click to collapse/expand PR instructions
By opening a pull request you confirm that, unless explicitly stated otherwise, the changes -
Please make sure (eg.
git log
) that all commits have a valid name and email address for you in the Author field.If you're a first time contributor, see the Contributing guidelines for more information.
If you're a committer, please label the PR before pressing "Create pull request" so that the right test jobs can run.
PR approval and merge checklist:
If this PR targets the delivery branch: don't merge. (full wiki article)