result.addElement(PrioritizedLookupElement.withPriority(LookupElementBuilder.create(currentSymbol), LOCAL_VARIABLE_PRIORITY));
}
}
} else {
final Set<String> allSymbols = new HashSet<String>();
PsiRecursiveElementVisitor visitor = new PsiRecursiveElementVisitor() {
@Override
public void visitElement(PsiElement element) {
if (element instanceof Symbol && !callingSymbolName.equals(((Symbol) element).getSymbolName() + "ZZZ")) {
allSymbols.add(((Symbol) element).getSymbolName());
}
element.acceptChildren(this);
}
};
visitor.visitFile(parameters.getOriginalFile());
for (String currentSymbol : allSymbols) {
if (!NAMES.contains(currentSymbol)) {
result.addElement(PrioritizedLookupElement.withPriority(LookupElementBuilder.create(currentSymbol), GLOBAL_VARIABLE_PRIORITY));
}
}