public void updateStep() {
   super.updateStep();
   if (!isCreateFromTemplateMode()) {
     if (myCreateModuleCb.isSelected()) {
       mySequence.setType(getSelectedBuilderId());
     } else {
       mySequence.setType(null);
     }
   }
 }
 protected final int getPreviousStep(final int step) {
   ModuleWizardStep previousStep = null;
   final StepSequence stepSequence = getMode().getSteps(myWizardContext, null);
   if (stepSequence != null) {
     previousStep = stepSequence.getPreviousStep(mySteps.get(step));
     while (previousStep != null && !previousStep.isStepVisible()) {
       previousStep = stepSequence.getPreviousStep(previousStep);
     }
   }
   return previousStep == null ? 0 : mySteps.indexOf(previousStep);
 }
 private void appendSteps(@Nullable final StepSequence sequence) {
   if (sequence != null) {
     final List<ModuleWizardStep> commonSteps = sequence.getCommonSteps();
     for (ModuleWizardStep step : commonSteps) {
       addStep(step);
     }
     for (String type : sequence.getTypes()) {
       appendSteps(sequence.getSpecificSteps(type));
     }
   }
 }
 protected final int getNextStep(int step) {
   ModuleWizardStep nextStep = null;
   final StepSequence stepSequence = getMode().getSteps(myWizardContext, null);
   if (stepSequence != null) {
     if (myRootStep == mySteps.get(step)) {
       return mySteps.indexOf(stepSequence.getCommonSteps().get(0));
     }
     nextStep = stepSequence.getNextStep(mySteps.get(step));
     while (nextStep != null && !nextStep.isStepVisible()) {
       nextStep = stepSequence.getNextStep(nextStep);
     }
   }
   return nextStep == null ? step : mySteps.indexOf(nextStep);
 }
  public void updateDataModel() {

    if (!isCreateFromTemplateMode()) {
      mySequence.setType(myCreateModuleCb.isSelected() ? getSelectedBuilderId() : null);
    }
    super.updateDataModel();

    if (!isCreateFromTemplateMode() && myCreateModuleCb.isSelected()) {
      final ModuleBuilder builder = (ModuleBuilder) myMode.getModuleBuilder();
      assert builder != null;
      final String moduleName = getModuleName();
      builder.setName(moduleName);
      builder.setModuleFilePath(
          FileUtil.toSystemIndependentName(myModuleFileLocation.getText())
              + "/"
              + moduleName
              + ModuleFileType.DOT_DEFAULT_EXTENSION);
      builder.setContentEntryPath(FileUtil.toSystemIndependentName(myModuleContentRoot.getText()));
    }
  }