mirror of
https://github.com/Eaglercraft-TeaVM-Fork/eagler-teavm.git
synced 2024-12-22 08:14:09 -08:00
Implement TeaVM debugger in IDEA
This commit is contained in:
parent
bad97d70de
commit
a2e1fbdeb8
|
@ -11,6 +11,7 @@
|
|||
<module fileurl="file://$PROJECT_DIR$/extras-slf4j/teavm-extras-slf4j.iml" filepath="$PROJECT_DIR$/extras-slf4j/teavm-extras-slf4j.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/html4j/teavm-html4j.iml" filepath="$PROJECT_DIR$/html4j/teavm-html4j.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/tools/idea/teavm-idea-plugin.iml" filepath="$PROJECT_DIR$/tools/idea/teavm-idea-plugin.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/tools/idea/jps-common/teavm-jps-common.iml" filepath="$PROJECT_DIR$/tools/idea/jps-common/teavm-jps-common.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/tools/idea/jps-plugin/teavm-jps-plugin.iml" filepath="$PROJECT_DIR$/tools/idea/jps-plugin/teavm-jps-plugin.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/jso/core/teavm-jso.iml" filepath="$PROJECT_DIR$/jso/core/teavm-jso.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/jso/apis/teavm-jso-apis.iml" filepath="$PROJECT_DIR$/jso/apis/teavm-jso-apis.iml" />
|
||||
|
|
|
@ -38,4 +38,9 @@
|
|||
<orderEntry type="library" scope="PROVIDED" name="Maven: com.jcraft:jzlib:1.1.3" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: joda-time:joda-time:2.7" level="project" />
|
||||
</component>
|
||||
<component name="teavm">
|
||||
<option name="enabled" value="true" />
|
||||
<option name="mainClass" value="org.teavm.samples.async.AsyncProgram" />
|
||||
<option name="targetDirectory" value="$MODULE_DIR$/target/generated/js/teavm" />
|
||||
</component>
|
||||
</module>
|
|
@ -63,4 +63,9 @@
|
|||
<orderEntry type="library" name="Maven: org.netbeans.html:net.java.html.boot:1.2.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.netbeans.html:net.java.html:1.2.3" level="project" />
|
||||
</component>
|
||||
<component name="teavm">
|
||||
<option name="enabled" value="true" />
|
||||
<option name="mainClass" value="org.teavm.samples.benchmark.teavm.BenchmarkStarter" />
|
||||
<option name="targetDirectory" value="$MODULE_DIR$/target/generated/js/teavm" />
|
||||
</component>
|
||||
</module>
|
|
@ -39,4 +39,9 @@
|
|||
<orderEntry type="module" module-name="teavm-jso" scope="PROVIDED" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: javax.servlet:javax.servlet-api:3.1.0" level="project" />
|
||||
</component>
|
||||
<component name="teavm">
|
||||
<option name="enabled" value="true" />
|
||||
<option name="mainClass" value="org.teavm.samples.hello.Client" />
|
||||
<option name="targetDirectory" value="$MODULE_DIR$/target/generated/js/teavm" />
|
||||
</component>
|
||||
</module>
|
|
@ -42,4 +42,9 @@
|
|||
<orderEntry type="library" scope="PROVIDED" name="Maven: joda-time:joda-time:2.7" level="project" />
|
||||
<orderEntry type="module" module-name="teavm-jso-apis" scope="PROVIDED" />
|
||||
</component>
|
||||
<component name="teavm">
|
||||
<option name="enabled" value="true" />
|
||||
<option name="mainClass" value="org.teavm.samples.kotlin.HelloKt" />
|
||||
<option name="targetDirectory" value="$MODULE_DIR$/target/generated/js/teavm" />
|
||||
</component>
|
||||
</module>
|
|
@ -39,4 +39,9 @@
|
|||
<orderEntry type="module" module-name="teavm-jso" />
|
||||
<orderEntry type="library" name="Maven: org.scala-lang:scala-library:2.11.7" level="project" />
|
||||
</component>
|
||||
<component name="teavm">
|
||||
<option name="enabled" value="true" />
|
||||
<option name="mainClass" value="org.teavm.samples.scala.Client" />
|
||||
<option name="targetDirectory" value="$MODULE_DIR$/target/generated/js/teavm" />
|
||||
</component>
|
||||
</module>
|
|
@ -39,4 +39,9 @@
|
|||
<orderEntry type="module" module-name="teavm-jso-apis" scope="PROVIDED" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: javax.servlet:javax.servlet-api:3.1.0" level="project" />
|
||||
</component>
|
||||
<component name="teavm">
|
||||
<option name="enabled" value="true" />
|
||||
<option name="mainClass" value="org.teavm.samples.storage.Application" />
|
||||
<option name="targetDirectory" value="$MODULE_DIR$/target/generated/js/teavm" />
|
||||
</component>
|
||||
</module>
|
|
@ -39,4 +39,9 @@
|
|||
<orderEntry type="module" module-name="teavm-jso-apis" scope="PROVIDED" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: javax.servlet:javax.servlet-api:3.1.0" level="project" />
|
||||
</component>
|
||||
<component name="teavm">
|
||||
<option name="enabled" value="true" />
|
||||
<option name="mainClass" value="org.teavm.samples.video.Player" />
|
||||
<option name="targetDirectory" value="$MODULE_DIR$/target/generated/js/teavm" />
|
||||
</component>
|
||||
</module>
|
|
@ -14,7 +14,7 @@
|
|||
<excludeFolder url="file://$MODULE_DIR$/classlib" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/target" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="jdk" jdkName="1.8" jdkType="JavaSDK" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
|
@ -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)
|
20
tools/idea/jps-common/teavm-jps-common.iml
Normal file
20
tools/idea/jps-common/teavm-jps-common.iml
Normal file
|
@ -0,0 +1,20 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="JAVA_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
|
||||
</content>
|
||||
<orderEntry type="jdk" jdkName="IntelliJ IDEA" jdkType="IDEA JDK" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="module-library" exported="">
|
||||
<library>
|
||||
<CLASSES>
|
||||
<root url="jar://$MODULE_DIR$/../jps-plugin/lib/teavm-all.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
</component>
|
||||
</module>
|
|
@ -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() {
|
||||
|
|
|
@ -11,8 +11,6 @@
|
|||
</content>
|
||||
<orderEntry type="jdk" jdkName="IntelliJ IDEA" jdkType="IDEA JDK" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="library" name="Maven: org.ow2.asm:asm-debug-all:5.0.4" level="project" />
|
||||
<orderEntry type="library" name="teavm-all" level="project" />
|
||||
<orderEntry type="library" name="teavm-all" level="project" />
|
||||
<orderEntry type="module" module-name="teavm-jps-common" />
|
||||
</component>
|
||||
</module>
|
|
@ -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<String> getVMArguments() {
|
||||
return Collections.singletonList("-D" + TeaVMBuilder.REMOTE_PORT + "=" + remoteService.getPort());
|
||||
return Collections.singletonList("-D" + REMOTE_PORT + "=" + remoteService.getPort());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
<moduleConfigurable instance="org.teavm.idea.ui.TeaVMConfigurable"/>
|
||||
<moduleService serviceInterface="org.teavm.idea.TeaVMConfigurationStorage"
|
||||
serviceImplementation="org.teavm.idea.TeaVMConfigurationStorage"/>
|
||||
<compileServer.plugin classpath="jps/teavm-jps-plugin.jar;teavm-all.jar"/>
|
||||
<compileServer.plugin classpath="jps/teavm-jps-plugin.jar;teavm-all.jar;teavm-jps-common.jar"/>
|
||||
<buildProcess.parametersProvider implementation="org.teavm.idea.TeaVMJPSConfigurator"/>
|
||||
<configurationType implementation="org.teavm.idea.debug.TeaVMDebugConfigurationType"/>
|
||||
<programRunner implementation="org.teavm.idea.debug.TeaVMDebugRunner"/>
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
</content>
|
||||
<orderEntry type="jdk" jdkName="IntelliJ IDEA" jdkType="IDEA JDK" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="module" module-name="teavm-jps-plugin" />
|
||||
<orderEntry type="library" name="teavm-all" level="project" />
|
||||
<orderEntry type="module" module-name="teavm-jps-common" exported="" />
|
||||
<orderEntry type="module" module-name="teavm-jps-plugin" exported="" />
|
||||
</component>
|
||||
</module>
|
Loading…
Reference in New Issue
Block a user