File tree 4 files changed +23
-9
lines changed
spring-javaformat-eclipse/io.spring.javaformat.eclipse
src/io/spring/javaformat/eclipse
4 files changed +23
-9
lines changed Original file line number Diff line number Diff line change @@ -19,8 +19,9 @@ Require-Bundle: org.eclipse.ui,
19
19
org.eclipse.buildship.core;resolution:=optional,
20
20
net.sf.eclipsecs.core;resolution:=optional
21
21
Bundle-ClassPath : .,
22
- lib/spring-javaformat-formatter-eclipse.jar,
23
22
lib/spring-javaformat-config.jar,
24
23
lib/spring-javaformat-formatter.jar,
25
- lib/spring-javaformat-checkstyle.jar
24
+ lib/spring-javaformat-checkstyle.jar,
25
+ lib/spring-javaformat-formatter-eclipse-jdt-jdk11.jar,
26
+ lib/spring-javaformat-formatter-eclipse-jdt-jdk8.jar
26
27
Bundle-ActivationPolicy : lazy
Original file line number Diff line number Diff line change @@ -6,4 +6,5 @@ bin.includes = META-INF/,\
6
6
lib/spring-javaformat-checkstyle.jar,\
7
7
lib/spring-javaformat-config.jar,\
8
8
lib/spring-javaformat-formatter.jar,\
9
- lib/spring-javaformat-formatter-eclipse.jar
9
+ lib/spring-javaformat-formatter-eclipse-jdt-jdk11.jar,\
10
+ lib/spring-javaformat-formatter-eclipse-jdt-jdk8.jar
Original file line number Diff line number Diff line change 57
57
<artifactId >spring-javaformat-formatter-eclipse-jdt-jdk8</artifactId >
58
58
<version >${project.version} </version >
59
59
</additionalDependency >
60
+ <additionalDependency >
61
+ <groupId >io.spring.javaformat</groupId >
62
+ <artifactId >spring-javaformat-formatter-eclipse-jdt-jdk11</artifactId >
63
+ <version >${project.version} </version >
64
+ </additionalDependency >
60
65
</additionalDependencies >
61
66
</configuration >
62
67
</plugin >
Original file line number Diff line number Diff line change 16
16
17
17
package io .spring .javaformat .eclipse ;
18
18
19
+ import java .util .ArrayList ;
20
+ import java .util .List ;
21
+
22
+ import org .eclipse .core .runtime .Plugin ;
19
23
import org .eclipse .ui .plugin .AbstractUIPlugin ;
20
24
import org .osgi .framework .BundleContext ;
21
25
22
- import io .spring .javaformat .eclipse .jdt .core .JavaCore ;
23
-
24
26
/**
25
27
* The activator class controls the plug-in life cycle.
26
28
*
@@ -35,22 +37,27 @@ public class Activator extends AbstractUIPlugin {
35
37
36
38
private static Activator plugin ;
37
39
38
- private JavaCore javaCore ;
40
+ private final List < Plugin > javaCorePlugins = new ArrayList <>() ;
39
41
40
42
public Activator () {
41
- this .javaCore = new JavaCore ();
43
+ this .javaCorePlugins .add (new io .spring .javaformat .eclipse .jdt .jdk8 .core .JavaCore ());
44
+ this .javaCorePlugins .add (new io .spring .javaformat .eclipse .jdt .jdk11 .core .JavaCore ());
42
45
}
43
46
44
47
@ Override
45
48
public void start (BundleContext context ) throws Exception {
46
49
super .start (context );
47
50
plugin = this ;
48
- this .javaCore .start (context );
51
+ for (Plugin javaCorePlugin : this .javaCorePlugins ) {
52
+ javaCorePlugin .start (context );
53
+ }
49
54
}
50
55
51
56
@ Override
52
57
public void stop (BundleContext context ) throws Exception {
53
- this .javaCore .stop (context );
58
+ for (Plugin javaCorePlugin : this .javaCorePlugins ) {
59
+ javaCorePlugin .stop (context );
60
+ }
54
61
plugin = null ;
55
62
super .stop (context );
56
63
}
You can’t perform that action at this time.
0 commit comments