-
Notifications
You must be signed in to change notification settings - Fork 459
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
Add support for JSP/JSF in eclipse WTP #645
Comments
I can confirm the problem. I integrated your example quickly into a unit test for HTML formatting. Looking at the code, it seems that in the end the JSP/JSF formatting is based on HTTP formatter. This also corresponds to Eclipse documentation. I suspect that Eclipse Webtools-JSF has a feature which provides some JSP/JSF format tweaks, but not sure. |
@vbrandl I am afraid I personally have right at the moment no time to provide an extension. Should not be that difficult, but some digging in the Eclipse code/config is required. So if you want to provide something, I can give you a quick tour through the |
style
attribute becomes invalid when formatting
I have the same problem, and some more info: the problems seems specifically related to the usage of EL expressions inside a style="" attribute.
But when I change style="" by something else as a test: So I suspect the problem might be related to formatting of embedded CSS? |
Of course there is an issue with that, but... I've got o huge project with JSF and Spotless. We use WTP and there are really a few issues on thousands of pages. I'd never use this kind of inline CSS. In any CSS framework there will be classes like none or display-none or something like this. We have or own
to
eclipse WTP formatter won't protest. The only main issue with WTP and JSF we have is that it forces |
You can always modify the behavior by following the eclipse step with a |
@nedtwigg, Thanks! After some tries it worked! Since maven properties are trimmed I had to go with:
BTW. In the time you wrote this, a replacement in the replace could not be empty (this change was released 3 days after 😃), so I also had to update my maven plugin. |
The broader issue of support JSP/JSF in WTP is possible by finishing #1622. |
PRs welcome, but I think this is unlikely to ever happen. |
When formatting some JSF inside a
style
attribute, the formatter destroys the JSF by stripping the closing}
.This happens on Gradle 6.4.1 with the plugin version 5.0.0 as well as with Gradle 6.0.1 and plugin version 4.3.0.
Here is a minimal example to reproduce the issue: https://github.com/vbrandl/spotless-formatting-jsf-reprod
After running
./gradlew spotlessApply
in the repository, the diff looks like this:The following configuration is used:
The text was updated successfully, but these errors were encountered: