PsiClass (DefaultMutableTreeNode node) { PsiClass psiClass = super.getSelectedFromTreeUserObject(node); if (psiClass != null) return psiClass; Object userObject = node.getUserObject(); if (!(userObject instanceof KtClassOrObjectTreeNode)) return null; return LightClassUtilsKt.toLightClass(((KtClassOrObjectTreeNode) userObject).getValue()); }