From 9f36088a80dd0b23977475ceef05b8e6be117782 Mon Sep 17 00:00:00 2001 From: Frank Vennemeyer Date: Fri, 24 Sep 2021 11:01:40 +0200 Subject: [PATCH] Added Eclipse 4.21 support. --- CHANGES.md | 2 ++ .../extra/cpp/EclipseCdtFormatterStep.java | 2 +- .../extra/java/EclipseJdtFormatterStep.java | 2 +- .../extra/wtp/EclipseWtpFormatterStep.java | 2 +- .../eclipse_cdt_formatter/v4.21.0.lockfile | 22 ++++++++++++++++ .../eclipse_jdt_formatter/v4.21.0.lockfile | 20 ++++++++++++++ .../eclipse_wtp_formatters/v4.21.0.lockfile | 26 +++++++++++++++++++ .../cpp/EclipseCdtFormatterStepTest.java | 2 +- .../java/EclipseJdtFormatterStepTest.java | 2 +- .../wtp/EclipseWtpFormatterCommonTests.java | 2 +- plugin-gradle/CHANGES.md | 2 ++ plugin-maven/CHANGES.md | 2 ++ 12 files changed, 80 insertions(+), 6 deletions(-) create mode 100644 lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_cdt_formatter/v4.21.0.lockfile create mode 100644 lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_jdt_formatter/v4.21.0.lockfile create mode 100644 lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_wtp_formatters/v4.21.0.lockfile diff --git a/CHANGES.md b/CHANGES.md index b9090953a9..242186767f 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -10,6 +10,8 @@ This document is intended for Spotless developers. We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format (starting after version `1.27.0`). ## [Unreleased] +### Changed +* Added support and bump Eclipse formatter default versions to `4.21` for `eclipse-cdt`, `eclipse-jdt`, `eclipse-wtp`. Change is only applied for JVM 11+. ## [2.16.1] - 2021-09-20 ### Changed diff --git a/lib-extra/src/main/java/com/diffplug/spotless/extra/cpp/EclipseCdtFormatterStep.java b/lib-extra/src/main/java/com/diffplug/spotless/extra/cpp/EclipseCdtFormatterStep.java index bb07d968f5..4c2b06fc9a 100644 --- a/lib-extra/src/main/java/com/diffplug/spotless/extra/cpp/EclipseCdtFormatterStep.java +++ b/lib-extra/src/main/java/com/diffplug/spotless/extra/cpp/EclipseCdtFormatterStep.java @@ -38,7 +38,7 @@ private EclipseCdtFormatterStep() {} private static final String NAME = "eclipse cdt formatter"; private static final String FORMATTER_CLASS = "com.diffplug.spotless.extra.eclipse.cdt.EclipseCdtFormatterStepImpl"; private static final String FORMATTER_METHOD = "format"; - private static final Jvm.Support JVM_SUPPORT = Jvm. support(NAME).add(8, "4.16.0").add(11, "4.20.0"); + private static final Jvm.Support JVM_SUPPORT = Jvm. support(NAME).add(8, "4.16.0").add(11, "4.21.0"); public static String defaultVersion() { return JVM_SUPPORT.getRecommendedFormatterVersion(); diff --git a/lib-extra/src/main/java/com/diffplug/spotless/extra/java/EclipseJdtFormatterStep.java b/lib-extra/src/main/java/com/diffplug/spotless/extra/java/EclipseJdtFormatterStep.java index 22b8c78440..86077805a4 100644 --- a/lib-extra/src/main/java/com/diffplug/spotless/extra/java/EclipseJdtFormatterStep.java +++ b/lib-extra/src/main/java/com/diffplug/spotless/extra/java/EclipseJdtFormatterStep.java @@ -34,7 +34,7 @@ private EclipseJdtFormatterStep() {} private static final String FORMATTER_CLASS = "com.diffplug.spotless.extra.eclipse.java.EclipseJdtFormatterStepImpl"; private static final String MAVEN_GROUP_ARTIFACT = "com.diffplug.spotless:spotless-eclipse-jdt"; private static final String FORMATTER_METHOD = "format"; - private static final Jvm.Support JVM_SUPPORT = Jvm. support(NAME).add(8, "4.19.0").add(11, "4.20.0"); + private static final Jvm.Support JVM_SUPPORT = Jvm. support(NAME).add(8, "4.19.0").add(11, "4.21.0"); public static String defaultVersion() { return JVM_SUPPORT.getRecommendedFormatterVersion(); diff --git a/lib-extra/src/main/java/com/diffplug/spotless/extra/wtp/EclipseWtpFormatterStep.java b/lib-extra/src/main/java/com/diffplug/spotless/extra/wtp/EclipseWtpFormatterStep.java index c638532d70..2ffc9a94ec 100644 --- a/lib-extra/src/main/java/com/diffplug/spotless/extra/wtp/EclipseWtpFormatterStep.java +++ b/lib-extra/src/main/java/com/diffplug/spotless/extra/wtp/EclipseWtpFormatterStep.java @@ -38,7 +38,7 @@ public enum EclipseWtpFormatterStep { private static final String NAME = "eclipse wtp formatters"; private static final String FORMATTER_PACKAGE = "com.diffplug.spotless.extra.eclipse.wtp."; - private static final Jvm.Support JVM_SUPPORT = Jvm. support(NAME).add(8, "4.18.0").add(11, "4.20.0"); + private static final Jvm.Support JVM_SUPPORT = Jvm. support(NAME).add(8, "4.18.0").add(11, "4.21.0"); private static final String FORMATTER_METHOD = "format"; private final String implementationClassName; diff --git a/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_cdt_formatter/v4.21.0.lockfile b/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_cdt_formatter/v4.21.0.lockfile new file mode 100644 index 0000000000..a1be4b3058 --- /dev/null +++ b/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_cdt_formatter/v4.21.0.lockfile @@ -0,0 +1,22 @@ +# Spotless formatter based on CDT version 10.4 (see https://www.eclipse.org/cdt/) +com.diffplug.spotless:spotless-eclipse-cdt:10.4.0 +com.diffplug.spotless:spotless-eclipse-base:3.5.0 +com.github.spotbugs:spotbugs-annotations:4.0.2 +com.google.code.findbugs:jsr305:3.0.2 +com.ibm.icu:icu4j:67.1 +net.jcip:jcip-annotations:1.0 +org.eclipse.platform:org.eclipse.core.commands:3.10.100 +org.eclipse.platform:org.eclipse.core.contenttype:3.8.0 +org.eclipse.platform:org.eclipse.core.filebuffers:3.7.0 +org.eclipse.platform:org.eclipse.core.filesystem:1.9.100 +org.eclipse.platform:org.eclipse.core.jobs:3.12.0 +org.eclipse.platform:org.eclipse.core.resources:3.15.100 +org.eclipse.platform:org.eclipse.core.runtime:3.23.0 +org.eclipse.platform:org.eclipse.equinox.app:1.6.0 +org.eclipse.platform:org.eclipse.equinox.common:3.15.0 +org.eclipse.platform:org.eclipse.equinox.preferences:3.9.0 +org.eclipse.platform:org.eclipse.equinox.registry:3.11.0 +org.eclipse.platform:org.eclipse.jface.text:3.18.100 +org.eclipse.platform:org.eclipse.jface:3.23.0 +org.eclipse.platform:org.eclipse.osgi:3.17.0 +org.eclipse.platform:org.eclipse.text:3.12.0 diff --git a/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_jdt_formatter/v4.21.0.lockfile b/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_jdt_formatter/v4.21.0.lockfile new file mode 100644 index 0000000000..b250a74e98 --- /dev/null +++ b/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_jdt_formatter/v4.21.0.lockfile @@ -0,0 +1,20 @@ +# Spotless formatter based on JDT version 4.21.0 (see https://projects.eclipse.org/projects/eclipse.jdt) +# Compare tag in M2 pom with https://git.eclipse.org/c/jdt/eclipse.jdt.core.git/log/?h=R4_21 to determine core version. +com.diffplug.spotless:spotless-eclipse-jdt:4.8.0 +com.diffplug.spotless:spotless-eclipse-base:3.5.0 +com.github.spotbugs:spotbugs-annotations:4.0.2 +com.google.code.findbugs:jsr305:3.0.2 +net.jcip:jcip-annotations:1.0 +org.eclipse.jdt:org.eclipse.jdt.core:3.27.0 +org.eclipse.platform:org.eclipse.core.commands:3.10.100 +org.eclipse.platform:org.eclipse.core.contenttype:3.8.0 +org.eclipse.platform:org.eclipse.core.filesystem:1.9.100 +org.eclipse.platform:org.eclipse.core.jobs:3.12.0 +org.eclipse.platform:org.eclipse.core.resources:3.15.100 +org.eclipse.platform:org.eclipse.core.runtime:3.23.0 +org.eclipse.platform:org.eclipse.equinox.app:1.6.0 +org.eclipse.platform:org.eclipse.equinox.common:3.15.0 +org.eclipse.platform:org.eclipse.equinox.preferences:3.9.0 +org.eclipse.platform:org.eclipse.equinox.registry:3.11.0 +org.eclipse.platform:org.eclipse.osgi:3.17.0 +org.eclipse.platform:org.eclipse.text:3.12.0 diff --git a/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_wtp_formatters/v4.21.0.lockfile b/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_wtp_formatters/v4.21.0.lockfile new file mode 100644 index 0000000000..b59bb0af9a --- /dev/null +++ b/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_wtp_formatters/v4.21.0.lockfile @@ -0,0 +1,26 @@ +# Spotless formatter based on Eclipse-WTP version 3.23 (see https://www.eclipse.org/webtools/) +com.diffplug.spotless:spotless-eclipse-wtp:3.23.0 +com.diffplug.spotless:spotless-eclipse-base:3.5.0 +com.github.spotbugs:spotbugs-annotations:4.0.2 +com.google.code.findbugs:jsr305:3.0.2 +com.ibm.icu:icu4j:67.1 +net.jcip:jcip-annotations:1.0 +org.eclipse.emf:org.eclipse.emf.common:2.23.0 +org.eclipse.emf:org.eclipse.emf.ecore:2.25.0 +org.eclipse.emf:org.eclipse.xsd:2.18.0 +org.eclipse.platform:org.eclipse.core.commands:3.10.100 +org.eclipse.platform:org.eclipse.core.contenttype:3.8.0 +org.eclipse.platform:org.eclipse.core.filebuffers:3.7.0 +org.eclipse.platform:org.eclipse.core.filesystem:1.9.100 +org.eclipse.platform:org.eclipse.core.jobs:3.12.0 +org.eclipse.platform:org.eclipse.core.resources:3.15.100 +org.eclipse.platform:org.eclipse.core.runtime:3.23.0 +org.eclipse.platform:org.eclipse.equinox.app:1.6.0 +org.eclipse.platform:org.eclipse.equinox.common:3.15.0 +org.eclipse.platform:org.eclipse.equinox.preferences:3.9.0 +org.eclipse.platform:org.eclipse.equinox.registry:3.11.0 +org.eclipse.platform:org.eclipse.jface.text:3.18.100 +org.eclipse.platform:org.eclipse.jface:3.23.0 +org.eclipse.platform:org.eclipse.osgi.services:3.10.200 +org.eclipse.platform:org.eclipse.osgi:3.17.0 +org.eclipse.platform:org.eclipse.text:3.12.0 diff --git a/lib-extra/src/test/java/com/diffplug/spotless/extra/cpp/EclipseCdtFormatterStepTest.java b/lib-extra/src/test/java/com/diffplug/spotless/extra/cpp/EclipseCdtFormatterStepTest.java index fcda1d93a6..77fda2cf57 100644 --- a/lib-extra/src/test/java/com/diffplug/spotless/extra/cpp/EclipseCdtFormatterStepTest.java +++ b/lib-extra/src/test/java/com/diffplug/spotless/extra/cpp/EclipseCdtFormatterStepTest.java @@ -31,7 +31,7 @@ class EclipseCdtFormatterStepTest extends EclipseCommonTests { protected String[] getSupportedVersions() { List version = new ArrayList(); if (Jvm.version() >= 11) { - version.addAll(Arrays.asList("4.17.0", "4.18.0", "4.19.0", "4.20.0")); + version.addAll(Arrays.asList("4.17.0", "4.18.0", "4.19.0", "4.20.0", "4.21.0")); } version.addAll(Arrays.asList("4.7.3a", "4.11.0", "4.12.0", "4.13.0", "4.14.0", "4.16.0")); return version.toArray(new String[version.size()]); diff --git a/lib-extra/src/test/java/com/diffplug/spotless/extra/java/EclipseJdtFormatterStepTest.java b/lib-extra/src/test/java/com/diffplug/spotless/extra/java/EclipseJdtFormatterStepTest.java index bb379774a8..40bafd6f52 100644 --- a/lib-extra/src/test/java/com/diffplug/spotless/extra/java/EclipseJdtFormatterStepTest.java +++ b/lib-extra/src/test/java/com/diffplug/spotless/extra/java/EclipseJdtFormatterStepTest.java @@ -31,7 +31,7 @@ class EclipseJdtFormatterStepTest extends EclipseCommonTests { protected String[] getSupportedVersions() { List version = new ArrayList(); if (Jvm.version() >= 11) { - version.add("4.20.0"); + version.addAll(Arrays.asList("4.20.0", "4.21.0")); } version.addAll(Arrays.asList("4.6.1", "4.6.2", "4.6.3", "4.7.0", "4.7.1", "4.7.2", "4.7.3a", "4.8.0", "4.9.0", "4.10.0", "4.11.0", "4.12.0", "4.13.0", "4.14.0", "4.15.0", "4.16.0", "4.17.0", "4.18.0", "4.19.0")); diff --git a/lib-extra/src/test/java/com/diffplug/spotless/extra/wtp/EclipseWtpFormatterCommonTests.java b/lib-extra/src/test/java/com/diffplug/spotless/extra/wtp/EclipseWtpFormatterCommonTests.java index 1b5305df5f..2f951853cb 100644 --- a/lib-extra/src/test/java/com/diffplug/spotless/extra/wtp/EclipseWtpFormatterCommonTests.java +++ b/lib-extra/src/test/java/com/diffplug/spotless/extra/wtp/EclipseWtpFormatterCommonTests.java @@ -46,7 +46,7 @@ abstract class EclipseWtpFormatterCommonTests extends EclipseCommonTests { protected String[] getSupportedVersions() { List version = new ArrayList(); if (Jvm.version() >= 11) { - version.addAll(Arrays.asList("4.19.0", "4.20.0")); + version.addAll(Arrays.asList("4.19.0", "4.20.0", "4.21.0")); } version.addAll(Arrays.asList("4.7.3a", "4.7.3b", "4.8.0", "4.12.0", "4.13.0", "4.14.0", "4.15.0", "4.16.0", "4.17.0", "4.18.0")); diff --git a/plugin-gradle/CHANGES.md b/plugin-gradle/CHANGES.md index 8a35901060..146dbfa770 100644 --- a/plugin-gradle/CHANGES.md +++ b/plugin-gradle/CHANGES.md @@ -3,6 +3,8 @@ We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format (starting after version `3.27.0`). ## [Unreleased] +### Changed +* Added support and bump Eclipse formatter default versions to `4.21` for `eclipse-cdt`, `eclipse-jdt`, `eclipse-wtp`. Change is only applied for JVM 11+. ## [5.15.1] - 2021-09-20 ### Changed diff --git a/plugin-maven/CHANGES.md b/plugin-maven/CHANGES.md index e9cc91b82c..d78afebb58 100644 --- a/plugin-maven/CHANGES.md +++ b/plugin-maven/CHANGES.md @@ -3,6 +3,8 @@ We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format (starting after version `1.27.0`). ## [Unreleased] +### Changed +* Added support and bump Eclipse formatter default versions to `4.21` for `eclipse-cdt`, `eclipse-jdt`, `eclipse-wtp`. Change is only applied for JVM 11+. ## [2.13.1] - 2021-09-20 ### Changed