Skip to content

Commit a968bbe

Browse files
authored
Merge pull request #375 from diffplug/eclipse-groovy-upgrade
Switch to Groovy-Eclipse release 3.2.0. Include Eclipse logging.
2 parents e71136b + ee0c1a5 commit a968bbe

File tree

5 files changed

+29
-477
lines changed

5 files changed

+29
-477
lines changed

_ext/eclipse-groovy/CHANGES.md

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# spotless-eclipse-groovy
2+
3+
### Version 3.2.0 - March 16th 2019 ([artifact]([jcenter](https://bintray.com/diffplug/opensource/spotless-eclipse-groovy)))
4+
5+
* Switch to Groovy-Eclipse release 3.2.0 for Eclipse 4.10 ([#375](https://github.com/diffplug/spotless/pull/375)).
6+
* Include Eclipse logging allowing formatter warnings/errors to be logged via SLF4J ([#236](https://github.com/diffplug/spotless/issues/236)).
7+
8+
### Version 3.0.1 - February 25th 2019 ([artifact]([jcenter](https://bintray.com/diffplug/opensource/spotless-eclipse-groovy)))
9+
10+
* Replaced `http` update-site with `https` ([#360](https://github.com/diffplug/spotless/issues/360)).
11+
12+
### Version 3.0.0 - Sep 4th 2018 ([artifact]([jcenter](https://bintray.com/diffplug/opensource/spotless-eclipse-groovy)))
13+
14+
* Switch to Groovy-Eclipse release 3.0.0 and Groovy 2.6 ([#288](https://github.com/diffplug/spotless/issues/288)).
15+
16+
### Version 2.9.2 - Jul 19th 2018 ([artifact]([jcenter](https://bintray.com/diffplug/opensource/spotless-eclipse-groovy)))
17+
18+
* Initial release!

_ext/eclipse-groovy/build.gradle

+3-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ ext {
22
developers = [
33
fvgh: [ name: 'Frank Vennemeyer', email: '[email protected]' ],
44
]
5-
6-
p2Repository = "https://dist.springsource.org/release/GRECLIPSE/e${VER_ECLIPSE}"
5+
6+
p2Repository = "https://dist.springsource.org/release/GRECLIPSE/${VER_GRECLIPSE}/e${VER_ECLIPSE}"
77

88
p2Dependencies = [
99
'org.codehaus.groovy.eclipse.refactoring':'+', // GroovyFormatter and related
@@ -37,6 +37,7 @@ dependencies {
3737
compile ("org.eclipse.platform:org.eclipse.jface.text:${VER_ECLISPE_JFACE}") {
3838
exclude group: 'org.eclipse.platform', module: 'org.eclipse.swt'
3939
}
40+
testCompile("org.slf4j:slf4j-simple:${VER_SLF4J}")
4041
}
4142

4243
//////////

_ext/eclipse-groovy/gradle.properties

+7-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Versions correspond to the Groovy-Eclipse version used for the fat-JAR.
22
# See https://github.com/groovy/groovy-eclipse/releases for further information about Groovy-Eclipse versions.
33
# Patch version can be incremented independently for backward compatible patches of this library.
4-
ext_version=3.0.1
4+
ext_version=3.2.0
55
ext_artifactId=spotless-eclipse-groovy
66
ext_description=Groovy Eclipse's formatter bundled for Spotless
77

@@ -12,7 +12,11 @@ ext_group=com.diffplug.spotless
1212
ext_VER_JAVA=1.8
1313

1414
# Compile
15-
VER_ECLIPSE=4.8
16-
VER_SPOTLESS_ECLISPE_BASE=[3.0.0,4.0.0[
15+
VER_ECLIPSE=4.10
16+
VER_SPOTLESS_ECLISPE_BASE=[3.1.0,4.0.0[
1717
VER_ECLISPE_JFACE=[3.12.0,4.0.0[
18+
VER_GRECLIPSE=3.2.0
1819
VER_GROOVY=2.6.0
20+
21+
# Provided dependencies
22+
VER_SLF4J=[1.6,2.0[

_ext/eclipse-groovy/src/main/java/com/diffplug/spotless/extra/eclipse/groovy/GrEclipseFormatterStepImpl.java

+1-5
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,6 @@
3333
import org.eclipse.core.runtime.ILog;
3434
import org.eclipse.core.runtime.ILogListener;
3535
import org.eclipse.core.runtime.IStatus;
36-
import org.eclipse.equinox.log.ExtendedLogReaderService;
37-
import org.eclipse.equinox.log.ExtendedLogService;
3836
import org.eclipse.jface.preference.PreferenceStore;
3937
import org.eclipse.jface.text.Document;
4038
import org.eclipse.jface.text.IDocument;
@@ -57,12 +55,10 @@ public class GrEclipseFormatterStepImpl {
5755
private final boolean ignoreFormatterProblems;
5856

5957
public GrEclipseFormatterStepImpl(final Properties properties) throws Exception {
60-
SpotlessLogService logService = new SpotlessLogService();
6158
if (SpotlessEclipseFramework.setup(
6259
config -> {
6360
config.applyDefault();
64-
config.add(ExtendedLogService.class, logService);
65-
config.add(ExtendedLogReaderService.class, logService);
61+
config.useSlf4J(GrEclipseFormatterStepImpl.class.getPackage().getName());
6662
},
6763
plugins -> {
6864
plugins.add(new GroovyCoreActivator());

0 commit comments

Comments
 (0)