1212import com .magento .idea .magento2plugin .actions .generation .dialog .validator .rule .NotEmptyRule ;
1313import com .magento .idea .magento2plugin .actions .generation .generator .OverrideInThemeGenerator ;
1414import com .magento .idea .magento2plugin .indexes .ModuleIndex ;
15- import com .magento .idea .magento2plugin .ui .FilteredComboBox ;
1615import java .awt .event .ActionEvent ;
1716import java .awt .event .KeyEvent ;
1817import java .awt .event .WindowAdapter ;
1918import java .awt .event .WindowEvent ;
2019import java .util .List ;
2120import javax .swing .JButton ;
21+ import javax .swing .JComboBox ;
2222import javax .swing .JComponent ;
2323import javax .swing .JLabel ;
2424import javax .swing .JPanel ;
@@ -37,7 +37,7 @@ public class OverrideInThemeDialog extends AbstractDialog {
3737
3838 @ FieldValidation (rule = RuleRegistry .NOT_EMPTY ,
3939 message = {NotEmptyRule .MESSAGE , THEME_NAME })
40- private FilteredComboBox theme ;
40+ private JComboBox theme ;
4141
4242 /**
4343 * Constructor.
@@ -54,6 +54,7 @@ public OverrideInThemeDialog(final @NotNull Project project, final PsiFile psiFi
5454 setContentPane (contentPane );
5555 setModal (true );
5656 getRootPane ().setDefaultButton (buttonOK );
57+ fillThemeOptions ();
5758
5859 buttonOK .addActionListener ((final ActionEvent event ) -> onOK ());
5960 buttonCancel .addActionListener ((final ActionEvent event ) -> onCancel ());
@@ -101,9 +102,10 @@ public static void open(final @NotNull Project project, final PsiFile psiFile) {
101102 dialog .setVisible (true );
102103 }
103104
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+ }
108110 }
109111}
0 commit comments