void (@NotNull final PyRunTargetVariant target) { final Enumeration<AbstractButton> elements = myButtonGroup.getElements(); while (elements.hasMoreElements()) { final AbstractButton button = elements.nextElement(); if (PyRunTargetVariant.valueOf(button.getActionCommand()) == target) { myButtonGroup.setSelected(button.getModel(), true); break; } } onTargetTypeChanged(); }