--- /dev/null
+package com.intellij.ide.customize;
+
+import java.awt.event.ActionListener;
+
+/**
+ * Allows customization of initial wizard dialog.
+ *
+ * Must have a constructor with four params: @NotNull CustomizeIDEWizardStepsProvider stepsProvider, @Nullable StartupUtil.AppStarter appStarter,
+ * boolean beforeSplash, boolean afterSplash
+ */
+public interface CommonCustomizeIDEWizardDialog extends ActionListener {
+ void show();
+
+ boolean showIfNeeded();
+
+ void doCancelAction();
+}
import static com.intellij.openapi.util.text.HtmlChunk.*;
-public class CustomizeIDEWizardDialog extends DialogWrapper implements CustomizeIDEWizardDialogInterface {
+public class CustomizeIDEWizardDialog extends DialogWrapper implements CommonCustomizeIDEWizardDialog {
protected static final String BUTTONS = "BUTTONS";
protected static final String NO_BUTTONS = "NO_BUTTONS";
}
@Contract(value = "!null->!null" ,pure = true)
- protected static String ensureHTML(@Nullable String s) {
+ private static String ensureHTML(@Nullable String s) {
return s == null ? null : s.startsWith("<html>") ? s : "<html>" + StringUtil.escapeXmlEntities(s) + "</html>";
}
}
\ No newline at end of file
+++ /dev/null
-package com.intellij.ide.customize;
-
-import org.jetbrains.annotations.NotNull;
-
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
-
-public interface CustomizeIDEWizardDialogInterface extends ActionListener {
- void show();
-
- boolean showIfNeeded();
-
- @Override
- void actionPerformed(@NotNull ActionEvent e);
-
- void doCancelAction();
-}
import com.intellij.diagnostic.StartUpMeasurer;
import com.intellij.ide.*;
import com.intellij.ide.customize.AbstractCustomizeWizardStep;
+import com.intellij.ide.customize.CommonCustomizeIDEWizardDialog;
import com.intellij.ide.customize.CustomizeIDEWizardDialog;
-import com.intellij.ide.customize.CustomizeIDEWizardDialogInterface;
import com.intellij.ide.customize.CustomizeIDEWizardStepsProvider;
import com.intellij.ide.gdpr.Agreements;
import com.intellij.ide.gdpr.ConsentOptions;
Class<?> dialogClass = Class.forName(stepsDialogName);
Constructor<?> constr =
dialogClass.getConstructor(CustomizeIDEWizardStepsProvider.class, AppStarter.class, boolean.class, boolean.class);
- ((CustomizeIDEWizardDialogInterface)constr.newInstance(provider, appStarter, true, false)).showIfNeeded();
+ ((CommonCustomizeIDEWizardDialog)constr.newInstance(provider, appStarter, true, false)).showIfNeeded();
}
catch (Throwable e) {
- System.out.println("failed to start custom wizard: ");
- e.getCause().printStackTrace();
- new CustomizeIDEWizardDialog(provider, appStarter, true, false).showIfNeeded();
+ Main.showMessage("Configuration Wizard Failed", e); return;
}
}
else {