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
@@ -32,13 +32,17 @@ import static org.jetbrains.jet.cli.common.messages.CompilerMessageSeverity.ERRO
public final class CompilerEnvironment {
@NotNull
public static CompilerEnvironment getEnvironmentFor(boolean tests, File mainOutput, File outputDirectoryForTests) {
public static CompilerEnvironment getEnvironmentFor(boolean tests, @Nullable File mainOutput, @Nullable File outputDirectoryForTests) {
final File outputDir = tests ? outputDirectoryForTests : mainOutput;
return getEnvironmentFor(outputDir);
}
public static CompilerEnvironment getEnvironmentFor(File outputDir) {
public static CompilerEnvironment getEnvironmentFor(@Nullable File outputDir) {
File kotlinHome = PathUtil.getDefaultCompilerPath();
return getEnvironmentFor(kotlinHome, outputDir);
}
public static CompilerEnvironment getEnvironmentFor(@Nullable File kotlinHome, @Nullable File outputDir) {
return new CompilerEnvironment(kotlinHome, outputDir);
}