diff --git a/.idea/modules.xml b/.idea/modules.xml index 1d2fb72df..ff7895344 100644 --- a/.idea/modules.xml +++ b/.idea/modules.xml @@ -11,6 +11,7 @@ + diff --git a/samples/async/teavm-samples-async.iml b/samples/async/teavm-samples-async.iml index 8f024ece9..9c083f42e 100644 --- a/samples/async/teavm-samples-async.iml +++ b/samples/async/teavm-samples-async.iml @@ -38,4 +38,9 @@ + + \ No newline at end of file diff --git a/samples/benchmark/teavm-samples-benchmark.iml b/samples/benchmark/teavm-samples-benchmark.iml index a9218567c..a697a6b71 100644 --- a/samples/benchmark/teavm-samples-benchmark.iml +++ b/samples/benchmark/teavm-samples-benchmark.iml @@ -63,4 +63,9 @@ + + \ No newline at end of file diff --git a/samples/hello/teavm-samples-hello.iml b/samples/hello/teavm-samples-hello.iml index ae6580c94..00d9f2466 100644 --- a/samples/hello/teavm-samples-hello.iml +++ b/samples/hello/teavm-samples-hello.iml @@ -39,4 +39,9 @@ + + \ No newline at end of file diff --git a/samples/kotlin/teavm-samples-kotlin.iml b/samples/kotlin/teavm-samples-kotlin.iml index d85add9ff..c5711bd66 100644 --- a/samples/kotlin/teavm-samples-kotlin.iml +++ b/samples/kotlin/teavm-samples-kotlin.iml @@ -42,4 +42,9 @@ + + \ No newline at end of file diff --git a/samples/scala/teavm-samples-scala.iml b/samples/scala/teavm-samples-scala.iml index ee90882ee..699569234 100644 --- a/samples/scala/teavm-samples-scala.iml +++ b/samples/scala/teavm-samples-scala.iml @@ -39,4 +39,9 @@ + + \ No newline at end of file diff --git a/samples/storage/teavm-samples-storage.iml b/samples/storage/teavm-samples-storage.iml index a14ad037d..17dde64b4 100644 --- a/samples/storage/teavm-samples-storage.iml +++ b/samples/storage/teavm-samples-storage.iml @@ -39,4 +39,9 @@ + + \ No newline at end of file diff --git a/samples/video/teavm-samples-video.iml b/samples/video/teavm-samples-video.iml index a14ad037d..5bf84503f 100644 --- a/samples/video/teavm-samples-video.iml +++ b/samples/video/teavm-samples-video.iml @@ -39,4 +39,9 @@ + + \ No newline at end of file diff --git a/teavm.iml b/teavm.iml index 0b8e2b00b..3c52d870a 100644 --- a/teavm.iml +++ b/teavm.iml @@ -14,7 +14,7 @@ - + \ No newline at end of file diff --git a/tools/idea/jps-plugin/src/main/java/org/teavm/idea/jps/model/TeaVMJpsConfiguration.java b/tools/idea/jps-common/src/main/java/org/teavm/idea/jps/model/TeaVMJpsConfiguration.java similarity index 100% rename from tools/idea/jps-plugin/src/main/java/org/teavm/idea/jps/model/TeaVMJpsConfiguration.java rename to tools/idea/jps-common/src/main/java/org/teavm/idea/jps/model/TeaVMJpsConfiguration.java diff --git a/tools/idea/jps-plugin/src/main/java/org/teavm/idea/jps/model/TeaVMModelSerializerService.java b/tools/idea/jps-common/src/main/java/org/teavm/idea/jps/model/TeaVMModelSerializerService.java similarity index 100% rename from tools/idea/jps-plugin/src/main/java/org/teavm/idea/jps/model/TeaVMModelSerializerService.java rename to tools/idea/jps-common/src/main/java/org/teavm/idea/jps/model/TeaVMModelSerializerService.java diff --git a/tools/idea/jps-plugin/src/main/java/org/teavm/idea/jps/remote/TeaVMBuilderAssistant.java b/tools/idea/jps-common/src/main/java/org/teavm/idea/jps/remote/TeaVMBuilderAssistant.java similarity index 94% rename from tools/idea/jps-plugin/src/main/java/org/teavm/idea/jps/remote/TeaVMBuilderAssistant.java rename to tools/idea/jps-common/src/main/java/org/teavm/idea/jps/remote/TeaVMBuilderAssistant.java index 0a9741b8a..ceff8f2da 100644 --- a/tools/idea/jps-plugin/src/main/java/org/teavm/idea/jps/remote/TeaVMBuilderAssistant.java +++ b/tools/idea/jps-common/src/main/java/org/teavm/idea/jps/remote/TeaVMBuilderAssistant.java @@ -19,6 +19,7 @@ import java.rmi.Remote; import java.rmi.RemoteException; public interface TeaVMBuilderAssistant extends Remote { + String REMOTE_PORT = "teavm.jps.remote-port"; String ID = "TeaVM-JPS-Assistant"; TeaVMElementLocation getMethodLocation(String className, String methodName, String methodDesc) diff --git a/tools/idea/jps-plugin/src/main/java/org/teavm/idea/jps/remote/TeaVMElementLocation.java b/tools/idea/jps-common/src/main/java/org/teavm/idea/jps/remote/TeaVMElementLocation.java similarity index 100% rename from tools/idea/jps-plugin/src/main/java/org/teavm/idea/jps/remote/TeaVMElementLocation.java rename to tools/idea/jps-common/src/main/java/org/teavm/idea/jps/remote/TeaVMElementLocation.java diff --git a/tools/idea/jps-common/teavm-jps-common.iml b/tools/idea/jps-common/teavm-jps-common.iml new file mode 100644 index 000000000..7bf93ed0e --- /dev/null +++ b/tools/idea/jps-common/teavm-jps-common.iml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tools/idea/jps-plugin/src/main/java/org/teavm/idea/jps/TeaVMBuilder.java b/tools/idea/jps-plugin/src/main/java/org/teavm/idea/jps/TeaVMBuilder.java index ac9bedc3d..ed68d5cf4 100644 --- a/tools/idea/jps-plugin/src/main/java/org/teavm/idea/jps/TeaVMBuilder.java +++ b/tools/idea/jps-plugin/src/main/java/org/teavm/idea/jps/TeaVMBuilder.java @@ -15,6 +15,7 @@ */ package org.teavm.idea.jps; +import static org.teavm.idea.jps.remote.TeaVMBuilderAssistant.REMOTE_PORT; import java.io.IOException; import java.rmi.NotBoundException; import java.rmi.RemoteException; @@ -35,7 +36,6 @@ import org.jetbrains.jps.model.module.JpsModule; import org.teavm.idea.jps.remote.TeaVMBuilderAssistant; public class TeaVMBuilder extends ModuleLevelBuilder { - public static final String REMOTE_PORT = "teavm.jps.remote-port"; private static TeaVMBuilderAssistant assistant; public TeaVMBuilder() { diff --git a/tools/idea/jps-plugin/teavm-jps-plugin.iml b/tools/idea/jps-plugin/teavm-jps-plugin.iml index 8a7611ab7..329ce4b11 100644 --- a/tools/idea/jps-plugin/teavm-jps-plugin.iml +++ b/tools/idea/jps-plugin/teavm-jps-plugin.iml @@ -11,8 +11,6 @@ - - - + \ No newline at end of file diff --git a/tools/idea/src/main/java/org/teavm/idea/TeaVMJPSConfigurator.java b/tools/idea/src/main/java/org/teavm/idea/TeaVMJPSConfigurator.java index a03f8ed06..9c67deffd 100644 --- a/tools/idea/src/main/java/org/teavm/idea/TeaVMJPSConfigurator.java +++ b/tools/idea/src/main/java/org/teavm/idea/TeaVMJPSConfigurator.java @@ -15,11 +15,11 @@ */ package org.teavm.idea; +import static org.teavm.idea.jps.remote.TeaVMBuilderAssistant.REMOTE_PORT; import com.intellij.compiler.server.BuildProcessParametersProvider; import java.util.Collections; import java.util.List; import org.jetbrains.annotations.NotNull; -import org.teavm.idea.jps.TeaVMBuilder; public class TeaVMJPSConfigurator extends BuildProcessParametersProvider { private TeaVMJPSRemoteService remoteService; @@ -31,6 +31,6 @@ public class TeaVMJPSConfigurator extends BuildProcessParametersProvider { @NotNull @Override public List getVMArguments() { - return Collections.singletonList("-D" + TeaVMBuilder.REMOTE_PORT + "=" + remoteService.getPort()); + return Collections.singletonList("-D" + REMOTE_PORT + "=" + remoteService.getPort()); } } diff --git a/tools/idea/src/main/resources/META-INF/plugin.xml b/tools/idea/src/main/resources/META-INF/plugin.xml index 7cea7813b..81579c5a2 100644 --- a/tools/idea/src/main/resources/META-INF/plugin.xml +++ b/tools/idea/src/main/resources/META-INF/plugin.xml @@ -29,7 +29,7 @@ - + diff --git a/tools/idea/teavm-idea-plugin.iml b/tools/idea/teavm-idea-plugin.iml index 8ec274334..e536d5514 100644 --- a/tools/idea/teavm-idea-plugin.iml +++ b/tools/idea/teavm-idea-plugin.iml @@ -12,7 +12,7 @@ - - + + \ No newline at end of file