12
12
import com .magento .idea .magento2plugin .actions .generation .dialog .validator .rule .NotEmptyRule ;
13
13
import com .magento .idea .magento2plugin .actions .generation .generator .OverrideInThemeGenerator ;
14
14
import com .magento .idea .magento2plugin .indexes .ModuleIndex ;
15
- import com .magento .idea .magento2plugin .ui .FilteredComboBox ;
16
15
import java .awt .event .ActionEvent ;
17
16
import java .awt .event .KeyEvent ;
18
17
import java .awt .event .WindowAdapter ;
19
18
import java .awt .event .WindowEvent ;
20
19
import java .util .List ;
21
20
import javax .swing .JButton ;
21
+ import javax .swing .JComboBox ;
22
22
import javax .swing .JComponent ;
23
23
import javax .swing .JLabel ;
24
24
import javax .swing .JPanel ;
@@ -37,7 +37,7 @@ public class OverrideInThemeDialog extends AbstractDialog {
37
37
38
38
@ FieldValidation (rule = RuleRegistry .NOT_EMPTY ,
39
39
message = {NotEmptyRule .MESSAGE , THEME_NAME })
40
- private FilteredComboBox theme ;
40
+ private JComboBox theme ;
41
41
42
42
/**
43
43
* Constructor.
@@ -54,6 +54,7 @@ public OverrideInThemeDialog(final @NotNull Project project, final PsiFile psiFi
54
54
setContentPane (contentPane );
55
55
setModal (true );
56
56
getRootPane ().setDefaultButton (buttonOK );
57
+ fillThemeOptions ();
57
58
58
59
buttonOK .addActionListener ((final ActionEvent event ) -> onOK ());
59
60
buttonCancel .addActionListener ((final ActionEvent event ) -> onCancel ());
@@ -101,9 +102,10 @@ public static void open(final @NotNull Project project, final PsiFile psiFile) {
101
102
dialog .setVisible (true );
102
103
}
103
104
104
- private void createUIComponents () { //NOPMD
105
- final List <String > allThemesList = ModuleIndex .getInstance (project ).getEditableThemeNames ();
106
-
107
- this .theme = new FilteredComboBox (allThemesList );
105
+ private void fillThemeOptions () {
106
+ final List <String > themeNames = ModuleIndex .getInstance (project ).getEditableThemeNames ();
107
+ for (final String themeName : themeNames ) {
108
+ theme .addItem (themeName );
109
+ }
108
110
}
109
111
}
0 commit comments