J2K PathUtil: convert and prettify
This commit is contained in:
@@ -24,7 +24,6 @@ import com.intellij.openapi.components.ServiceManager
|
||||
import com.intellij.openapi.module.Module
|
||||
import com.intellij.openapi.project.Project
|
||||
import com.intellij.openapi.projectRoots.JavaSdkType
|
||||
import com.intellij.openapi.projectRoots.JdkUtil
|
||||
import com.intellij.openapi.projectRoots.SimpleJavaSdkType
|
||||
import com.intellij.openapi.roots.ModuleRootManager
|
||||
import com.intellij.openapi.roots.OrderEnumerator
|
||||
@@ -68,7 +67,7 @@ class KotlinConsoleKeeper(val project: Project) {
|
||||
// use to debug repl process
|
||||
//paramList.add("-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5005")
|
||||
|
||||
val kotlinPaths = PathUtil.getKotlinPathsForIdeaPlugin()
|
||||
val kotlinPaths = PathUtil.kotlinPathsForIdeaPlugin
|
||||
val replClassPath = listOf(kotlinPaths.compilerPath, kotlinPaths.reflectPath, kotlinPaths.stdlibPath, kotlinPaths.scriptRuntimePath)
|
||||
.joinToString(File.pathSeparator) { it.absolutePath }
|
||||
|
||||
@@ -112,4 +111,4 @@ class KotlinConsoleKeeper(val project: Project) {
|
||||
companion object {
|
||||
@JvmStatic fun getInstance(project: Project) = ServiceManager.getService(project, KotlinConsoleKeeper::class.java)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ class KotlinJsr223JvmScriptEngine4Idea(
|
||||
) : KotlinJsr223JvmScriptEngineBase(factory) {
|
||||
|
||||
private val daemon by lazy {
|
||||
val path = PathUtil.getKotlinPathsForIdeaPlugin().compilerPath
|
||||
val path = PathUtil.kotlinPathsForIdeaPlugin.compilerPath
|
||||
assert(path.exists())
|
||||
val compilerId = CompilerId.makeCompilerId(path)
|
||||
val daemonOptions = configureDaemonOptions()
|
||||
|
||||
+2
-2
@@ -58,7 +58,7 @@ fun classpathFromClassloader(classLoader: ClassLoader): List<File>? =
|
||||
private val kotlinCompilerJar: File by lazy {
|
||||
// highest prio - explicit property
|
||||
System.getProperty("kotlin.compiler.jar")?.let(::File)?.takeIf(File::exists)
|
||||
?: PathUtil.getKotlinPathsForIdeaPlugin().compilerPath
|
||||
?: PathUtil.kotlinPathsForIdeaPlugin.compilerPath
|
||||
?: throw FileNotFoundException("Cannot find kotlin compiler jar, set kotlin.compiler.jar property to proper location")
|
||||
}
|
||||
|
||||
@@ -83,4 +83,4 @@ private val kotlinScriptRuntimeJar: File? by lazy {
|
||||
?: File(kotlinCompilerJar.parentFile, KOTLIN_JAVA_SCRIPT_RUNTIME_JAR).takeIf(File::exists)
|
||||
}
|
||||
|
||||
private val kotlinScriptStandardJars by lazy { listOf(kotlinStdlibJar, kotlinScriptRuntimeJar) }
|
||||
private val kotlinScriptStandardJars by lazy { listOf(kotlinStdlibJar, kotlinScriptRuntimeJar) }
|
||||
|
||||
Reference in New Issue
Block a user