PsiElement (PsiElement psiElement) { if (psiElement instanceof PsiReferenceParameterList) { final PsiNewExpression expression = (PsiNewExpression)JavaPsiFacade.getElementFactory(psiElement.getProject()).createExpressionFromText("new a<>()", psiElement); final PsiJavaCodeReferenceElement classReference = expression.getClassReference(); LOG.assertTrue(classReference != null); final PsiReferenceParameterList parameterList = classReference.getParameterList(); LOG.assertTrue(parameterList != null); return parameterList; } return null; }