File tree Expand file tree Collapse file tree 4 files changed +23
-9
lines changed
spring-javaformat-eclipse/io.spring.javaformat.eclipse
src/io/spring/javaformat/eclipse Expand file tree Collapse file tree 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,
1919 org.eclipse.buildship.core;resolution:=optional,
2020 net.sf.eclipsecs.core;resolution:=optional
2121Bundle-ClassPath : .,
22- lib/spring-javaformat-formatter-eclipse.jar,
2322 lib/spring-javaformat-config.jar,
2423 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
2627Bundle-ActivationPolicy : lazy
Original file line number Diff line number Diff line change @@ -6,4 +6,5 @@ bin.includes = META-INF/,\
66 lib/spring-javaformat-checkstyle.jar,\
77 lib/spring-javaformat-config.jar,\
88 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 5757 <artifactId >spring-javaformat-formatter-eclipse-jdt-jdk8</artifactId >
5858 <version >${project.version} </version >
5959 </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 >
6065 </additionalDependencies >
6166 </configuration >
6267 </plugin >
Original file line number Diff line number Diff line change 1616
1717package io .spring .javaformat .eclipse ;
1818
19+ import java .util .ArrayList ;
20+ import java .util .List ;
21+
22+ import org .eclipse .core .runtime .Plugin ;
1923import org .eclipse .ui .plugin .AbstractUIPlugin ;
2024import org .osgi .framework .BundleContext ;
2125
22- import io .spring .javaformat .eclipse .jdt .core .JavaCore ;
23-
2426/**
2527 * The activator class controls the plug-in life cycle.
2628 *
@@ -35,22 +37,27 @@ public class Activator extends AbstractUIPlugin {
3537
3638 private static Activator plugin ;
3739
38- private JavaCore javaCore ;
40+ private final List < Plugin > javaCorePlugins = new ArrayList <>() ;
3941
4042 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 ());
4245 }
4346
4447 @ Override
4548 public void start (BundleContext context ) throws Exception {
4649 super .start (context );
4750 plugin = this ;
48- this .javaCore .start (context );
51+ for (Plugin javaCorePlugin : this .javaCorePlugins ) {
52+ javaCorePlugin .start (context );
53+ }
4954 }
5055
5156 @ Override
5257 public void stop (BundleContext context ) throws Exception {
53- this .javaCore .stop (context );
58+ for (Plugin javaCorePlugin : this .javaCorePlugins ) {
59+ javaCorePlugin .stop (context );
60+ }
5461 plugin = null ;
5562 super .stop (context );
5663 }
You can’t perform that action at this time.
0 commit comments