String (PsiElement expression) { if (expression instanceof PsiMethodCallExpression) { final PsiExpression qualifierExpression = ((PsiMethodCallExpression)expression).getMethodExpression().getQualifierExpression(); if (qualifierExpression != null) { final PsiClass qualifierClass = PsiUtil.resolveClassInClassTypeOnly(qualifierExpression.getType()); if (qualifierClass != null) { if (PsiUtil.isRawSubstitutor(qualifierClass, ((PsiMethodCallExpression)expression).resolveMethodGenerics().getSubstitutor())) { return qualifierExpression.getText(); } } } } return null; }