private static <T extends CommonJavaRunConfigurationParameters>
  @NotNull SettingsEditorFragment<T, JrePathEditor> createJrePathEditorFragment(@NotNull JrePathEditor jrePathEditor,
                                                                                @NotNull ComboBox<JrePathEditor.JreComboBoxItem> comboBox) {
    SettingsEditorFragment<T, JrePathEditor> jrePath =
      new SettingsEditorFragment<>(JRE_PATH, ExecutionBundle.message("run.configuration.jre.name"), null, jrePathEditor, 5,
                                   (configuration, editor) -> editor.setPathOrName(configuration.getAlternativeJrePath(),
                                                                                   configuration.isAlternativeJrePathEnabled()),
                                   (configuration, editor) -> {
                                     configuration.setAlternativeJrePath(editor.getJrePathOrName());
                                     configuration.setAlternativeJrePathEnabled(editor.isAlternativeJreSelected());
                                   },
                                   Predicates.alwaysTrue());
    jrePath.setRemovable(false);
    jrePath.setHint(ExecutionBundle.message("run.configuration.jre.hint"));
    jrePath.setValidation(configuration -> new SmartList<>(RuntimeConfigurationException.validate(comboBox, () -> {
      if (!(configuration instanceof TargetEnvironmentAwareRunProfile) ||
          TargetEnvironmentConfigurations.getEffectiveTargetName((TargetEnvironmentAwareRunProfile)configuration,
                                                                 configuration.getProject()) == null) {
        JavaParametersUtil.checkAlternativeJRE(configuration);
      }
    })));
    return jrePath;
  }
private static <T extends CommonJavaRunConfigurationParameters>
  @NotNull SettingsEditorFragment<T, JrePathEditor> createJrePathEditorFragment(@NotNull JrePathEditor jrePathEditor,
                                                                                @NotNull ComboBox<JrePathEditor.JreComboBoxItem> comboBox)