diff --git a/.idea/runConfigurations/IDEA.xml b/.idea/runConfigurations/IDEA.xml
new file mode 100644
index 000000000..8c476306b
--- /dev/null
+++ b/.idea/runConfigurations/IDEA.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/runConfigurations/JPS_repack.xml b/.idea/runConfigurations/JPS_repack.xml
deleted file mode 100644
index b1bedeec4..000000000
--- a/.idea/runConfigurations/JPS_repack.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index 21ef62019..a0661c59b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -71,6 +71,7 @@
1.7.7
2.47.2
2.6.2
+ 2016.3.4
false
1
@@ -296,6 +297,7 @@
samples
+ tools/idea
diff --git a/tools/idea/idea-artifacts/.gitignore b/tools/idea/idea-artifacts/.gitignore
new file mode 100644
index 000000000..44b111e53
--- /dev/null
+++ b/tools/idea/idea-artifacts/.gitignore
@@ -0,0 +1 @@
+/dependencies
\ No newline at end of file
diff --git a/tools/idea/idea-artifacts/dep-pom.xml b/tools/idea/idea-artifacts/dep-pom.xml
new file mode 100644
index 000000000..55c8e213d
--- /dev/null
+++ b/tools/idea/idea-artifacts/dep-pom.xml
@@ -0,0 +1,264 @@
+
+
+
+
+
+ 4.0.0
+ org.teavm
+ teavm-idea-dependencies
+ 1.0.0-SNAPSHOT
+
+
+
+ idea-releases
+ https://www.jetbrains.com/intellij-repository/releases
+
+
+
+
+
+ com.jetbrains.intellij.idea
+ ideaIC
+ ${idea.version}
+ zip
+ provided
+
+
+
+ org.teavm
+ teavm-tooling
+ ${project.version}
+
+
+ org.slf4j
+ slf4j-api
+
+
+
+
+ org.teavm
+ teavm-chrome-rdp
+ ${project.version}
+
+
+ org.slf4j
+ slf4j-api
+
+
+
+
+ org.teavm
+ teavm-metaprogramming-impl
+ ${project.version}
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-dependency-plugin
+ 3.0.0
+
+
+ unpack-idea
+ compile
+
+ unpack-dependencies
+
+
+ com.jetbrains.intellij.idea
+ ideaIC
+ ${basedir}/dependencies/idea
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-shade-plugin
+ 3.0.0
+
+
+ package
+
+ shade
+
+
+
+
+ com.jetbrains.intellij.idea:ideaIC:zip:*
+
+
+
+
+ org.objectweb.asm
+ org.teavm.asm
+
+
+ org.objectweb.asm
+ org.teavm.asm
+
+
+ false
+ dependencies/teavm.jar
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-install-plugin
+ 2.5.2
+
+
+ teavm
+
+ install-file
+
+ install
+
+ dependencies/teavm.jar
+ teavm
+ ${teavm.version}
+
+
+
+ openapi
+
+ install-file
+
+ prepare-package
+
+ dependencies/idea/lib/openapi.jar
+ openapi
+
+
+
+ util
+
+ install-file
+
+ prepare-package
+
+ dependencies/idea/lib/util.jar
+ util
+
+
+
+ extensions
+
+ install-file
+
+ prepare-package
+
+ dependencies/idea/lib/extensions.jar
+ extensions
+
+
+
+ annotations
+
+ install-file
+
+ prepare-package
+
+ dependencies/idea/lib/annotations.jar
+ annotations
+
+
+
+ jdom
+
+ install-file
+
+ prepare-package
+
+ dependencies/idea/lib/jdom.jar
+ jdom
+
+
+
+ maven
+
+ install-file
+
+ prepare-package
+
+ dependencies/idea/plugins/maven/lib/maven.jar
+ maven
+
+
+
+ maven-server-api
+
+ install-file
+
+ prepare-package
+
+ dependencies/idea/plugins/maven/lib/maven-server-api.jar
+ maven-server-api
+
+
+
+ idea
+
+ install-file
+
+ prepare-package
+
+ dependencies/idea/lib/idea.jar
+ idea
+
+
+
+ jps-model
+
+ install-file
+
+ prepare-package
+
+ dependencies/idea/lib/jps-model.jar
+ jps-model
+
+
+
+ jps-builders
+
+ install-file
+
+ prepare-package
+
+ dependencies/idea/lib/jps-builders.jar
+ jps-builders
+
+
+
+
+ dependencies/maven
+ org.teavm.idea
+ ${idea.version}
+ jar
+
+
+
+
+
\ No newline at end of file
diff --git a/tools/idea/idea-artifacts/pom.xml b/tools/idea/idea-artifacts/pom.xml
new file mode 100644
index 000000000..5b231c5c5
--- /dev/null
+++ b/tools/idea/idea-artifacts/pom.xml
@@ -0,0 +1,72 @@
+
+
+
+
+
+ org.teavm
+ teavm-idea-parent
+ 0.5.0-SNAPSHOT
+ ../pom.xml
+
+ 4.0.0
+
+ teavm-idea-artifacts
+ TeaVM IDEA artifacts
+ pom
+
+
+
+ download-dependencies
+
+
+ dependencies/teavm.jar
+
+
+
+
+
+
+ org.codehaus.mojo
+ exec-maven-plugin
+ 1.3.2
+
+
+ copy-dependencies
+ initialize
+
+ exec
+
+
+ mvn
+
+ - -f
+ - dep-pom.xml
+ - install
+ - -Didea.version=${idea.version}
+ - -Dteavm.version=${project.version}
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/tools/idea/idea-artifacts/teavm-idea-artifacts.iml b/tools/idea/idea-artifacts/teavm-idea-artifacts.iml
new file mode 100644
index 000000000..66b3d797e
--- /dev/null
+++ b/tools/idea/idea-artifacts/teavm-idea-artifacts.iml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/tools/idea/jps-common/pom.xml b/tools/idea/jps-common/pom.xml
index 50f43b681..a50203e47 100644
--- a/tools/idea/jps-common/pom.xml
+++ b/tools/idea/jps-common/pom.xml
@@ -1,5 +1,7 @@
+
+
+
+
+ teavm-idea-parent
+ org.teavm
+ 0.5.0-SNAPSHOT
+ ../pom.xml
+
4.0.0
-
- org.teavm
- teavm
- 0.5.0-SNAPSHOT
- ../../..
-
- pom
+ teavm-jps-common
+ TeaVM IDEA JPS common artifact
- teavm-jps-repack
+
+ ${basedir}/..
+
- org.teavm
- teavm-tooling
- ${project.version}
-
-
- org.slf4j
- slf4j-api
-
-
+ org.teavm.idea
+ openapi
+ ${idea.version}
+ provided
- org.teavm
- teavm-chrome-rdp
- ${project.version}
-
-
- org.slf4j
- slf4j-api
-
-
+ org.teavm.idea
+ annotations
+ ${idea.version}
+ provided
- org.teavm
- teavm-metaprogramming-impl
+ org.teavm.idea
+ jdom
+ ${idea.version}
+ provided
+
+
+ org.teavm.idea
+ util
+ ${idea.version}
+ provided
+
+
+ org.teavm.idea
+ jps-model
+ ${idea.version}
+ provided
+
+
+ org.teavm.idea
+ jps-builders
+ ${idea.version}
+ provided
+
+
+
+ org.teavm.idea
+ teavm
${project.version}
@@ -62,30 +83,13 @@
org.apache.maven.plugins
- maven-shade-plugin
- 2.4.3
-
-
- package
-
- shade
-
-
- lib/teavm-all.jar
-
-
- org.objectweb.asm
- org.teavm.asm
-
-
- org.objectweb.asm
- org.teavm.asm
-
-
-
-
-
+ maven-checkstyle-plugin
+
+ ../../checkstyle.xml
+ config_loc=${basedir}/../../../
+
+
\ No newline at end of file
diff --git a/tools/idea/jps-common/teavm-jps-common.iml b/tools/idea/jps-common/teavm-jps-common.iml
index c5cba2620..d123bbdab 100644
--- a/tools/idea/jps-common/teavm-jps-common.iml
+++ b/tools/idea/jps-common/teavm-jps-common.iml
@@ -1,26 +1,21 @@
-
-
+
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
diff --git a/tools/idea/jps-plugin/pom.xml b/tools/idea/jps-plugin/pom.xml
new file mode 100644
index 000000000..97dffb9f4
--- /dev/null
+++ b/tools/idea/jps-plugin/pom.xml
@@ -0,0 +1,95 @@
+
+
+
+
+
+
+ teavm-idea-parent
+ org.teavm
+ 0.5.0-SNAPSHOT
+ ../pom.xml
+
+ 4.0.0
+
+ teavm-jps-plugin
+ TeaVM IDEA JPS plugin
+
+
+ ${basedir}/..
+
+
+
+
+ org.teavm.idea
+ openapi
+ ${idea.version}
+ provided
+
+
+ org.teavm.idea
+ annotations
+ ${idea.version}
+ provided
+
+
+ org.teavm.idea
+ util
+ ${idea.version}
+ provided
+
+
+ org.teavm.idea
+ jdom
+ ${idea.version}
+ provided
+
+
+ org.teavm.idea
+ jps-model
+ ${idea.version}
+ provided
+
+
+ org.teavm.idea
+ jps-builders
+ ${idea.version}
+ provided
+
+
+
+ org.teavm
+ teavm-jps-common
+ ${project.version}
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-checkstyle-plugin
+
+ ../../checkstyle.xml
+ config_loc=${basedir}/../../../
+
+
+
+
+
+
\ No newline at end of file
diff --git a/tools/idea/jps-plugin/teavm-jps-plugin.iml b/tools/idea/jps-plugin/teavm-jps-plugin.iml
index 687376480..62279794c 100644
--- a/tools/idea/jps-plugin/teavm-jps-plugin.iml
+++ b/tools/idea/jps-plugin/teavm-jps-plugin.iml
@@ -1,9 +1,8 @@
-
-
+
+
-
@@ -11,6 +10,13 @@
-
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/tools/idea/plugin/pom.xml b/tools/idea/plugin/pom.xml
new file mode 100644
index 000000000..a71cedb86
--- /dev/null
+++ b/tools/idea/plugin/pom.xml
@@ -0,0 +1,144 @@
+
+
+
+
+
+ teavm-idea-parent
+ org.teavm
+ 0.5.0-SNAPSHOT
+ ../pom.xml
+
+ 4.0.0
+
+ teavm-idea
+ TeaVM IDEA plugin
+
+
+ ${basedir}/..
+
+
+
+
+ org.teavm.idea
+ openapi
+ ${idea.version}
+ provided
+
+
+ org.teavm.idea
+ annotations
+ ${idea.version}
+ provided
+
+
+ org.teavm.idea
+ util
+ ${idea.version}
+ provided
+
+
+ org.teavm.idea
+ extensions
+ ${idea.version}
+ provided
+
+
+ org.teavm.idea
+ jdom
+ ${idea.version}
+ provided
+
+
+ org.teavm.idea
+ maven
+ ${idea.version}
+ provided
+
+
+ org.teavm.idea
+ maven-server-api
+ ${idea.version}
+ provided
+
+
+ org.teavm.idea
+ idea
+ ${idea.version}
+ provided
+
+
+ org.teavm.idea
+ teavm
+ ${project.version}
+
+
+
+ org.teavm
+ teavm-jps-common
+ ${project.version}
+
+
+ org.teavm
+ teavm-jps-plugin
+ ${project.version}
+ runtime
+
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-checkstyle-plugin
+
+ ../../checkstyle.xml
+ config_loc=${basedir}/../../../
+
+
+
+
+ org.apache.maven.plugins
+ maven-assembly-plugin
+
+
+ package
+
+ single
+
+
+
+
+
+ src/assembly/plugin.xml
+
+ false
+
+
+
+
+
+
+ src/main/resources
+ true
+
+
+
+
+
\ No newline at end of file
diff --git a/tools/idea/plugin/src/assembly/plugin.xml b/tools/idea/plugin/src/assembly/plugin.xml
new file mode 100644
index 000000000..4157650dc
--- /dev/null
+++ b/tools/idea/plugin/src/assembly/plugin.xml
@@ -0,0 +1,56 @@
+
+
+
+ idea-plugin
+
+
+ zip
+
+
+
+
+ lib
+
+ org.teavm.idea:teavm:*
+
+ teavm.jar
+
+
+ lib
+
+ org.teavm:teavm-jps-common
+
+ teavm-jps-common.jar
+
+
+ lib/jps
+
+ org.teavm:teavm-jps-plugin
+
+ teavm-jps-plugin.jar
+
+
+
+
+
+ lib
+
+ teavm-plugin.jar
+
+
+
\ No newline at end of file
diff --git a/tools/idea/src/main/java/org/teavm/idea/TeaVMConfigurationStorage.java b/tools/idea/plugin/src/main/java/org/teavm/idea/TeaVMConfigurationStorage.java
similarity index 100%
rename from tools/idea/src/main/java/org/teavm/idea/TeaVMConfigurationStorage.java
rename to tools/idea/plugin/src/main/java/org/teavm/idea/TeaVMConfigurationStorage.java
diff --git a/tools/idea/src/main/java/org/teavm/idea/TeaVMFacet.java b/tools/idea/plugin/src/main/java/org/teavm/idea/TeaVMFacet.java
similarity index 100%
rename from tools/idea/src/main/java/org/teavm/idea/TeaVMFacet.java
rename to tools/idea/plugin/src/main/java/org/teavm/idea/TeaVMFacet.java
diff --git a/tools/idea/src/main/java/org/teavm/idea/TeaVMFacetConfiguration.java b/tools/idea/plugin/src/main/java/org/teavm/idea/TeaVMFacetConfiguration.java
similarity index 100%
rename from tools/idea/src/main/java/org/teavm/idea/TeaVMFacetConfiguration.java
rename to tools/idea/plugin/src/main/java/org/teavm/idea/TeaVMFacetConfiguration.java
diff --git a/tools/idea/src/main/java/org/teavm/idea/TeaVMFacetType.java b/tools/idea/plugin/src/main/java/org/teavm/idea/TeaVMFacetType.java
similarity index 100%
rename from tools/idea/src/main/java/org/teavm/idea/TeaVMFacetType.java
rename to tools/idea/plugin/src/main/java/org/teavm/idea/TeaVMFacetType.java
diff --git a/tools/idea/src/main/java/org/teavm/idea/TeaVMJPSConfigurator.java b/tools/idea/plugin/src/main/java/org/teavm/idea/TeaVMJPSConfigurator.java
similarity index 100%
rename from tools/idea/src/main/java/org/teavm/idea/TeaVMJPSConfigurator.java
rename to tools/idea/plugin/src/main/java/org/teavm/idea/TeaVMJPSConfigurator.java
diff --git a/tools/idea/src/main/java/org/teavm/idea/TeaVMJPSRemoteService.java b/tools/idea/plugin/src/main/java/org/teavm/idea/TeaVMJPSRemoteService.java
similarity index 93%
rename from tools/idea/src/main/java/org/teavm/idea/TeaVMJPSRemoteService.java
rename to tools/idea/plugin/src/main/java/org/teavm/idea/TeaVMJPSRemoteService.java
index c6cf902ed..b0df6331d 100644
--- a/tools/idea/src/main/java/org/teavm/idea/TeaVMJPSRemoteService.java
+++ b/tools/idea/plugin/src/main/java/org/teavm/idea/TeaVMJPSRemoteService.java
@@ -40,7 +40,7 @@ import org.teavm.idea.jps.remote.TeaVMElementLocation;
public class TeaVMJPSRemoteService extends UnicastRemoteObject implements ApplicationComponent, TeaVMBuilderAssistant {
private static final int MIN_PORT = 10000;
private static final int MAX_PORT = 1 << 16;
- private final ProjectManager projectManager = ProjectManager.getInstance();
+ private ProjectManager projectManager;
private int port;
private Registry registry;
@@ -48,6 +48,13 @@ public class TeaVMJPSRemoteService extends UnicastRemoteObject implements Applic
super();
}
+ private synchronized ProjectManager getProjectManager() {
+ if (projectManager == null) {
+ projectManager = ProjectManager.getInstance();
+ }
+ return projectManager;
+ }
+
@Override
public void initComponent() {
Random random = new Random();
@@ -94,7 +101,7 @@ public class TeaVMJPSRemoteService extends UnicastRemoteObject implements Applic
TeaVMElementLocation[] resultHolder = new TeaVMElementLocation[1];
ApplicationManager.getApplication().runReadAction(() -> {
- for (Project project : projectManager.getOpenProjects()) {
+ for (Project project : getProjectManager().getOpenProjects()) {
JavaPsiFacade psi = JavaPsiFacade.getInstance(project);
PsiClass cls = psi.findClass(className, GlobalSearchScope.allScope(project));
if (cls == null) {
diff --git a/tools/idea/src/main/java/org/teavm/idea/TeaVMWebAssemblyFacetType.java b/tools/idea/plugin/src/main/java/org/teavm/idea/TeaVMWebAssemblyFacetType.java
similarity index 100%
rename from tools/idea/src/main/java/org/teavm/idea/TeaVMWebAssemblyFacetType.java
rename to tools/idea/plugin/src/main/java/org/teavm/idea/TeaVMWebAssemblyFacetType.java
diff --git a/tools/idea/src/main/java/org/teavm/idea/debug/TeaVMDebugConfiguration.java b/tools/idea/plugin/src/main/java/org/teavm/idea/debug/TeaVMDebugConfiguration.java
similarity index 100%
rename from tools/idea/src/main/java/org/teavm/idea/debug/TeaVMDebugConfiguration.java
rename to tools/idea/plugin/src/main/java/org/teavm/idea/debug/TeaVMDebugConfiguration.java
diff --git a/tools/idea/src/main/java/org/teavm/idea/debug/TeaVMDebugConfigurationType.java b/tools/idea/plugin/src/main/java/org/teavm/idea/debug/TeaVMDebugConfigurationType.java
similarity index 100%
rename from tools/idea/src/main/java/org/teavm/idea/debug/TeaVMDebugConfigurationType.java
rename to tools/idea/plugin/src/main/java/org/teavm/idea/debug/TeaVMDebugConfigurationType.java
diff --git a/tools/idea/src/main/java/org/teavm/idea/debug/TeaVMDebugProcess.java b/tools/idea/plugin/src/main/java/org/teavm/idea/debug/TeaVMDebugProcess.java
similarity index 100%
rename from tools/idea/src/main/java/org/teavm/idea/debug/TeaVMDebugProcess.java
rename to tools/idea/plugin/src/main/java/org/teavm/idea/debug/TeaVMDebugProcess.java
diff --git a/tools/idea/src/main/java/org/teavm/idea/debug/TeaVMDebugRunner.java b/tools/idea/plugin/src/main/java/org/teavm/idea/debug/TeaVMDebugRunner.java
similarity index 100%
rename from tools/idea/src/main/java/org/teavm/idea/debug/TeaVMDebugRunner.java
rename to tools/idea/plugin/src/main/java/org/teavm/idea/debug/TeaVMDebugRunner.java
diff --git a/tools/idea/src/main/java/org/teavm/idea/debug/TeaVMDebuggerEditorsProvider.java b/tools/idea/plugin/src/main/java/org/teavm/idea/debug/TeaVMDebuggerEditorsProvider.java
similarity index 100%
rename from tools/idea/src/main/java/org/teavm/idea/debug/TeaVMDebuggerEditorsProvider.java
rename to tools/idea/plugin/src/main/java/org/teavm/idea/debug/TeaVMDebuggerEditorsProvider.java
diff --git a/tools/idea/src/main/java/org/teavm/idea/debug/TeaVMExecutionStack.java b/tools/idea/plugin/src/main/java/org/teavm/idea/debug/TeaVMExecutionStack.java
similarity index 100%
rename from tools/idea/src/main/java/org/teavm/idea/debug/TeaVMExecutionStack.java
rename to tools/idea/plugin/src/main/java/org/teavm/idea/debug/TeaVMExecutionStack.java
diff --git a/tools/idea/src/main/java/org/teavm/idea/debug/TeaVMLineBreakpointHandler.java b/tools/idea/plugin/src/main/java/org/teavm/idea/debug/TeaVMLineBreakpointHandler.java
similarity index 100%
rename from tools/idea/src/main/java/org/teavm/idea/debug/TeaVMLineBreakpointHandler.java
rename to tools/idea/plugin/src/main/java/org/teavm/idea/debug/TeaVMLineBreakpointHandler.java
diff --git a/tools/idea/src/main/java/org/teavm/idea/debug/TeaVMRunState.java b/tools/idea/plugin/src/main/java/org/teavm/idea/debug/TeaVMRunState.java
similarity index 100%
rename from tools/idea/src/main/java/org/teavm/idea/debug/TeaVMRunState.java
rename to tools/idea/plugin/src/main/java/org/teavm/idea/debug/TeaVMRunState.java
diff --git a/tools/idea/src/main/java/org/teavm/idea/debug/TeaVMStackFrame.java b/tools/idea/plugin/src/main/java/org/teavm/idea/debug/TeaVMStackFrame.java
similarity index 100%
rename from tools/idea/src/main/java/org/teavm/idea/debug/TeaVMStackFrame.java
rename to tools/idea/plugin/src/main/java/org/teavm/idea/debug/TeaVMStackFrame.java
diff --git a/tools/idea/src/main/java/org/teavm/idea/debug/TeaVMSuspendContext.java b/tools/idea/plugin/src/main/java/org/teavm/idea/debug/TeaVMSuspendContext.java
similarity index 100%
rename from tools/idea/src/main/java/org/teavm/idea/debug/TeaVMSuspendContext.java
rename to tools/idea/plugin/src/main/java/org/teavm/idea/debug/TeaVMSuspendContext.java
diff --git a/tools/idea/src/main/java/org/teavm/idea/debug/TeaVMValue.java b/tools/idea/plugin/src/main/java/org/teavm/idea/debug/TeaVMValue.java
similarity index 100%
rename from tools/idea/src/main/java/org/teavm/idea/debug/TeaVMValue.java
rename to tools/idea/plugin/src/main/java/org/teavm/idea/debug/TeaVMValue.java
diff --git a/tools/idea/src/main/java/org/teavm/idea/debug/ui/TeaVMDebugSettingsEditor.java b/tools/idea/plugin/src/main/java/org/teavm/idea/debug/ui/TeaVMDebugSettingsEditor.java
similarity index 100%
rename from tools/idea/src/main/java/org/teavm/idea/debug/ui/TeaVMDebugSettingsEditor.java
rename to tools/idea/plugin/src/main/java/org/teavm/idea/debug/ui/TeaVMDebugSettingsEditor.java
diff --git a/tools/idea/src/main/java/org/teavm/idea/debug/ui/TeaVMDebugSettingsPanel.java b/tools/idea/plugin/src/main/java/org/teavm/idea/debug/ui/TeaVMDebugSettingsPanel.java
similarity index 100%
rename from tools/idea/src/main/java/org/teavm/idea/debug/ui/TeaVMDebugSettingsPanel.java
rename to tools/idea/plugin/src/main/java/org/teavm/idea/debug/ui/TeaVMDebugSettingsPanel.java
diff --git a/tools/idea/src/main/java/org/teavm/idea/maven/TeaVMMavenImporter.java b/tools/idea/plugin/src/main/java/org/teavm/idea/maven/TeaVMMavenImporter.java
similarity index 100%
rename from tools/idea/src/main/java/org/teavm/idea/maven/TeaVMMavenImporter.java
rename to tools/idea/plugin/src/main/java/org/teavm/idea/maven/TeaVMMavenImporter.java
diff --git a/tools/idea/src/main/java/org/teavm/idea/ui/TeaVMConfigurable.java b/tools/idea/plugin/src/main/java/org/teavm/idea/ui/TeaVMConfigurable.java
similarity index 100%
rename from tools/idea/src/main/java/org/teavm/idea/ui/TeaVMConfigurable.java
rename to tools/idea/plugin/src/main/java/org/teavm/idea/ui/TeaVMConfigurable.java
diff --git a/tools/idea/src/main/java/org/teavm/idea/ui/TeaVMConfigurationPanel.java b/tools/idea/plugin/src/main/java/org/teavm/idea/ui/TeaVMConfigurationPanel.java
similarity index 100%
rename from tools/idea/src/main/java/org/teavm/idea/ui/TeaVMConfigurationPanel.java
rename to tools/idea/plugin/src/main/java/org/teavm/idea/ui/TeaVMConfigurationPanel.java
diff --git a/tools/idea/src/main/java/org/teavm/idea/ui/TeaVMFacetEditorTab.java b/tools/idea/plugin/src/main/java/org/teavm/idea/ui/TeaVMFacetEditorTab.java
similarity index 100%
rename from tools/idea/src/main/java/org/teavm/idea/ui/TeaVMFacetEditorTab.java
rename to tools/idea/plugin/src/main/java/org/teavm/idea/ui/TeaVMFacetEditorTab.java
diff --git a/tools/idea/src/main/resources/META-INF/plugin.xml b/tools/idea/plugin/src/main/resources/META-INF/plugin.xml
similarity index 92%
rename from tools/idea/src/main/resources/META-INF/plugin.xml
rename to tools/idea/plugin/src/main/resources/META-INF/plugin.xml
index 397541b67..3a54b0e24 100644
--- a/tools/idea/src/main/resources/META-INF/plugin.xml
+++ b/tools/idea/plugin/src/main/resources/META-INF/plugin.xml
@@ -1,7 +1,7 @@
org.teavm.idea
TeaVM IDEA plugin
- 1.0
+ ${project.version}
TeaVM community
org.jetbrains.idea.maven
@@ -17,7 +17,7 @@
]]>
-
+
@@ -26,7 +26,7 @@
-
+
diff --git a/tools/idea/src/main/resources/teavm-16.png b/tools/idea/plugin/src/main/resources/teavm-16.png
similarity index 100%
rename from tools/idea/src/main/resources/teavm-16.png
rename to tools/idea/plugin/src/main/resources/teavm-16.png
diff --git a/tools/idea/teavm-idea-plugin.iml b/tools/idea/plugin/teavm-idea.iml
similarity index 64%
rename from tools/idea/teavm-idea-plugin.iml
rename to tools/idea/plugin/teavm-idea.iml
index e536d5514..d73ac84b0 100644
--- a/tools/idea/teavm-idea-plugin.iml
+++ b/tools/idea/plugin/teavm-idea.iml
@@ -1,10 +1,9 @@
-
+
-
@@ -12,7 +11,16 @@
-
-
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/tools/idea/pom.xml b/tools/idea/pom.xml
new file mode 100644
index 000000000..94e93bfa3
--- /dev/null
+++ b/tools/idea/pom.xml
@@ -0,0 +1,50 @@
+
+
+
+
+ teavm
+ org.teavm
+ 0.5.0-SNAPSHOT
+ ../../pom.xml
+
+ 4.0.0
+
+ teavm-idea-parent
+ TeaVM IDEA plugin parent
+ pom
+
+
+ ${basedir}
+
+
+
+
+ IDEA
+ file://${idea.artifacts.dir}/idea-artifacts/dependencies/maven
+
+
+
+
+ idea-artifacts
+ jps-common
+ jps-plugin
+ plugin
+
+
+
\ No newline at end of file
diff --git a/tools/idea/teavm-idea-parent.iml b/tools/idea/teavm-idea-parent.iml
new file mode 100644
index 000000000..66b3d797e
--- /dev/null
+++ b/tools/idea/teavm-idea-parent.iml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/tools/idea/teavm/pom.xml b/tools/idea/teavm/pom.xml
new file mode 100644
index 000000000..7800812bf
--- /dev/null
+++ b/tools/idea/teavm/pom.xml
@@ -0,0 +1,90 @@
+
+
+ 4.0.0
+
+
+ org.teavm
+ teavm
+ 0.5.0-SNAPSHOT
+ ../../..
+
+
+ teavm-idea-jps-repack
+
+
+
+ org.teavm
+ teavm-tooling
+ ${project.version}
+
+
+ org.slf4j
+ slf4j-api
+
+
+
+
+ org.teavm
+ teavm-chrome-rdp
+ ${project.version}
+
+
+ org.slf4j
+ slf4j-api
+
+
+
+
+ org.teavm
+ teavm-metaprogramming-impl
+ ${project.version}
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-shade-plugin
+ 2.4.3
+
+
+ package
+
+ shade
+
+
+
+
+ org.objectweb.asm
+ org.teavm.asm
+
+
+ org.objectweb.asm
+ org.teavm.asm
+
+
+ false
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/tools/idea/teavm/teavm-idea-jps-repack.iml b/tools/idea/teavm/teavm-idea-jps-repack.iml
new file mode 100644
index 000000000..bf64d3e1e
--- /dev/null
+++ b/tools/idea/teavm/teavm-idea-jps-repack.iml
@@ -0,0 +1,47 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file