use of com.intellij.ide.util.projectWizard.ModuleWizardStep in project intellij-community by JetBrains.
the class MvcProjectStructureDetector method createWizardSteps.
@Override
public List<ModuleWizardStep> createWizardSteps(ProjectFromSourcesBuilder builder, ProjectDescriptor projectDescriptor, Icon stepIcon) {
final ModuleWizardStep groovySdkStep = new GroovySdkForProjectFromSourcesStep(this, builder, projectDescriptor, myFramework);
final ModuleWizardStep javaSdkStep = ProjectWizardStepFactory.getInstance().createProjectJdkStep(builder.getContext());
return Arrays.asList(javaSdkStep, groovySdkStep);
}
use of com.intellij.ide.util.projectWizard.ModuleWizardStep in project intellij-community by JetBrains.
the class MavenProjectImportProvider method createSteps.
public ModuleWizardStep[] createSteps(final WizardContext wizardContext) {
final ProjectWizardStepFactory stepFactory = ProjectWizardStepFactory.getInstance();
return new ModuleWizardStep[] { new MavenProjectImportStep(wizardContext), new SelectProfilesStep(wizardContext), new SelectImportedProjectsStep<MavenProject>(wizardContext) {
@Override
protected String getElementText(final MavenProject project) {
final StringBuilder stringBuilder = new StringBuilder();
stringBuilder.append(project.getMavenId());
VirtualFile root = ((MavenProjectBuilder) getBuilder()).getRootDirectory();
if (root != null) {
final String relPath = VfsUtilCore.getRelativePath(project.getDirectoryFile(), root, File.separatorChar);
if (StringUtil.isNotEmpty(relPath)) {
stringBuilder.append(" [").append(relPath).append("]");
}
}
if (!isElementEnabled(project)) {
stringBuilder.append(" (project is ignored. See ").append(CommonBundle.settingsActionPath()).append(" | Maven | Ignored Files)");
}
return stringBuilder.toString();
}
@Override
protected boolean isElementEnabled(MavenProject mavenProject) {
Project project = wizardContext.getProject();
if (project == null)
return true;
return !MavenProjectsManager.getInstance(project).isIgnored(mavenProject);
}
@Override
public void updateDataModel() {
super.updateDataModel();
getWizardContext().setProjectName(((MavenProjectBuilder) getBuilder()).getSuggestedProjectName());
}
@Override
public String getHelpId() {
return "reference.dialogs.new.project.import.maven.page3";
}
}, stepFactory.createProjectJdkStep(wizardContext), stepFactory.createNameAndLocationStep(wizardContext) };
}
use of com.intellij.ide.util.projectWizard.ModuleWizardStep in project intellij-community by JetBrains.
the class WebModuleBuilder method modifySettingsStep.
@Nullable
@Override
public ModuleWizardStep modifySettingsStep(@NotNull SettingsStep settingsStep) {
if (myTemplate == null) {
return super.modifySettingsStep(settingsStep);
}
final WebProjectGenerator.GeneratorPeer peer = myTemplate.getPeer();
peer.buildUI(settingsStep);
return new ModuleWizardStep() {
@Override
public JComponent getComponent() {
return null;
}
@Override
public void updateDataModel() {
}
@Override
public boolean validate() throws ConfigurationException {
ValidationInfo info = peer.validate();
if (info != null)
throw new ConfigurationException(info.message);
return true;
}
};
}
use of com.intellij.ide.util.projectWizard.ModuleWizardStep in project intellij-community by JetBrains.
the class AbstractProjectWizard method getPreviousStep.
@Override
protected final int getPreviousStep(final int step) {
ModuleWizardStep previousStep = null;
final StepSequence stepSequence = getSequence();
if (stepSequence != null) {
final ModuleWizardStep current = mySteps.get(step);
if (isNotFirstSubStepInStep(current)) {
return step;
}
previousStep = stepSequence.getPreviousStep(current);
while (previousStep != null && !previousStep.isStepVisible()) {
previousStep = stepSequence.getPreviousStep(previousStep);
}
}
return previousStep == null ? 0 : mySteps.indexOf(previousStep);
}
use of com.intellij.ide.util.projectWizard.ModuleWizardStep in project intellij-community by JetBrains.
the class AbstractProjectWizard method doNextAction.
@Override
public void doNextAction() {
if (myDelegate != null) {
myDelegate.doNextAction();
return;
}
final ModuleWizardStep step = getCurrentStepObject();
if (!commitStepData(step)) {
return;
}
step.onStepLeaving();
super.doNextAction();
}
Aggregations