|
33 | 33 | import com.intellij.ui.RawCommandLineEditor;
|
34 | 34 | import com.intellij.util.text.VersionComparatorUtil;
|
35 | 35 | import com.intellij.util.ui.ThreeStateCheckBox;
|
| 36 | +import com.intellij.util.ui.UIUtil; |
36 | 37 | import kotlin.collections.ArraysKt;
|
37 | 38 | import kotlin.jvm.functions.Function0;
|
38 | 39 | import kotlin.jvm.functions.Function1;
|
@@ -105,6 +106,8 @@ public class KotlinCompilerConfigurableTab implements SearchableConfigurable, Co
|
105 | 106 | private JComboBox apiVersionComboBox;
|
106 | 107 | private JPanel scriptPanel;
|
107 | 108 |
|
| 109 | + private boolean isEnabled = true; |
| 110 | + |
108 | 111 | public KotlinCompilerConfigurableTab(
|
109 | 112 | Project project,
|
110 | 113 | CommonCompilerArguments commonCompilerArguments,
|
@@ -143,8 +146,10 @@ public void actionPerformed(ActionEvent e) {
|
143 | 146 | copyRuntimeFilesCheckBox.addChangeListener(new ChangeListener() {
|
144 | 147 | @Override
|
145 | 148 | public void stateChanged(@NotNull ChangeEvent e) {
|
146 |
| - outputDirectory.setEnabled(copyRuntimeFilesCheckBox.isSelected()); |
147 |
| - labelForOutputDirectory.setEnabled(copyRuntimeFilesCheckBox.isSelected()); |
| 149 | + if (isEnabled) { |
| 150 | + outputDirectory.setEnabled(copyRuntimeFilesCheckBox.isSelected()); |
| 151 | + labelForOutputDirectory.setEnabled(copyRuntimeFilesCheckBox.isSelected()); |
| 152 | + } |
148 | 153 | }
|
149 | 154 | });
|
150 | 155 |
|
@@ -501,4 +506,9 @@ public JComboBox getApiVersionComboBox() {
|
501 | 506 | public JComboBox getCoroutineSupportComboBox() {
|
502 | 507 | return coroutineSupportComboBox;
|
503 | 508 | }
|
| 509 | + |
| 510 | + public void setEnabled(boolean value) { |
| 511 | + isEnabled = value; |
| 512 | + UIUtil.setEnabled(getContentPane(), value, true); |
| 513 | + } |
504 | 514 | }
|
0 commit comments