void () { TreePath path = getSelectionModel().getSelectionPath(); Object lastPathComponent = path.getLastPathComponent(); if (lastPathComponent instanceof PostfixTemplateCheckedTreeNode) { editTemplate((PostfixTemplateCheckedTreeNode)lastPathComponent); } }