use of com.intellij.uiDesigner.designSurface.InplaceEditingLayer in project intellij-community by JetBrains.
the class AbstractGuiEditorAction method actionPerformed.
public final void actionPerformed(final AnActionEvent e) {
final GuiEditor editor = FormEditingUtil.getEditorFromContext(e.getDataContext());
if (editor != null) {
final ArrayList<RadComponent> selection = FormEditingUtil.getSelectedComponents(editor);
if (myModifying) {
if (!editor.ensureEditable())
return;
}
InplaceEditingLayer editingLayer = editor.getInplaceEditingLayer();
if (editingLayer.isEditing()) {
editingLayer.finishInplaceEditing();
}
Runnable runnable = () -> {
actionPerformed(editor, selection, e);
if (myModifying) {
editor.refreshAndSave(true);
}
};
if (getCommandName() != null) {
CommandProcessor.getInstance().executeCommand(editor.getProject(), runnable, getCommandName(), null);
} else {
runnable.run();
}
}
}
Aggregations