PsiTypeElement (PsiVariable variable) { PsiTypeElement typeElement = variable.getTypeElement(); if (typeElement != null && typeElement.isInferredType()) { PsiType type = variable.getType(); if (PsiTypesUtil.isDenotableType(type, variable)) { return typeElement; } } return null; }