-
Notifications
You must be signed in to change notification settings - Fork 458
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
Provision of Spotless Eclipse XML formatter plugin. #230
Conversation
The positive aspects are:
On the downside, we would need an interface extension, since the XSD/DTD location might be relative to the file which shall be formatted. Please have a look whether you can agree first of all to the interface extension. In that case I can continue to work on a proposal for |
Wow! I don't know much about XML, but this looks really powerful! Lots of know-how went into mocking out the eclipse bundle system, great work! It seems that all the links just go to the top of the diff. I looked at all the files, but I'm not sure what you're referencing re: interface extension. As far as publishing and releasing this as a fat jar, I give it a thumbs-up, once I understand the interface extension idea. It looks like the biggest remaining challenge will be the user-interface and documentation. Since this is all in |
The normal interface is: This violates the simple/efficient concept of Spotless formatters where you just build up a chain of String processors. Possible work-around would be to analyze all XML files first and generate an "internal catalog", but that's quite error prone... Before merge, we should discuss whether I should instead of providing a XML formatter plugin, I should provide a WDT plugin, that supports also JS/HTML formatting. I made a corresponding proposal for #162 . |
If an XSD/DTD/XInclude file changes, can that change the formatting of another file? If so, then either: A) these XSD/DTD/XInclude files need to be captured as config files in the step's state anyway. we do something on this scale with I'm fine with either outcome. We won't have to change interfaces, because the raw file is already available (originally intended for skipping spotless/lib/src/main/java/com/diffplug/spotless/FormatterStep.java Lines 34 to 46 in 24fd9b1
|
Glad to here that it has not that much code impact. About the "up-to-data" check: To conclude: As stated in previous comment, the provision of a WDT plugin instead of the XML plugin might be useful for the further development of spotless. Any thoughts on this one? |
Sounds good. If we just do Re: WDT, if you want to use WDT, then I want to add it. If you're only adding WDT in case other people might want it, then I think we should leave it out. It's easy to build things, but it's hard to be sure that they're useful unless you're actually using them on real projects with real people. |
WDT I use, but I only use Core/XML/XSD/XSD. |
I think there's probably a pretty good hunk of demand for your eclipse mocking as its own library! Happy for it to live and publish from _ext for however long you would like, but I bet it could find new users of its own for other applications as |
The branch will be split into eclipse-base (containing Spotless OSIG bundle controller and Eclipse services) and eclipse-wdt (extension of current eclipse-xml also supporting WDT formatter for JS and HTML). |
XML formatter plugin based on Eclipse WTP-WST for #140.