introduce beforeOKAction()

This commit is contained in:
Gregory.Shrago
2014-04-22 23:58:34 +04:00
parent 13bf7e1135
commit 3541938c9b
2 changed files with 9 additions and 1 deletions
@@ -35,7 +35,8 @@ public abstract class AbstractCustomizeWizardStep extends JPanel {
protected abstract String getHTMLFooter();
private static Color getSelectionBackground() {
@NotNull
protected static Color getSelectionBackground() {
return ColorUtil.mix(UIUtil.getListSelectionBackground(), UIUtil.getLabelBackground(), .75);
}
@@ -75,4 +76,8 @@ public abstract class AbstractCustomizeWizardStep extends JPanel {
public void beforeShown(boolean forward) {
}
public boolean beforeOkAction() {
return true;
}
}
@@ -141,6 +141,9 @@ public class CustomizeIDEWizardDialog extends DialogWrapper implements ActionLis
@Override
protected void doOKAction() {
for (AbstractCustomizeWizardStep step : mySteps) {
if (!step.beforeOkAction()) return;
}
try {
PluginManager.saveDisabledPlugins(PluginGroups.getInstance().getDisabledPluginIds(), false);
}