#RUBY-17804 ruby related projects are divided into groups Ruby, Rails, Web and Mobile
authorDmitry.Krasilschikov <kradima@jetbrains.com>
Mon, 15 Feb 2016 16:01:30 +0000 (19:01 +0300)
committerDmitry.Krasilschikov <kradima@jetbrains.com>
Mon, 15 Feb 2016 16:05:27 +0000 (19:05 +0300)
platform/lang-impl/src/com/intellij/ide/util/projectWizard/AbstractNewProjectStep.java

index 98bc11eb797321d21823e22b0113ec275901475d..d364d1b68340d43055cc0880b710b678baeb13cc 100644 (file)
@@ -56,11 +56,7 @@ public class AbstractNewProjectStep extends DefaultActionGroup implements DumbAw
     super("Select Project Type", true);
 
     NullableConsumer<ProjectSettingsStepBase> callback = customization.createCallback();
-
-    final DirectoryProjectGenerator emptyProjectGenerator = customization.createEmptyProjectGenerator();
-    ProjectSpecificAction projectSpecificAction =
-      new ProjectSpecificAction(emptyProjectGenerator, customization.createProjectSpecificSettingsStep(emptyProjectGenerator, callback));
-    addAll(projectSpecificAction.getChildren(null));
+    ProjectSpecificAction projectSpecificAction = customization.createProjectSpecificAction(callback);
 
     DirectoryProjectGenerator[] generators = customization.getProjectGenerators();
     customization.setUpBasicAction(projectSpecificAction, generators);
@@ -70,6 +66,12 @@ public class AbstractNewProjectStep extends DefaultActionGroup implements DumbAw
   }
 
   protected static abstract class Customization {
+    @NotNull
+    protected ProjectSpecificAction createProjectSpecificAction(@NotNull final NullableConsumer<ProjectSettingsStepBase> callback) {
+      DirectoryProjectGenerator emptyProjectGenerator = createEmptyProjectGenerator();
+      return new ProjectSpecificAction(emptyProjectGenerator, createProjectSpecificSettingsStep(emptyProjectGenerator, callback));
+    }
+
     @NotNull
     protected abstract NullableConsumer<ProjectSettingsStepBase> createCallback();