boolean (@NotNull PsiElement element, @NotNull ResolveState state) { if (element instanceof PsiNamedElement && element.isValid()) { PsiNamedElement named = (PsiNamedElement)element; String name = named.getName(); if (name != null) { myResult.add(name, new ResultWithContext(named, myCurrentFileContext)); } } return true; }