Search in sources :

Example 1 with CustomizeIDEWizardDialog

use of com.intellij.ide.customize.CustomizeIDEWizardDialog in project intellij-community by JetBrains.

the class StartupWizardAction method actionPerformed.

@Override
public void actionPerformed(@NotNull AnActionEvent e) {
    if (ApplicationManager.getApplication().isInternal()) {
        new CustomizeIDEWizardDialog(new CustomizeIdeaWizardStepsProvider()).show();
        return;
    }
    List<ApplicationInfoEx.PluginChooserPage> pages = ApplicationInfoEx.getInstanceEx().getPluginChooserPages();
    if (!pages.isEmpty()) {
        StartupWizard startupWizard = new StartupWizard(e.getProject(), pages);
        String title = ApplicationNamesInfo.getInstance().getFullProductName() + " Plugin Configuration Wizard";
        startupWizard.setTitle(title);
        startupWizard.show();
        if (startupWizard.getExitCode() == DialogWrapper.OK_EXIT_CODE) {
            Messages.showInfoMessage(e.getProject(), "Please restart the IDE to apply changes", title);
        }
    }
}
Also used : CustomizeIdeaWizardStepsProvider(com.intellij.ide.customize.CustomizeIdeaWizardStepsProvider) CustomizeIDEWizardDialog(com.intellij.ide.customize.CustomizeIDEWizardDialog)

Example 2 with CustomizeIDEWizardDialog

use of com.intellij.ide.customize.CustomizeIDEWizardDialog in project intellij-community by JetBrains.

the class StartupUtil method runStartupWizard.

static void runStartupWizard() {
    ApplicationInfoEx appInfo = ApplicationInfoImpl.getShadowInstance();
    String stepsProviderName = appInfo.getCustomizeIDEWizardStepsProvider();
    if (stepsProviderName != null) {
        CustomizeIDEWizardStepsProvider provider;
        try {
            Class<?> providerClass = Class.forName(stepsProviderName);
            provider = (CustomizeIDEWizardStepsProvider) providerClass.newInstance();
        } catch (Throwable e) {
            Main.showMessage("Configuration Wizard Failed", e);
            return;
        }
        CloudConfigProvider configProvider = CloudConfigProvider.getProvider();
        if (configProvider != null) {
            configProvider.beforeStartupWizard();
        }
        new CustomizeIDEWizardDialog(provider).show();
        PluginManagerCore.invalidatePlugins();
        if (configProvider != null) {
            configProvider.startupWizardFinished();
        }
        return;
    }
    List<ApplicationInfoEx.PluginChooserPage> pages = appInfo.getPluginChooserPages();
    if (!pages.isEmpty()) {
        new StartupWizard(pages).show();
        PluginManagerCore.invalidatePlugins();
    }
}
Also used : ApplicationInfoEx(com.intellij.openapi.application.ex.ApplicationInfoEx) CustomizeIDEWizardStepsProvider(com.intellij.ide.customize.CustomizeIDEWizardStepsProvider) CustomizeIDEWizardDialog(com.intellij.ide.customize.CustomizeIDEWizardDialog) CloudConfigProvider(com.intellij.ide.cloudConfig.CloudConfigProvider) StartupWizard(com.intellij.ide.startupWizard.StartupWizard)

Aggregations

CustomizeIDEWizardDialog (com.intellij.ide.customize.CustomizeIDEWizardDialog)2 CloudConfigProvider (com.intellij.ide.cloudConfig.CloudConfigProvider)1 CustomizeIDEWizardStepsProvider (com.intellij.ide.customize.CustomizeIDEWizardStepsProvider)1 CustomizeIdeaWizardStepsProvider (com.intellij.ide.customize.CustomizeIdeaWizardStepsProvider)1 StartupWizard (com.intellij.ide.startupWizard.StartupWizard)1 ApplicationInfoEx (com.intellij.openapi.application.ex.ApplicationInfoEx)1