JavaParser parser = new JavaParser(tokens);
parser.removeErrorListeners();
// start parsing at the compilationUnit rule
ParserRuleContext t = parser.compilationUnit();
ParseTreeWalker walker = new ParseTreeWalker();
List<AutocompleteCandidate> q = new ArrayList<AutocompleteCandidate>();
ImportDeclarationCompletion extractor = new ImportDeclarationCompletion(txt,cur,registry,cps,cu);
NameBuilder extractor2 = new NameBuilder(registry,cu );
NodeCompletion extractor3 = new NodeCompletion(txt,cur, registry, cu);
walker.walk(extractor, t);
if(extractor.getQuery()!=null)
q.addAll(extractor.getQuery());
walker.walk(extractor2, t);
walker.walk(extractor3, t);
if(extractor3.getQuery()!=null)
q.addAll(extractor3.getQuery());
List<String> ret = registry.searchCandidates(q);
// this shows the GUI