Skip to content

Commit

Permalink
Added missing Eclipse formatter support up to version 4.19.
Browse files Browse the repository at this point in the history
  • Loading branch information
fvgh committed Jun 10, 2021
1 parent 657d948 commit 836cd88
Show file tree
Hide file tree
Showing 12 changed files with 149 additions and 8 deletions.
6 changes: 6 additions & 0 deletions CHANGES.md
Expand Up @@ -10,6 +10,12 @@ 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]
### Added
* Added support for `eclipse-cdt` at `4.19.0`. Note that version requires Java 11 or higher.
* Added support for `eclipse-groovy` at `4.18.0` and `4.19.0`.
* Added support for `eclipse-wtp` at `4.19.0`. Note that version requires Java 11 or higher.
### Changed
* Bump `eclipse-groovy` default version from `4.17.0` to `4.19.0`.

## [2.13.5] - 2021-05-13
### Changed
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright 2016-2020 DiffPlug
* Copyright 2016-2021 DiffPlug
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -33,7 +33,7 @@ private GrEclipseFormatterStep() {}
private static final String FORMATTER_CLASS = "com.diffplug.spotless.extra.eclipse.groovy.GrEclipseFormatterStepImpl";
private static final String FORMATTER_CLASS_OLD = "com.diffplug.gradle.spotless.groovy.eclipse.GrEclipseFormatterStepImpl";
private static final String MAVEN_GROUP_ARTIFACT = "com.diffplug.spotless:spotless-eclipse-groovy";
private static final String DEFAULT_VERSION = "4.17.0";
private static final String DEFAULT_VERSION = "4.19.0";
private static final String FORMATTER_METHOD = "format";

public static String defaultVersion() {
Expand Down
@@ -0,0 +1,22 @@
# Spotless formatter based on CDT version 10.2 (see https://www.eclipse.org/cdt/)
com.diffplug.spotless:spotless-eclipse-cdt:10.2.0
com.diffplug.spotless:spotless-eclipse-base:3.4.2
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.9.800
org.eclipse.platform:org.eclipse.core.contenttype:3.7.900
org.eclipse.platform:org.eclipse.core.filebuffers:3.6.1100
org.eclipse.platform:org.eclipse.core.filesystem:1.7.700
org.eclipse.platform:org.eclipse.core.jobs:3.10.1100
org.eclipse.platform:org.eclipse.core.resources:3.14.0
org.eclipse.platform:org.eclipse.core.runtime:3.20.100
org.eclipse.platform:org.eclipse.equinox.app:1.5.100
org.eclipse.platform:org.eclipse.equinox.common:3.14.100
org.eclipse.platform:org.eclipse.equinox.preferences:3.8.200
org.eclipse.platform:org.eclipse.equinox.registry:3.10.100
org.eclipse.platform:org.eclipse.jface.text:3.17.0
org.eclipse.platform:org.eclipse.jface:3.22.100
org.eclipse.platform:org.eclipse.osgi:3.16.200
org.eclipse.platform:org.eclipse.text:3.11.0
@@ -0,0 +1,26 @@
# Spotless formatter based on Eclipse-WTP version 3.20 (see https://www.eclipse.org/webtools/)
com.diffplug.spotless:spotless-eclipse-wtp:3.21.0
com.diffplug.spotless:spotless-eclipse-base:3.4.2
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.22.0
org.eclipse.emf:org.eclipse.emf.ecore:2.24.0
org.eclipse.emf:org.eclipse.xsd:2.18.0
org.eclipse.platform:org.eclipse.core.commands:3.9.800
org.eclipse.platform:org.eclipse.core.contenttype:3.7.900
org.eclipse.platform:org.eclipse.core.filebuffers:3.6.1100
org.eclipse.platform:org.eclipse.core.filesystem:1.7.700
org.eclipse.platform:org.eclipse.core.jobs:3.10.1100
org.eclipse.platform:org.eclipse.core.resources:3.14.0
org.eclipse.platform:org.eclipse.core.runtime:3.20.100
org.eclipse.platform:org.eclipse.equinox.app:1.5.100
org.eclipse.platform:org.eclipse.equinox.common:3.14.100
org.eclipse.platform:org.eclipse.equinox.preferences:3.8.200
org.eclipse.platform:org.eclipse.equinox.registry:3.10.100
org.eclipse.platform:org.eclipse.jface.text:3.17.0
org.eclipse.platform:org.eclipse.jface:3.22.100
org.eclipse.platform:org.eclipse.osgi.services:3.10.0
org.eclipse.platform:org.eclipse.osgi:3.16.200
org.eclipse.platform:org.eclipse.text:3.11.0
@@ -0,0 +1,19 @@
# Spotless formatter based on Groovy-Eclipse version 4.0.0 (see https://github.com/groovy/groovy-eclipse/releases)
com.diffplug.spotless:spotless-eclipse-groovy:4.0.0
com.diffplug.spotless:spotless-eclipse-base:3.4.2
com.github.spotbugs:spotbugs-annotations:4.0.2
com.google.code.findbugs:jsr305:3.0.2
net.jcip:jcip-annotations:1.0
org.eclipse.platform:org.eclipse.core.commands:3.9.800
org.eclipse.platform:org.eclipse.core.contenttype:3.7.800
org.eclipse.platform:org.eclipse.core.jobs:3.10.1000
org.eclipse.platform:org.eclipse.core.resources:3.13.900
org.eclipse.platform:org.eclipse.core.runtime:3.20.0
org.eclipse.platform:org.eclipse.equinox.app:1.5.0
org.eclipse.platform:org.eclipse.equinox.common:3.14.0
org.eclipse.platform:org.eclipse.equinox.preferences:3.8.100
org.eclipse.platform:org.eclipse.equinox.registry:3.10.0
org.eclipse.platform:org.eclipse.jface.text:3.16.500
org.eclipse.platform:org.eclipse.jface:3.22.0
org.eclipse.platform:org.eclipse.osgi:3.16.100
org.eclipse.platform:org.eclipse.text:3.10.400
@@ -0,0 +1,19 @@
# Spotless formatter based on Groovy-Eclipse version 4.1.0 (see https://github.com/groovy/groovy-eclipse/releases)
com.diffplug.spotless:spotless-eclipse-groovy:4.1.0
com.diffplug.spotless:spotless-eclipse-base:3.4.2
com.github.spotbugs:spotbugs-annotations:4.0.2
com.google.code.findbugs:jsr305:3.0.2
net.jcip:jcip-annotations:1.0
org.eclipse.platform:org.eclipse.core.commands:3.9.800
org.eclipse.platform:org.eclipse.core.contenttype:3.7.900
org.eclipse.platform:org.eclipse.core.jobs:3.10.1100
org.eclipse.platform:org.eclipse.core.resources:3.14.0
org.eclipse.platform:org.eclipse.core.runtime:3.20.100
org.eclipse.platform:org.eclipse.equinox.app:1.5.100
org.eclipse.platform:org.eclipse.equinox.common:3.14.100
org.eclipse.platform:org.eclipse.equinox.preferences:3.8.200
org.eclipse.platform:org.eclipse.equinox.registry:3.10.100
org.eclipse.platform:org.eclipse.jface.text:3.17.0
org.eclipse.platform:org.eclipse.jface:3.22.100
org.eclipse.platform:org.eclipse.osgi:3.16.200
org.eclipse.platform:org.eclipse.text:3.11.0
@@ -1,5 +1,5 @@
/*
* Copyright 2016-2020 DiffPlug
* Copyright 2016-2021 DiffPlug
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -25,7 +25,7 @@ public class EclipseCdtFormatterStepTest extends EclipseCommonTests {

@Override
protected String[] getSupportedVersions() {
return new String[]{"4.17.0", "4.18.0"};
return new String[]{"4.17.0", "4.18.0", "4.19.0"};
}

@Override
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright 2016-2020 DiffPlug
* Copyright 2016-2021 DiffPlug
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -23,7 +23,7 @@
public class GrEclipseFormatterStepTest extends EclipseCommonTests {
@Override
protected String[] getSupportedVersions() {
return new String[]{"4.17.0"};
return new String[]{"4.17.0", "4.18.0", "4.19.0"};
}

@Override
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright 2016-2020 DiffPlug
* Copyright 2016-2021 DiffPlug
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -32,6 +32,7 @@
import org.junit.runners.Parameterized.Parameters;

import com.diffplug.spotless.FormatterStep;
import com.diffplug.spotless.JreVersion;
import com.diffplug.spotless.TestProvisioner;
import com.diffplug.spotless.extra.EclipseBasedStepBuilder;
import com.diffplug.spotless.extra.eclipse.EclipseCommonTests;
Expand Down Expand Up @@ -66,6 +67,11 @@ public EclipseBasedStepBuilder createBuilder() {
}
}

@Override
protected void makeAssumptions() {
JreVersion.assume11OrGreater();
}

@Parameters(name = "{0}")
public static Iterable<WTP> data() {
return Arrays.asList(WTP.values());
Expand All @@ -76,7 +82,7 @@ public static Iterable<WTP> data() {

@Override
protected String[] getSupportedVersions() {
return new String[]{"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"};
return new String[]{"4.19.0"};
}

@Override
Expand Down
@@ -0,0 +1,31 @@
/*
* Copyright 2016-2021 DiffPlug
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.diffplug.spotless.extra.wtp;

import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;

@RunWith(value = Parameterized.class)
public class EclipseWtpFormatterStepTestOld extends EclipseWtpFormatterStepTest {

@Override
protected String[] getSupportedVersions() {
return new String[]{"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"};
}

@Override
protected void makeAssumptions() {}
}
6 changes: 6 additions & 0 deletions plugin-gradle/CHANGES.md
Expand Up @@ -3,6 +3,12 @@
We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format (starting after version `3.27.0`).

## [Unreleased]
### Added
* Added support for `eclipse-cdt` at `4.19.0`. Note that version requires Java 11 or higher.
* Added support for `eclipse-groovy` at `4.18.0` and `4.19.0`.
* Added support for `eclipse-wtp` at `4.19.0`. Note that version requires Java 11 or higher.
### Changed
* Bump `eclipse-groovy` default version from `4.17.0` to `4.19.0`.

## [5.12.5] - 2021-05-13
### Changed
Expand Down
6 changes: 6 additions & 0 deletions plugin-maven/CHANGES.md
Expand Up @@ -3,6 +3,12 @@
We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format (starting after version `1.27.0`).

## [Unreleased]
### Added
* Added support for `eclipse-cdt` at `4.19.0`. Note that version requires Java 11 or higher.
* Added support for `eclipse-groovy` at `4.18.0` and `4.19.0`.
* Added support for `eclipse-wtp` at `4.19.0`. Note that version requires Java 11 or higher.
### Changed
* Bump `eclipse-groovy` default version from `4.17.0` to `4.19.0`.

## [2.11.1] - 2021-05-13
### Fixed
Expand Down

0 comments on commit 836cd88

Please sign in to comment.