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
Copy file name to clipboardexpand all lines: CHANGES.md
+2
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,8 @@ You might be looking for:
7
7
8
8
### Version 1.18.0-SNAPSHOT - TBD (javadoc [lib](https://diffplug.github.io/spotless/javadoc/spotless-lib/snapshot/)[lib-extra](https://diffplug.github.io/spotless/javadoc/spotless-lib-extra/snapshot/), [snapshot repo](https://oss.sonatype.org/content/repositories/snapshots/com/diffplug/spotless/))
9
9
10
+
* CSS and XML extensions are discontinued ([#325](https://github.com/diffplug/spotless/pull/325)).
11
+
10
12
### Version 1.17.0 - October 30th 2018 (javadoc [lib](https://diffplug.github.io/spotless/javadoc/spotless-lib/1.17.0/)[lib-extra](https://diffplug.github.io/spotless/javadoc/spotless-lib-extra/1.17.0/), artifact [lib]([jcenter](https://bintray.com/diffplug/opensource/spotless-lib), [lib-extra]([jcenter](https://bintray.com/diffplug/opensource/spotless-lib-extra)))
11
13
12
14
* Updated default eclipse-jdt from 4.7.3a to 4.9.0 ([#316](https://github.com/diffplug/spotless/pull/316)). New version addresses enum-tab formatting bug in 4.8 ([#314](https://github.com/diffplug/spotless/issues/314)).
Copy file name to clipboardexpand all lines: plugin-gradle/CHANGES.md
+2
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,8 @@
2
2
3
3
### Version 3.18.0-SNAPSHOT - TBD ([javadoc](https://diffplug.github.io/spotless/javadoc/snapshot/), [snapshot](https://oss.sonatype.org/content/repositories/snapshots/com/diffplug/spotless/spotless-plugin-gradle/))
4
4
5
+
* Provided eclipse-wtp formatters in generic formatter extension. ([#325](https://github.com/diffplug/spotless/pull/325)). This change obsoletes the CSS and XML extensions.
6
+
5
7
### Version 3.17.0 - December 13th 2018 ([javadoc](https://diffplug.github.io/spotless/javadoc/spotless-plugin-gradle/3.17.0/), [jcenter](https://bintray.com/diffplug/opensource/spotless-plugin-gradle/3.17.0))
6
8
7
9
* Updated default eclipse-jdt from 4.7.3a to 4.9.0 ([#316](https://github.com/diffplug/spotless/pull/316)). New version addresses enum-tab formatting bug in 4.8 ([#314](https://github.com/diffplug/spotless/issues/314)).
*[FreshMark](https://github.com/diffplug/freshmark) (markdown with variables)
@@ -321,55 +320,6 @@ spotless {
321
320
322
321
Use the Eclipse to define the *Code Style preferences* (see [Eclipse documentation](https://www.eclipse.org/documentation/)). Within the preferences *Edit...* dialog, you can export your configuration as XML file, which can be used as a `configFile`. If no `configFile` is provided, the CDT default configuration is used.
323
322
324
-
<aname="css-wtp"></a>
325
-
326
-
## Applying to CSS sources
327
-
328
-
```gradle
329
-
spotless {
330
-
css {
331
-
target '**/*.css' '**/*.css2'// Change file filter. By default files with 'css' extension are supported
332
-
eclipse().configFile './css-formatter.prefs' // Properties file of the Eclipse WTP formatter
333
-
// Use for example eclipse('4.7.3a') to specify a specific version of Eclipse,
334
-
// available versions are: https://github.com/diffplug/spotless/tree/master/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_wtp_formatters
335
-
// also supports license headers
336
-
licenseHeader '<!-- Licensed under Apache-2.0 -->' // License header
Use Eclipse to define the *CSS Files* editor preferences (see [Eclipse documentation](http://help.eclipse.org/photon/topic/org.eclipse.wst.sse.doc.user/topics/tsrcedt025.html)) and the *Cleanup* preferences available in the *Source* menu (when editing a CSS file). The preferences are stored below your Eclipse workspace directory in `.metadata/.plugins/org.eclipse.core.runtime/org.eclipse.wst.css.core.prefs`. Note that only the differences to the default configuration are stored within the file. Omit the 'configFile' entirely to use the default Eclipse configuration.
346
-
347
-
<aname="xml-wtp"></a>
348
-
349
-
## Applying to XML sources
350
-
351
-
```gradle
352
-
spotless {
353
-
xml {
354
-
target '**/*.xml' // Change file filter. By default files with 'xml', 'xsl', 'xslt', 'wsdl', 'xsd', 'exsd' and 'xmi' extension are supported
355
-
eclipse().configFile './xml-formatter.prefs' // Properties file of the Eclipse WTP formatter
356
-
// Use for example eclipse('4.7.3a') to specify a specific version of Eclipse,
357
-
// available versions are: https://github.com/diffplug/spotless/tree/master/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_wtp_formatters
358
-
// also supports license headers
359
-
licenseHeader '<!-- Licensed under Apache-2.0 -->' // License header
### Eclipse [WTP](https://www.eclipse.org/webtools/) XML formatter
368
-
Use Eclipse to define the *XML editor preferences* (see [Eclipse documentation](https://www.eclipse.org/documentation/)). The preferences are stored below your Eclipse workspace directory in `.metadata/.plugins/org.eclipse.core.runtime/org.eclipse.wst.xml.core.prefs`. Note that only the differences to the default configuration are stored within the file. Omit the 'configFile' entirely to use the default Eclipse configuration.
369
-
370
-
The Eclipse WTP formatter supports DTD/XSD restrictions on white spaces. For XSD/DTD lookup, relative and absolute XSD/DTD URIs are supported. Furthermore a user catalog can be configured using the `userCatalog` property key. Add the property to the preference file or add an additional preference or properties files as an additional argument to the `configFile`.
371
-
372
-
373
323
<aname="typescript"></a>
374
324
375
325
## Applying to Typescript source
@@ -510,6 +460,41 @@ spotless {
510
460
511
461
Spotless uses npm to install necessary packages locally. It runs prettier using [J2V8](https://github.com/eclipsesource/J2V8) internally after that.
512
462
463
+
<aname="eclipse-wtp"></a>
464
+
465
+
## Applying [Eclipse WTP](https://www.eclipse.org/webtools/) to css | html | etc.
466
+
467
+
The Eclipse [WTP](https://www.eclipse.org/webtools/) formatter can be applied as follows:
468
+
469
+
```gradle
470
+
spotless {
471
+
format 'xml', {
472
+
target fileTree('.') {
473
+
include '**/*.xml', '**/*.xsd'
474
+
exclude '**/build/**'
475
+
}
476
+
// Use for example eclipseWtp('xml', '4.7.3a') to specify a specific version of Eclipse,
477
+
// available versions are: https://github.com/diffplug/spotless/tree/master/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_wtp_formatters
The WTP formatter accept multiple configuration files. All Eclipse configuration file formats are accepted as well as simple Java property files. Omit the `configFile` entirely to use the default Eclipse configuration. The following formatters and configurations are supported:
0 commit comments