String (PsiType variableType, PsiClass aClass) { String message = "Cannot create expression for type " + variableType.getClass() + "\n" + "Canonical text: " + variableType.getCanonicalText() + "\n" + "Internal text: " + variableType.getInternalCanonicalText() + "\n"; if (aClass != null) { message += "Class: " + aClass.getClass() + "|" + aClass.getQualifiedName() + "\n" + "File: " + aClass.getContainingFile() + "\n"; } if (variableType instanceof PsiClassReferenceType) { PsiJavaCodeReferenceElement reference = ((PsiClassReferenceType)variableType).getReference(); message += "Reference: " + reference.getCanonicalText() + "\n" + "Reference class: " + reference.getClass() + "\n" + "Reference name: " + reference.getReferenceName() + "\n" + "Reference qualifier: " + (reference.getQualifier() == null ? "(null)" : reference.getQualifier().getText()) + "\n" + "Reference file: " + reference.getContainingFile(); } return message; }