com.intellij.ide.util.projectWizard.ModuleWizardStep Java Examples

The following examples show how to use com.intellij.ide.util.projectWizard.ModuleWizardStep. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: PantsProjectImportProvider.java    From intellij-pants-plugin with Apache License 2.0 6 votes vote down vote up
@Override
public ModuleWizardStep[] createSteps(WizardContext context) {
  /**
   * Newer export version project sdk can be automatically discovered and configured.
   */
  AtomicBoolean isSdkConfigured = new AtomicBoolean(true);
  String message = PantsBundle.message("pants.default.sdk.config.progress");
  ProgressManager.getInstance().run(new Task.Modal(context.getProject(), message, !CAN_BE_CANCELLED) {
    @Override
    public void run(@NotNull ProgressIndicator indicator) {
      if (isSdkConfigured.get()) {
        isSdkConfigured.set(isJvmProject(context.getProjectFileDirectory()));
      }
    }
  });
  if (isSdkConfigured.get()) {
    return super.createSteps(context);
  }
  return ArrayUtil.append(super.createSteps(context), new ProjectJdkStep(context));
}
 
Example #2
Source File: RoboVmModuleBuilder.java    From robovm-idea with GNU General Public License v2.0 6 votes vote down vote up
@Override
public ModuleWizardStep[] createWizardSteps(WizardContext wizardContext, ModulesProvider modulesProvider) {
    RoboVmModuleWizardStep wizardStep = new RoboVmModuleWizardStep(this, wizardContext, modulesProvider);

    if (!robovmDir.isEmpty()) {
        wizardStep.disableBuildSystem();
        buildSystem = BuildSystem.Gradle;
    }

    if (!robovmDir.isEmpty() && !RoboVmPlugin.isAndroidSdkSetup()) {
        RoboVmAndroidModuleWizardStep androidStep = new RoboVmAndroidModuleWizardStep(this, wizardContext,
                modulesProvider);
        return new ModuleWizardStep[] { androidStep, wizardStep };
    } else {
        return new ModuleWizardStep[] { wizardStep };
    }
}
 
Example #3
Source File: RPiJavaModuleBuilder.java    From embeddedlinux-jvmdebugger-intellij with Apache License 2.0 5 votes vote down vote up
/**
 * Adds a custom wizard GUI
 * @param context
 * @param parentDisposable
 * @return
 */
@Nullable
@Override
public ModuleWizardStep getCustomOptionsStep(WizardContext context, Disposable parentDisposable) {
    EmbeddedJavaModuleStep step = new EmbeddedJavaModuleStep(this);
    Disposer.register(parentDisposable, step);
    return step;
}
 
Example #4
Source File: MuleDomainMavenModuleBuilder.java    From mule-intellij-plugins with Apache License 2.0 5 votes vote down vote up
@Nullable
@Override
public ModuleWizardStep getCustomOptionsStep(WizardContext context, Disposable parentDisposable) {
    MuleVersionConfiguration step = new MuleVersionConfiguration(this, muleVersion);
    Disposer.register(parentDisposable, step);
    return step;
}
 
Example #5
Source File: MuleMavenModuleBuilder.java    From mule-intellij-plugins with Apache License 2.0 5 votes vote down vote up
@Nullable
@Override
public ModuleWizardStep getCustomOptionsStep(WizardContext context, Disposable parentDisposable) {
    MuleVersionConfiguration step = new MuleVersionConfiguration(this, muleVersion);
    Disposer.register(parentDisposable, step);
    return step;
}
 
Example #6
Source File: FlutterModuleBuilder.java    From flutter-intellij with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
@Nullable
@Override
public ModuleWizardStep modifySettingsStep(@NotNull SettingsStep settingsStep) {
  final ModuleWizardStep wizard = super.modifySettingsStep(settingsStep);
  mySettingsFields.addSettingsFields(settingsStep);
  return wizard;
}
 
Example #7
Source File: FlutterModuleBuilder.java    From flutter-intellij with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
@Nullable
@Override
public ModuleWizardStep getCustomOptionsStep(final WizardContext context, final Disposable parentDisposable) {
  if (!context.isCreatingNewProject()) {
    myProject = context.getProject();
  }
  myStep = new FlutterModuleWizardStep(context);
  mySettingsFields = new FlutterCreateAdditionalSettingsFields(new FlutterCreateAdditionalSettings(), this::getFlutterSdk, myProject);
  Disposer.register(parentDisposable, myStep);
  return myStep;
}
 
Example #8
Source File: SpringBootModuleBuilder.java    From crud-intellij-plugin with Apache License 2.0 5 votes vote down vote up
@Nullable
@Override
public ModuleWizardStep modifySettingsStep(@NotNull SettingsStep settingsStep) {
	final JTextField moduleNameField = settingsStep.getModuleNameField();
	String artifactId = SelectionContext.getArtifactId();
	if (moduleNameField != null && !StringUtil.isEmptyOrSpaces(artifactId)) {
		moduleNameField.setText(StringUtil.sanitizeJavaIdentifier(artifactId));
	}
	return super.modifyProjectTypeStep(settingsStep);
}
 
Example #9
Source File: FlutterModuleBuilder.java    From flutter-intellij with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
@Nullable
@Override
public ModuleWizardStep getCustomOptionsStep(final WizardContext context, final Disposable parentDisposable) {
  if (!context.isCreatingNewProject()) {
    myProject = context.getProject();
  }
  myStep = new FlutterModuleWizardStep(context);
  mySettingsFields = new FlutterCreateAdditionalSettingsFields(new FlutterCreateAdditionalSettings(), this::getFlutterSdk, myProject);
  Disposer.register(parentDisposable, myStep);
  return myStep;
}
 
Example #10
Source File: SlingMavenModuleBuilder.java    From aem-ide-tooling-4-intellij with Apache License 2.0 5 votes vote down vote up
@Override
public ModuleWizardStep[] createWizardSteps(@NotNull WizardContext wizardContext, @NotNull ModulesProvider modulesProvider) {
    // It is not possible with IntelliJ to use the same Form with another class AFAIK
    // The original Select Properties Step is replaced by our own as we need to handle additional Properties from
    // archetype (required properties) and provide a Name field for convenience.
    return new ModuleWizardStep[]{
        new MavenModuleWizardStep(this, wizardContext, !wizardContext.isNewWizard()),
        new ArchetypePropertiesStep(wizardContext.getProject(), this)
    };
}
 
Example #11
Source File: SlingMavenModuleBuilder.java    From aem-ide-tooling-4-intellij with Apache License 2.0 5 votes vote down vote up
@Nullable
@Override
public ModuleWizardStep getCustomOptionsStep(WizardContext context, Disposable parentDisposable) {
    // Prepare the Sling / AEM Archetypes for IntelliJ
    if(archetypeTemplateList.isEmpty()) {
        archetypeTemplateList = obtainArchetypes();
    }
    List<ArchetypeTemplate> list = context.getProject() == null ? archetypeTemplateList : new ArrayList<ArchetypeTemplate>();
    // Instead of displaying a List of All Maven Archetypes we just show the ones applicable.
    SlingArchetypesStep step = new SlingArchetypesStep(this, list);
    Disposer.register(parentDisposable, step);
    return step;
}
 
Example #12
Source File: FlutterModuleBuilder.java    From flutter-intellij with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
@Nullable
@Override
public ModuleWizardStep modifySettingsStep(@NotNull SettingsStep settingsStep) {
  final ModuleWizardStep wizard = super.modifySettingsStep(settingsStep);
  mySettingsFields.addSettingsFields(settingsStep);
  return wizard;
}
 
Example #13
Source File: VueModuleBuilder.java    From vue-for-idea with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
@Nullable
@Override
public ModuleWizardStep getCustomOptionsStep(WizardContext context, Disposable parentDisposable) {
    VueModuleWizardStep step = new VueModuleWizardStep(context, loadSettings());
    Disposer.register(parentDisposable, step);
    return step;
}
 
Example #14
Source File: DemoModuleType.java    From intellij-sdk-docs with Apache License 2.0 5 votes vote down vote up
@NotNull
@Override
public ModuleWizardStep[] createWizardSteps(@NotNull WizardContext wizardContext,
                                            @NotNull DemoModuleBuilder moduleBuilder,
                                            @NotNull ModulesProvider modulesProvider) {
  return super.createWizardSteps(wizardContext, moduleBuilder, modulesProvider);
}
 
Example #15
Source File: DemoModuleWizardStep.java    From intellij-sdk-docs with Apache License 2.0 5 votes vote down vote up
@Override
public ModuleWizardStep[] createWizardSteps(@NotNull WizardContext wizardContext,
                                            @NotNull ModulesProvider modulesProvider) {
  return new ModuleWizardStep[]{new ModuleWizardStep() {
    @Override
    public JComponent getComponent() {
      return new JLabel("Put your content here");
    }

    @Override
    public void updateDataModel() {

    }
  }};
}
 
Example #16
Source File: HaxeModuleType.java    From intellij-haxe with Apache License 2.0 5 votes vote down vote up
public ModuleWizardStep[] createWizardSteps(final WizardContext wizardContext,
                                            final HaxeModuleBuilder moduleBuilder,
                                            final ModulesProvider modulesProvider) {
  HaxeSdkType type = HaxeSdkType.getInstance();
  type.ensureSdk();

  return new ModuleWizardStep[]{
    new HaxeSdkWizardStep(moduleBuilder, wizardContext, type)
  };
}
 
Example #17
Source File: HaxeProjectStructureDetector.java    From intellij-haxe with Apache License 2.0 5 votes vote down vote up
@Override
public List<ModuleWizardStep> createWizardSteps(ProjectFromSourcesBuilder builder, ProjectDescriptor projectDescriptor, Icon stepIcon) {
  HaxeSdkType type = HaxeSdkType.getInstance();
  type.ensureSdk();
  WizardContext wizardContext = builder.getContext();
  HaxeProjectConfigurationUpdater projectUpdater = new HaxeProjectConfigurationUpdater(wizardContext.getProjectFileDirectory());
  ((ProjectFromSourcesBuilderImpl)builder).addConfigurationUpdater(projectUpdater);
  HaxeModuleInsight moduleInsight = new HaxeModuleInsight(new DelegatingProgressIndicator(), builder);
  final List<ModuleWizardStep> steps = new ArrayList<>();
  steps.add(new HaxeLibrariesDetectionStep(builder, moduleInsight, projectUpdater));
  steps.add(new ModulesDetectionStep(this, builder, projectDescriptor, moduleInsight, stepIcon, "reference.dialogs.new.project.fromCode.page2"));
  steps.add(new ProjectJdkForModuleStep(wizardContext, type));
  steps.add(new HaxeHxmlDetectionStep(builder, projectUpdater));
  return steps;
}
 
Example #18
Source File: CppModuleType.java    From CppTools with Apache License 2.0 5 votes vote down vote up
public ModuleWizardStep[] createWizardSteps(WizardContext wizardContext, CppModuleBuilder cppModuleBuilder, ModulesProvider modulesProvider) {
  final List<Sdk> list = CppSdkType.getInstance().getCppSdks();
  final ModuleWizardStep sourceModuleWizardStep = ProjectWizardStepFactory.getInstance().createSourcePathsStep(wizardContext, cppModuleBuilder, null, null);
  final ModuleWizardStep createSampleCode = new CreateEntryCodeStep(cppModuleBuilder);

  if (list.size() == 0) {
    return new ModuleWizardStep[] { new ChooseCppSdkStep(cppModuleBuilder, wizardContext),sourceModuleWizardStep, createSampleCode };
  }
  return new ModuleWizardStep[] { sourceModuleWizardStep, createSampleCode };
}
 
Example #19
Source File: SpringBootModuleBuilder.java    From crud-intellij-plugin with Apache License 2.0 5 votes vote down vote up
@Override
public ModuleWizardStep[] createWizardSteps(@NotNull WizardContext wizardContext, @NotNull ModulesProvider modulesProvider) {
	SelectionContext.clearAllSet();
	CrudTableStep tableStep = new CrudTableStep(new CrudTableView());
	CrudDbStep dbStep = new CrudDbStep(new CrudDbView(), tableStep);
	CrudConnStep connStep = new CrudConnStep(new CrudConnView(), dbStep);
	return new ModuleWizardStep[]{
			connStep,
			dbStep,
			tableStep,
			new CrudProjectInfoStep()
	};
}
 
Example #20
Source File: CrudActionDialog.java    From crud-intellij-plugin with Apache License 2.0 5 votes vote down vote up
public CrudActionDialog(Project project, Module module) {
    super("Create New Crud", project);
    myProject = project;
    myModule = module;
    ModuleWizardStep[] wizardSteps = createWizardSteps();
    for (ModuleWizardStep wizardStep : wizardSteps) {
        addStep(wizardStep);
    }
    init();
}
 
Example #21
Source File: CrudActionDialog.java    From crud-intellij-plugin with Apache License 2.0 5 votes vote down vote up
@Override
protected void doOKAction() {
    ModuleWizardStep step = getCurrentStepObject();
    try {
        if (step.validate()) {
            super.doOKAction();
        }
    } catch (ConfigurationException e) {
        Messages.showErrorDialog(step.getComponent(), e.getMessage(), e.getTitle());
    }
}
 
Example #22
Source File: CrudActionDialog.java    From crud-intellij-plugin with Apache License 2.0 5 votes vote down vote up
@Override
protected void doNextAction() {
    ModuleWizardStep step = getCurrentStepObject();
    try {
        if (step.validate()) {
            super.doNextAction();
        }
    } catch (ConfigurationException e) {
        Messages.showErrorDialog(step.getComponent(), e.getMessage(), e.getTitle());
    }
}
 
Example #23
Source File: CrudActionDialog.java    From crud-intellij-plugin with Apache License 2.0 5 votes vote down vote up
public ModuleWizardStep[] createWizardSteps() {
    CrudTableStep tableStep = new CrudTableStep(new CrudTableView());
    CrudDbStep dbStep = new CrudDbStep(new CrudDbView(), tableStep);
    CrudConnStep connStep = new CrudConnStep(new CrudConnView(), dbStep);
    return new ModuleWizardStep[]{
            connStep,
            dbStep,
            tableStep,
            new CrudDirSelectInfoStep(myProject,myModule)
    };
}
 
Example #24
Source File: InitializrModuleBuilder.java    From intellij-spring-assistant with MIT License 5 votes vote down vote up
@Nullable
public ModuleWizardStep modifySettingsStep(@NotNull SettingsStep settingsStep) {
  JTextField moduleNameField = settingsStep.getModuleNameField();
  if (moduleNameField != null) {
    moduleNameField.setText(request.getArtifactId());
  }

  return super.modifySettingsStep(settingsStep);
}
 
Example #25
Source File: QuarkusModuleBuilder.java    From intellij-quarkus with Eclipse Public License 2.0 5 votes vote down vote up
@Nullable
@Override
public ModuleWizardStep modifySettingsStep(@NotNull SettingsStep settingsStep) {
    ModuleNameLocationSettings moduleNameLocationSettings = settingsStep.getModuleNameLocationSettings();
    if (moduleNameLocationSettings != null) {
        moduleNameLocationSettings.setModuleName(settingsStep.getContext().getUserData(QuarkusConstants.WIZARD_ARTIFACTID_KEY));
    }
    return super.modifySettingsStep(settingsStep);
}
 
Example #26
Source File: TalendModuleBuilder.java    From component-runtime with Apache License 2.0 5 votes vote down vote up
@Override
public ModuleWizardStep modifySettingsStep(final SettingsStep settingsStep) {
    final String projectJsonString = new String(Base64.getUrlDecoder().decode(request.getProject()));
    jsonProject = gson.fromJson(projectJsonString, JsonObject.class);

    try {
        final Object moduleNameLocationSettings =
                settingsStep.getClass().getMethod("getModuleNameLocationSettings").invoke(settingsStep);
        if (moduleNameLocationSettings != null) {
            moduleNameLocationSettings
                    .getClass()
                    .getMethod("setModuleName", String.class)
                    .invoke(moduleNameLocationSettings, jsonProject.get("artifact").getAsString());
        }
    } catch (final Error | Exception e) {
        try {
            final JTextField namedFile = settingsStep.getModuleNameField();
            if (namedFile != null) {
                namedFile.setText(jsonProject.get("artifact").getAsString());
                namedFile.setEditable(false);
            }
        } catch (final RuntimeException ex) {
            final IllegalStateException exception = new IllegalStateException(e);
            exception.addSuppressed(ex);
            throw exception;
        }
    }
    return super.modifySettingsStep(settingsStep);
}
 
Example #27
Source File: QuarkusModuleBuilder.java    From intellij-quarkus with Eclipse Public License 2.0 4 votes vote down vote up
@Override
public ModuleWizardStep[] createWizardSteps(@NotNull WizardContext wizardContext, @NotNull ModulesProvider modulesProvider) {
    return new ModuleWizardStep[]{new QuarkusModuleInfoStep(wizardContext), new QuarkusExtensionsStep(wizardContext)};
}
 
Example #28
Source File: AsposeMavenModuleBuilder.java    From Aspose.OCR-for-Java with MIT License 4 votes vote down vote up
@Nullable
@Override
public ModuleWizardStep modifySettingsStep(@NotNull SettingsStep settingsStep) {
    return StdModuleTypes.JAVA.modifySettingsStep(settingsStep, this);
}
 
Example #29
Source File: AsposeMavenModuleBuilder.java    From Aspose.OCR-for-Java with MIT License 4 votes vote down vote up
@Nullable
public ModuleWizardStep getCustomOptionsStep(WizardContext context, Disposable parentDisposable) {
    AsposeIntroWizardStep step = new AsposeIntroWizardStep();
    Disposer.register(parentDisposable, step);
    return step;
}
 
Example #30
Source File: AsposeMavenModuleBuilder.java    From Aspose.OCR-for-Java with MIT License 4 votes vote down vote up
@Override
public ModuleWizardStep[] createWizardSteps(@NotNull WizardContext wizardContext, @NotNull ModulesProvider modulesProvider) {
    return new ModuleWizardStep[]{new AsposeMavenModuleWizardStep(getMyProject(), this, wizardContext, !wizardContext.isNewWizard()),

    };
}