KT-3056 Kotlin: Cannot find kotlinc home. Make sure plugin is properly installed

#KT-3056 Fixed
This commit is contained in:
Andrey Breslav
2012-11-21 14:09:39 +04:00
parent 19e283a333
commit 4ee76a6649
4 changed files with 23 additions and 3 deletions
@@ -67,6 +67,20 @@ public class PathUtil {
return null;
}
public static File getCompilerPathForJpsPlugin() {
File plugin_jar_path = new File(getJarPathForClass(PathUtil.class));
if (!plugin_jar_path.exists()) return null;
if (plugin_jar_path.getName().equals("kotlin-jps-plugin.jar")) {
File pluginHome = plugin_jar_path.getParentFile().getParentFile().getParentFile();
File answer = new File(pluginHome, "kotlinc");
return answer.exists() ? answer : null;
}
return null;
}
@Nullable
public static File getDefaultRuntimePath() {
return getFilePackedIntoLib("kotlin-runtime.jar");