diff --git a/.idea/artifacts/KotlinPlugin.xml b/.idea/artifacts/KotlinPlugin.xml
index da1ee9fc79d..1c420dbd6a4 100644
--- a/.idea/artifacts/KotlinPlugin.xml
+++ b/.idea/artifacts/KotlinPlugin.xml
@@ -63,6 +63,7 @@
+
diff --git a/.idea/modules.xml b/.idea/modules.xml
index 9750bc63f42..520fa2e16e7 100644
--- a/.idea/modules.xml
+++ b/.idea/modules.xml
@@ -53,6 +53,7 @@
+
diff --git a/idea-runner/idea-runner.iml b/idea-runner/idea-runner.iml
index 5a92c8b9b7f..fff656069dc 100644
--- a/idea-runner/idea-runner.iml
+++ b/idea-runner/idea-runner.iml
@@ -11,5 +11,6 @@
+
\ No newline at end of file
diff --git a/idea/idea-gradle/idea-gradle.iml b/idea/idea-gradle/idea-gradle.iml
index 3c02f5bffbe..0e961ca52c6 100644
--- a/idea/idea-gradle/idea-gradle.iml
+++ b/idea/idea-gradle/idea-gradle.iml
@@ -19,5 +19,6 @@
+
\ No newline at end of file
diff --git a/idea/idea-jvm/idea-jvm.iml b/idea/idea-jvm/idea-jvm.iml
new file mode 100644
index 00000000000..d203961955b
--- /dev/null
+++ b/idea/idea-jvm/idea-jvm.iml
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/idea/src/META-INF/coverage.xml b/idea/idea-jvm/src/META-INF/coverage.xml
similarity index 100%
rename from idea/src/META-INF/coverage.xml
rename to idea/idea-jvm/src/META-INF/coverage.xml
diff --git a/idea/src/META-INF/decompiler.xml b/idea/idea-jvm/src/META-INF/decompiler.xml
similarity index 100%
rename from idea/src/META-INF/decompiler.xml
rename to idea/idea-jvm/src/META-INF/decompiler.xml
diff --git a/idea/src/META-INF/junit.xml b/idea/idea-jvm/src/META-INF/junit.xml
similarity index 100%
rename from idea/src/META-INF/junit.xml
rename to idea/idea-jvm/src/META-INF/junit.xml
diff --git a/idea/src/META-INF/testng-j.xml b/idea/idea-jvm/src/META-INF/testng-j.xml
similarity index 100%
rename from idea/src/META-INF/testng-j.xml
rename to idea/idea-jvm/src/META-INF/testng-j.xml
diff --git a/idea/src/org/jetbrains/kotlin/idea/coverage/KotlinCoverageExtension.kt b/idea/idea-jvm/src/org/jetbrains/kotlin/idea/coverage/KotlinCoverageExtension.kt
similarity index 99%
rename from idea/src/org/jetbrains/kotlin/idea/coverage/KotlinCoverageExtension.kt
rename to idea/idea-jvm/src/org/jetbrains/kotlin/idea/coverage/KotlinCoverageExtension.kt
index 46e5b4a02e5..98175f337ee 100644
--- a/idea/src/org/jetbrains/kotlin/idea/coverage/KotlinCoverageExtension.kt
+++ b/idea/idea-jvm/src/org/jetbrains/kotlin/idea/coverage/KotlinCoverageExtension.kt
@@ -1,5 +1,5 @@
/*
- * Copyright 2010-2015 JetBrains s.r.o.
+ * Copyright 2010-2017 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/idea/idea-jvm/src/org/jetbrains/kotlin/idea/internal/DecompiledFileWritingAccessProvider.kt b/idea/idea-jvm/src/org/jetbrains/kotlin/idea/internal/DecompiledFileWritingAccessProvider.kt
new file mode 100644
index 00000000000..192175a03f5
--- /dev/null
+++ b/idea/idea-jvm/src/org/jetbrains/kotlin/idea/internal/DecompiledFileWritingAccessProvider.kt
@@ -0,0 +1,32 @@
+/*
+ * Copyright 2010-2017 JetBrains s.r.o.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.jetbrains.kotlin.idea.internal
+
+import com.intellij.openapi.vfs.VirtualFile
+import com.intellij.openapi.vfs.WritingAccessProvider
+import com.intellij.openapi.vfs.ex.dummy.DummyFileSystem
+
+class DecompiledFileWritingAccessProvider : WritingAccessProvider() {
+ override fun isPotentiallyWritable(file: VirtualFile): Boolean {
+ if (file.fileSystem is DummyFileSystem && file.parent?.name == KOTLIN_DECOMPILED_FOLDER) {
+ return false
+ }
+ return true
+ }
+
+ override fun requestWriting(vararg files: VirtualFile): Collection = emptyList()
+}
\ No newline at end of file
diff --git a/idea/src/org/jetbrains/kotlin/idea/internal/KotlinDecompilerServiceImpl.kt b/idea/idea-jvm/src/org/jetbrains/kotlin/idea/internal/KotlinDecompilerServiceImpl.kt
similarity index 99%
rename from idea/src/org/jetbrains/kotlin/idea/internal/KotlinDecompilerServiceImpl.kt
rename to idea/idea-jvm/src/org/jetbrains/kotlin/idea/internal/KotlinDecompilerServiceImpl.kt
index 23e09906b85..cb7fc5b7633 100644
--- a/idea/src/org/jetbrains/kotlin/idea/internal/KotlinDecompilerServiceImpl.kt
+++ b/idea/idea-jvm/src/org/jetbrains/kotlin/idea/internal/KotlinDecompilerServiceImpl.kt
@@ -1,5 +1,5 @@
/*
- * Copyright 2010-2016 JetBrains s.r.o.
+ * Copyright 2010-2017 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/idea/src/org/jetbrains/kotlin/idea/run/KotlinJUnitRunConfigurationProducer.kt b/idea/idea-jvm/src/org/jetbrains/kotlin/idea/run/KotlinJUnitRunConfigurationProducer.kt
similarity index 99%
rename from idea/src/org/jetbrains/kotlin/idea/run/KotlinJUnitRunConfigurationProducer.kt
rename to idea/idea-jvm/src/org/jetbrains/kotlin/idea/run/KotlinJUnitRunConfigurationProducer.kt
index 5c9edb16d5c..60ee2bf9b00 100644
--- a/idea/src/org/jetbrains/kotlin/idea/run/KotlinJUnitRunConfigurationProducer.kt
+++ b/idea/idea-jvm/src/org/jetbrains/kotlin/idea/run/KotlinJUnitRunConfigurationProducer.kt
@@ -1,5 +1,5 @@
/*
- * Copyright 2010-2015 JetBrains s.r.o.
+ * Copyright 2010-2017 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/idea/src/org/jetbrains/kotlin/idea/run/KotlinPatternConfigurationProducer.kt b/idea/idea-jvm/src/org/jetbrains/kotlin/idea/run/KotlinPatternConfigurationProducer.kt
similarity index 100%
rename from idea/src/org/jetbrains/kotlin/idea/run/KotlinPatternConfigurationProducer.kt
rename to idea/idea-jvm/src/org/jetbrains/kotlin/idea/run/KotlinPatternConfigurationProducer.kt
diff --git a/idea/src/org/jetbrains/kotlin/idea/run/KotlinTestNgConfigurationProducer.java b/idea/idea-jvm/src/org/jetbrains/kotlin/idea/run/KotlinTestNgConfigurationProducer.java
similarity index 100%
rename from idea/src/org/jetbrains/kotlin/idea/run/KotlinTestNgConfigurationProducer.java
rename to idea/idea-jvm/src/org/jetbrains/kotlin/idea/run/KotlinTestNgConfigurationProducer.java
diff --git a/idea/idea.iml b/idea/idea.iml
index 3d53da45eb7..b915506fe67 100644
--- a/idea/idea.iml
+++ b/idea/idea.iml
@@ -25,8 +25,6 @@
-
-
@@ -37,7 +35,6 @@
-
@@ -53,7 +50,6 @@
-
diff --git a/idea/src/org/jetbrains/kotlin/idea/internal/KotlinDecompilerAdapter.kt b/idea/src/org/jetbrains/kotlin/idea/internal/KotlinDecompilerAdapter.kt
index 726bc65ba04..136741fbdba 100644
--- a/idea/src/org/jetbrains/kotlin/idea/internal/KotlinDecompilerAdapter.kt
+++ b/idea/src/org/jetbrains/kotlin/idea/internal/KotlinDecompilerAdapter.kt
@@ -22,7 +22,6 @@ import com.intellij.openapi.util.io.FileUtil
import com.intellij.openapi.vfs.VfsUtil
import com.intellij.openapi.vfs.VirtualFile
import com.intellij.openapi.vfs.VirtualFileManager
-import com.intellij.openapi.vfs.WritingAccessProvider
import com.intellij.openapi.vfs.ex.dummy.DummyFileSystem
import org.jetbrains.kotlin.idea.util.application.runWriteAction
import org.jetbrains.kotlin.psi.KtFile
@@ -52,13 +51,3 @@ fun getOrCreateDummyRoot(): VirtualFile =
VirtualFileManager.getInstance().refreshAndFindFileByUrl(KOTLIN_DECOMPILED_ROOT) ?:
DummyFileSystem.getInstance().createRoot(KOTLIN_DECOMPILED_FOLDER)
-class DecompiledFileWritingAccessProvider : WritingAccessProvider() {
- override fun isPotentiallyWritable(file: VirtualFile): Boolean {
- if (file.fileSystem is DummyFileSystem && file.parent?.name == KOTLIN_DECOMPILED_FOLDER) {
- return false
- }
- return true
- }
-
- override fun requestWriting(vararg files: VirtualFile): Collection = emptyList()
-}
diff --git a/idea/tests/org/jetbrains/kotlin/idea/WordSelectionTest.java b/idea/tests/org/jetbrains/kotlin/idea/WordSelectionTest.java
index 056c59d2fdb..714f40d6f61 100644
--- a/idea/tests/org/jetbrains/kotlin/idea/WordSelectionTest.java
+++ b/idea/tests/org/jetbrains/kotlin/idea/WordSelectionTest.java
@@ -16,6 +16,7 @@
package org.jetbrains.kotlin.idea;
+import com.google.common.collect.Lists;
import com.intellij.openapi.editor.Caret;
import com.intellij.openapi.editor.Editor;
import com.intellij.rt.execution.junit.FileComparisonFailure;
@@ -26,7 +27,6 @@ import org.jetbrains.kotlin.idea.test.KotlinLightCodeInsightFixtureTestCase;
import org.jetbrains.kotlin.idea.test.PluginTestCaseBase;
import org.jetbrains.kotlin.test.KotlinTestUtils;
import org.jetbrains.kotlin.test.TagsTestDataUtil;
-import org.testng.collections.Lists;
import java.io.File;