if (RuleGraphHelper.shouldGeneratePsi(rule, true)) {
hasPSI = true;
JavaHelper javaHelper = JavaHelper.getJavaHelper(rule.getProject());
for (String className : new String[]{ParserGeneratorUtil.getQualifiedRuleClassName(rule, false),
ParserGeneratorUtil.getQualifiedRuleClassName(rule, true)}) {
NavigatablePsiElement aClass = javaHelper.findClass(className);
if (aClass != null && (!forNavigation || visited.add(aClass))) {
items.add(aClass);
}
}
}