@NotNull
  public static <T extends JavaRunConfigurationBase> SettingsEditorFragment<T, VmOptionsEditor> vmOptionsEx(JavaRunConfigurationBase settings,
                                                                                                            Computable<Boolean> hasModule,
                                                                                                            @Nullable JrePathEditor pathEditor) {
    String group = ExecutionBundle.message("group.java.options");
    VmOptionsEditor vmOptions = new VmOptionsEditor(settings) {
      @Override
      void setupEditor(LanguageTextField editor, JavaRunConfigurationBase settings) {
        super.setupEditor(editor, settings);
        editor.addSettingsProvider(e -> {
          ExtendableTextComponent.Extension extension = ExtendableTextComponent.Extension.create(
            AllIcons.General.InlineVariables, AllIcons.General.InlineVariablesHover, ExecutionBundle.message("insert.macros"),
            () -> MacrosDialog.show(editor, MacrosDialog.Filters.ALL, MacrosDialog.getPathMacros(hasModule.compute())));
          ExtendableEditorSupport.setupExtension(e, editor.getBackground(), extension);
        });
        if (pathEditor != null) {
          pathEditor.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
              String jrePath = pathEditor.getJrePathOrName();
              Sdk sdk = jrePath == null ? null : ProjectJdkTable.getInstance().findJdk(jrePath);
              if (sdk != null) {
                jrePath = sdk.getHomePath();
              }
              editor.getDocument().putUserData(EditCustomVmOptionsAction.JRE_PATH_KEY, jrePath);
            }
          });
        }
      }
    };
    return createVmOptionsFragment(group, vmOptions, VmOptionsEditor::getTextField);
  }
@NotNull
  public static <T extends JavaRunConfigurationBase> SettingsEditorFragment<T, VmOptionsEditor> vmOptionsEx(JavaRunConfigurationBase settings,
                                                                                                            Computable<Boolean> hasModule,
                                                                                                            @Nullable JrePathEditor pathEditor)