boolean (AnActionEvent e) { final DefaultMutableTreeNode node = e.getData(SELECTED_NODE); if (node instanceof GeneratedStructureModel.StructureNode structureNode) { final OutputEventQueue.NodeEvent event = structureNode.getUserObject(); return event != null && event.getValue() != null; } return false; }