Skip to content

Commit 0f65e53

Browse files
committed
Changed FilteredComboBox to JComboBox
1 parent e3df4d3 commit 0f65e53

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

src/com/magento/idea/magento2plugin/actions/generation/dialog/OverrideInTheme.form

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
<text resource-bundle="magento2/common" key="common.theme.target"/>
7373
</properties>
7474
</component>
75-
<component id="bd654" class="com.magento.idea.magento2plugin.ui.FilteredComboBox" binding="theme" custom-create="true">
75+
<component id="bd654" class="javax.swing.JComboBox" binding="theme">
7676
<constraints>
7777
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false">
7878
<preferred-size width="319" height="30"/>

src/com/magento/idea/magento2plugin/actions/generation/dialog/OverrideInThemeDialog.java

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@
1212
import com.magento.idea.magento2plugin.actions.generation.dialog.validator.rule.NotEmptyRule;
1313
import com.magento.idea.magento2plugin.actions.generation.generator.OverrideInThemeGenerator;
1414
import com.magento.idea.magento2plugin.indexes.ModuleIndex;
15-
import com.magento.idea.magento2plugin.ui.FilteredComboBox;
1615
import java.awt.event.ActionEvent;
1716
import java.awt.event.KeyEvent;
1817
import java.awt.event.WindowAdapter;
1918
import java.awt.event.WindowEvent;
2019
import java.util.List;
2120
import javax.swing.JButton;
21+
import javax.swing.JComboBox;
2222
import javax.swing.JComponent;
2323
import javax.swing.JLabel;
2424
import 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

Comments
 (0)