use of com.intellij.uiDesigner.propertyInspector.properties.IdentifierValidator in project intellij-community by JetBrains.
the class GroupButtonsAction method groupButtons.
public static void groupButtons(final GuiEditor editor, final List<RadComponent> selectedComponents) {
if (!editor.ensureEditable())
return;
String groupName = Messages.showInputDialog(editor.getProject(), UIDesignerBundle.message("group.buttons.name.prompt"), UIDesignerBundle.message("group.buttons.title"), Messages.getQuestionIcon(), editor.getRootContainer().suggestGroupName(), new IdentifierValidator(editor.getProject()));
if (groupName == null)
return;
RadRootContainer rootContainer = editor.getRootContainer();
RadButtonGroup group = rootContainer.createGroup(groupName);
for (RadComponent component : selectedComponents) {
rootContainer.setGroupForComponent(component, group);
}
editor.refreshAndSave(true);
}
Aggregations