diff --git a/idea/src/org/jetbrains/jet/plugin/framework/ui/CreateJavaScriptLibraryDialogBase.form b/idea/src/org/jetbrains/jet/plugin/framework/ui/CreateJavaScriptLibraryDialogBase.form
index 7ac8871c90b..61ead4742cc 100644
--- a/idea/src/org/jetbrains/jet/plugin/framework/ui/CreateJavaScriptLibraryDialogBase.form
+++ b/idea/src/org/jetbrains/jet/plugin/framework/ui/CreateJavaScriptLibraryDialogBase.form
@@ -30,15 +30,6 @@
-
-
-
-
-
-
-
-
-
@@ -55,6 +46,14 @@
+
+
+
+
+
+
+
+
diff --git a/idea/src/org/jetbrains/jet/plugin/framework/ui/CreateJavaScriptLibraryDialogBase.java b/idea/src/org/jetbrains/jet/plugin/framework/ui/CreateJavaScriptLibraryDialogBase.java
index 1446969d132..999124e6591 100644
--- a/idea/src/org/jetbrains/jet/plugin/framework/ui/CreateJavaScriptLibraryDialogBase.java
+++ b/idea/src/org/jetbrains/jet/plugin/framework/ui/CreateJavaScriptLibraryDialogBase.java
@@ -34,7 +34,6 @@ public abstract class CreateJavaScriptLibraryDialogBase extends DialogWrapper im
protected JPanel contentPane;
protected JCheckBox copyJarCheckbox;
- protected JCheckBox copyJsFilesCheckbox;
protected JPanel copyJsFilesPanelPlace;
protected JPanel copyJarFilePanelPlace;
protected JLabel compilerTextLabel;
@@ -77,24 +76,20 @@ public abstract class CreateJavaScriptLibraryDialogBase extends DialogWrapper im
if (!showPathToJsFilePanel) {
copyJsFilesPanelPlace.setVisible(false);
- copyJsFilesCheckbox.setVisible(false);
}
- ActionListener updateComponentsListener = new ActionListener() {
+ copyJarCheckbox.addActionListener(new ActionListener() {
@Override
public void actionPerformed(@NotNull ActionEvent e) {
updateComponents();
}
- };
-
- copyJarCheckbox.addActionListener(updateComponentsListener);
- copyJsFilesCheckbox.addActionListener(updateComponentsListener);
+ });
}
@Override
@Nullable
public String getCopyJsIntoPath() {
- if (!copyJsFilesCheckbox.isSelected()) return null;
+ if (!copyJsFilesPanelPlace.isVisible()) return null;
return copyJsFilesPanel.getPath();
}
@@ -106,7 +101,6 @@ public abstract class CreateJavaScriptLibraryDialogBase extends DialogWrapper im
protected void updateComponents() {
copyJarPanel.setEnabled(copyJarCheckbox.isSelected());
- copyJsFilesPanel.setEnabled(copyJsFilesCheckbox.isSelected());
setOKActionEnabled(!copyJsFilesPanel.hasErrors() && !copyJarPanel.hasErrors());
}