use of com.intellij.uiDesigner.palette.ComponentItemDialog in project intellij-community by JetBrains.
the class InsertComponentProcessor method replaceAnyComponentItem.
@Nullable
public static ComponentItem replaceAnyComponentItem(GuiEditor editor, ComponentItem item, final String title) {
if (item.isAnyComponent()) {
ComponentItem newItem = item.clone();
ComponentItemDialog dlg = new ComponentItemDialog(editor.getProject(), editor, newItem, true);
dlg.setTitle(title);
if (!dlg.showAndGet()) {
return null;
}
return newItem;
}
return item;
}
Aggregations