diff --git a/platform/lang-impl/src/com/intellij/application/options/codeStyle/CodeStyleSchemesPanel.java b/platform/lang-impl/src/com/intellij/application/options/codeStyle/CodeStyleSchemesPanel.java index b6a1add548d4..b1bac0db77e2 100644 --- a/platform/lang-impl/src/com/intellij/application/options/codeStyle/CodeStyleSchemesPanel.java +++ b/platform/lang-impl/src/com/intellij/application/options/codeStyle/CodeStyleSchemesPanel.java @@ -145,19 +145,20 @@ public class CodeStyleSchemesPanel { } private void createUIComponents() { - ManageSchemesComboAction manageSchemesComboAction = new ManageSchemesComboAction(new CodeStyleSchemesActions(myModel) { - @NotNull - @Override - protected JComponent getParentComponent() { - return myPanel; - } + ManageSchemesComboAction manageSchemesComboAction = + new ManageSchemesComboAction<>(new CodeStyleSchemesActions(myModel) { + @NotNull + @Override + protected JComponent getParentComponent() { + return myPanel; + } - @Nullable - @Override - protected CodeStyleScheme getCurrentScheme() { - return getSelectedScheme(); - } - }); + @Nullable + @Override + protected CodeStyleScheme getCurrentScheme() { + return getSelectedScheme(); + } + }); myManageButton = manageSchemesComboAction.createCombo(); } diff --git a/platform/lang-impl/src/com/intellij/application/options/colors/SchemesPanel.java b/platform/lang-impl/src/com/intellij/application/options/colors/SchemesPanel.java index 699970f53884..eca8a685b483 100644 --- a/platform/lang-impl/src/com/intellij/application/options/colors/SchemesPanel.java +++ b/platform/lang-impl/src/com/intellij/application/options/colors/SchemesPanel.java @@ -87,13 +87,14 @@ public class SchemesPanel extends JPanel implements SkipSelfSearchComponent { panel.add(mySchemeComboBox, new GridBagConstraints(gridx++, 0, 1, 1, 0, 0, GridBagConstraints.WEST, GridBagConstraints.VERTICAL, new JBInsets(0, 0, 5, 10), 0, 0)); - ManageSchemesComboAction schemesComboAction = new ManageSchemesComboAction(new ColorSchemeActions(this, myOptions) { - @Nullable - @Override - protected EditorColorsScheme getCurrentScheme() { - return myOptions.getScheme(getSelectedSchemeName()); - } - }); + ManageSchemesComboAction schemesComboAction = + new ManageSchemesComboAction<>(new ColorSchemeActions(this, myOptions) { + @Nullable + @Override + protected EditorColorsScheme getCurrentScheme() { + return myOptions.getScheme(getSelectedSchemeName()); + } + }); JButton manageButton = schemesComboAction.createCombo(); panel.add(manageButton, new GridBagConstraints(gridx++, 0, 1, 1, 0, 0, GridBagConstraints.WEST, GridBagConstraints.VERTICAL, new JBInsets(0, 0, 5, 5), diff --git a/platform/lang-impl/src/com/intellij/ui/ManageSchemesComboAction.java b/platform/lang-impl/src/com/intellij/ui/ManageSchemesComboAction.java index 2b02d7245274..8b35a36b4230 100644 --- a/platform/lang-impl/src/com/intellij/ui/ManageSchemesComboAction.java +++ b/platform/lang-impl/src/com/intellij/ui/ManageSchemesComboAction.java @@ -22,16 +22,17 @@ import com.intellij.openapi.actionSystem.DefaultActionGroup; import com.intellij.openapi.actionSystem.Presentation; import com.intellij.openapi.actionSystem.ex.ComboBoxAction; import com.intellij.application.options.DefaultSchemeActions; +import com.intellij.openapi.options.Scheme; import org.jetbrains.annotations.NotNull; import javax.swing.*; import java.util.Collection; -public class ManageSchemesComboAction extends ComboBoxAction { +public class ManageSchemesComboAction extends ComboBoxAction { private Collection myActions; - public ManageSchemesComboAction(@NotNull DefaultSchemeActions schemeActions) { + public ManageSchemesComboAction(@NotNull DefaultSchemeActions schemeActions) { myActions = schemeActions.getActions(); }