diff --git a/idea/tests/org/jetbrains/kotlin/idea/configuration/AbstractConfigureKotlinTest.kt b/idea/tests/org/jetbrains/kotlin/idea/configuration/AbstractConfigureKotlinTest.kt index eeb7fb87edd..b6019871b20 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/configuration/AbstractConfigureKotlinTest.kt +++ b/idea/tests/org/jetbrains/kotlin/idea/configuration/AbstractConfigureKotlinTest.kt @@ -33,6 +33,7 @@ import junit.framework.TestCase import org.jetbrains.kotlin.idea.configuration.KotlinWithLibraryConfigurator.FileState import org.jetbrains.kotlin.idea.framework.KotlinSdkType import org.jetbrains.kotlin.idea.test.PluginTestCaseBase +import org.jetbrains.kotlin.test.KotlinTestUtils import org.jetbrains.kotlin.utils.PathUtil import java.io.File import java.nio.file.Path @@ -41,25 +42,12 @@ abstract class AbstractConfigureKotlinTest : PlatformTestCase() { override fun setUp() { super.setUp() - val distPaths = with(PathUtil.kotlinPathsForIdeaPlugin) { - listOf( - stdlibPath, - stdlibSourcesPath, - reflectPath, - kotlinTestPath, - jsKotlinTestJarPath, - jsStdLibJarPath, - jsStdLibSrcJarPath - ) - } - - for (path in distPaths) { - VfsRootAccess.allowRootAccess(testRootDisposable, path.absolutePath) - } + VfsRootAccess.allowRootAccess(KotlinTestUtils.getHomeDirectory()) } @Throws(Exception::class) override fun tearDown() { + VfsRootAccess.disallowRootAccess(KotlinTestUtils.getHomeDirectory()) PathMacros.getInstance().removeMacro(TEMP_DIR_MACRO_KEY) super.tearDown() diff --git a/idea/tests/org/jetbrains/kotlin/idea/configuration/AbstractConfigureKotlinTest.kt.173 b/idea/tests/org/jetbrains/kotlin/idea/configuration/AbstractConfigureKotlinTest.kt.173 index f3d2c438de6..90c0a8985d6 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/configuration/AbstractConfigureKotlinTest.kt.173 +++ b/idea/tests/org/jetbrains/kotlin/idea/configuration/AbstractConfigureKotlinTest.kt.173 @@ -33,6 +33,7 @@ import junit.framework.TestCase import org.jetbrains.kotlin.idea.configuration.KotlinWithLibraryConfigurator.FileState import org.jetbrains.kotlin.idea.framework.KotlinSdkType import org.jetbrains.kotlin.idea.test.PluginTestCaseBase +import org.jetbrains.kotlin.test.KotlinTestUtils import org.jetbrains.kotlin.utils.PathUtil import java.io.File import java.io.IOException @@ -41,25 +42,12 @@ abstract class AbstractConfigureKotlinTest : PlatformTestCase() { override fun setUp() { super.setUp() - val distPaths = with(PathUtil.kotlinPathsForIdeaPlugin) { - listOf( - stdlibPath, - stdlibSourcesPath, - reflectPath, - kotlinTestPath, - jsKotlinTestJarPath, - jsStdLibJarPath, - jsStdLibSrcJarPath - ) - } - - for (path in distPaths) { - VfsRootAccess.allowRootAccess(testRootDisposable, path.absolutePath) - } + VfsRootAccess.allowRootAccess(KotlinTestUtils.getHomeDirectory()) } @Throws(Exception::class) override fun tearDown() { + VfsRootAccess.disallowRootAccess(KotlinTestUtils.getHomeDirectory()) PathMacros.getInstance().removeMacro(TEMP_DIR_MACRO_KEY) super.tearDown() diff --git a/idea/tests/org/jetbrains/kotlin/idea/configuration/AbstractConfigureKotlinTest.kt.181 b/idea/tests/org/jetbrains/kotlin/idea/configuration/AbstractConfigureKotlinTest.kt.181 index ad78c79bb86..78ac56870ea 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/configuration/AbstractConfigureKotlinTest.kt.181 +++ b/idea/tests/org/jetbrains/kotlin/idea/configuration/AbstractConfigureKotlinTest.kt.181 @@ -33,6 +33,7 @@ import junit.framework.TestCase import org.jetbrains.kotlin.idea.configuration.KotlinWithLibraryConfigurator.FileState import org.jetbrains.kotlin.idea.framework.KotlinSdkType import org.jetbrains.kotlin.idea.test.PluginTestCaseBase +import org.jetbrains.kotlin.test.KotlinTestUtils import org.jetbrains.kotlin.utils.PathUtil import java.io.File import java.nio.file.Path @@ -41,25 +42,12 @@ abstract class AbstractConfigureKotlinTest : PlatformTestCase() { override fun setUp() { super.setUp() - val distPaths = with(PathUtil.kotlinPathsForIdeaPlugin) { - listOf( - stdlibPath, - stdlibSourcesPath, - reflectPath, - kotlinTestPath, - jsKotlinTestJarPath, - jsStdLibJarPath, - jsStdLibSrcJarPath - ) - } - - for (path in distPaths) { - VfsRootAccess.allowRootAccess(testRootDisposable, path.absolutePath) - } + VfsRootAccess.allowRootAccess(KotlinTestUtils.getHomeDirectory()) } @Throws(Exception::class) override fun tearDown() { + VfsRootAccess.disallowRootAccess(KotlinTestUtils.getHomeDirectory()) PathMacros.getInstance().removeMacro(TEMP_DIR_MACRO_KEY) super.tearDown()