PsiClassType (@NotNull ActionContext context) { PsiElement element = context.findLeaf(); if (element == null) return null; PsiThrowStatement expression = PsiTreeUtil.getParentOfType(element, PsiThrowStatement.class); if (expression == null) return null; PsiExpression exception = expression.getException(); if (exception == null) return null; PsiType type = exception.getType(); if (!(type instanceof PsiClassType)) return null; if (!ExceptionUtil.isUncheckedException((PsiClassType)type)) return null; return (PsiClassType)type; }