PsiMethod (final DefaultMutableTreeNode o) { final Object userObject = o.getUserObject(); if (userObject instanceof PsiMethod) return (PsiMethod)userObject; return (PsiMethod)((DefaultMutableTreeNode)o.getParent()).getUserObject(); }