PyTestSharedForm (@NotNull final PyAbstractTestConfiguration configuration, final PyTestCustomOption @NotNull ... customOptions) { final PyTestSharedForm form = new PyTestSharedForm(configuration.getModule(), configuration); for (final PyRunTargetVariant testTargetType : PyRunTargetVariant.values()) { final JBRadioButton button = new JBRadioButton(StringUtil.capitalize(testTargetType.getCustomName().toLowerCase(Locale.getDefault()))); button.setActionCommand(testTargetType.name()); // NON-NLS button.addActionListener(o -> form.onTargetTypeChanged()); form.myButtonGroup.add(button); form.myTargets.add(button); } form.myButtonGroup.getElements().nextElement().setSelected(true); form.myOptionsForm = PyCommonOptionsFormFactory.getInstance().createForm(configuration.getCommonOptionsFormData()); final GridConstraints constraints = new GridConstraints(); constraints.setFill(GridConstraints.FILL_BOTH); form.myOptionsPanel.add(form.myOptionsForm.getMainPanel(), constraints); setBorderToPanel(form.myPanel, configuration.getTestFrameworkName()); form.addCustomOptions( ObjectArrays.concat(customOptions, new PyTestCustomOption( PyTestsSharedKt.getAdditionalArgumentsProperty(), PyRunTargetVariant.values())) ); configuration.copyTo(ReflectionUtilsKt.getProperties(form, null, true)); return form; }