Collection<PsiExpression> (@NotNull PsiElement qualifierExpression) { if (qualifierExpression instanceof PsiMethodCallExpression) { return Collections.singletonList((PsiMethodCallExpression)qualifierExpression); } if (qualifierExpression instanceof PsiReferenceExpression) { final PsiElement targetElement = ((PsiReferenceExpression)qualifierExpression).resolve(); if (!(targetElement instanceof PsiVariable)) { return Collections.emptyList(); } Collection<PsiExpression> variableValues = getVariableValues((PsiVariable)targetElement, qualifierExpression); if (variableValues.isEmpty()) { return DfaPsiUtil.getVariableAssignmentsInFile((PsiVariable)targetElement, false, qualifierExpression); } return variableValues; } if (qualifierExpression instanceof PsiLiteralExpression) { return Collections.singletonList((PsiLiteralExpression)qualifierExpression); } return Collections.emptyList(); }