void (@NotNull AnActionEvent e) { final LayoutTreeSelection selection = myArtifactEditor.getLayoutTreeComponent().getSelection(); final PackagingElementNode<?> node = selection.getNodeIfSingle(); final PackagingElement<?> element = selection.getElementIfSingle(); if (node == null || element == null) return; if (!myArtifactEditor.getLayoutTreeComponent().checkCanModify(element, node)) return; final TreePath path = selection.getPath(node); myArtifactEditor.getLayoutTreeComponent().startRenaming(path); }