'Configure as Kotlin (java) modules' doesn't work properly if several modules depends on KotlinJavaRuntime
#KT-5595 Fixed
This commit is contained in:
@@ -147,7 +147,7 @@ public class KotlinJsModuleConfigurator extends KotlinWithLibraryConfigurator {
|
||||
}
|
||||
|
||||
@NotNull
|
||||
private static String getDefaultPathToJsFile(@NotNull Project project) {
|
||||
protected String getDefaultPathToJsFile(@NotNull Project project) {
|
||||
return FileUIUtils.createRelativePath(project, project.getBaseDir(), "script");
|
||||
}
|
||||
|
||||
|
||||
@@ -41,6 +41,7 @@ import java.io.File;
|
||||
import static org.jetbrains.jet.plugin.configuration.ConfigureKotlinInProjectUtils.showInfoNotification;
|
||||
|
||||
public abstract class KotlinWithLibraryConfigurator implements KotlinProjectConfigurator {
|
||||
public static final String DEFAULT_LIBRARY_DIR = "lib";
|
||||
|
||||
@NotNull
|
||||
protected abstract String getLibraryName();
|
||||
@@ -376,8 +377,8 @@ public abstract class KotlinWithLibraryConfigurator implements KotlinProjectConf
|
||||
return !isProjectLibraryPresent(project) && !getFileInDir(getJarName(), defaultPath).exists();
|
||||
}
|
||||
|
||||
protected static String getDefaultPathToJarFile(@NotNull Project project) {
|
||||
return FileUIUtils.createRelativePath(project, project.getBaseDir(), "lib");
|
||||
protected String getDefaultPathToJarFile(@NotNull Project project) {
|
||||
return FileUIUtils.createRelativePath(project, project.getBaseDir(), DEFAULT_LIBRARY_DIR);
|
||||
}
|
||||
|
||||
protected void showError(@NotNull String message) {
|
||||
|
||||
@@ -73,7 +73,7 @@ public abstract class CreateJavaLibraryDialogBase extends DialogWrapper {
|
||||
|
||||
@Nullable
|
||||
public String getCopyIntoPath() {
|
||||
return pathPanel.getPath();
|
||||
return chooseLibraryPathPlace.isVisible() ? pathPanel.getPath() : null;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
|
||||
@@ -98,6 +98,7 @@ public abstract class CreateJavaScriptLibraryDialogBase extends DialogWrapper im
|
||||
@Override
|
||||
@Nullable
|
||||
public String getCopyLibraryIntoPath() {
|
||||
if (!copyLibraryPlace.isVisible()) return null;
|
||||
return copyLibraryFilePanel.getPath();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user