String[] (String[] names, final PsiExpression expr) { if (expr instanceof PsiReferenceExpression && ((PsiReferenceExpression)expr).resolve() == null) { final String name = expr.getText(); if (PsiNameHelper.getInstance(expr.getProject()).isIdentifier(name, LanguageLevel.HIGHEST)) { names = ArrayUtil.mergeArrays(new String[]{name}, names); } } return names; }