From dee186de08877d9388d8c343d1b58e064e69906e Mon Sep 17 00:00:00 2001 From: "Natalia.Ukhorskaya" Date: Tue, 17 Sep 2013 15:18:13 +0400 Subject: [PATCH] Remove checkbox for copying js implementation files in 'Configure Kotlin as Javascript' dialog --- .../ui/CreateJavaScriptLibraryDialogBase.form | 17 ++++++++--------- .../ui/CreateJavaScriptLibraryDialogBase.java | 12 +++--------- 2 files changed, 11 insertions(+), 18 deletions(-) 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()); }