private boolean willCollapse(BnfRule rule, Map<PsiElement, Cardinality> map) {
if (!canCollapse(rule, map)) return false;
boolean requiredFound = false;
for (PsiElement t : map.keySet()) {
if (PsiUtilCore.getElementType(t) == MARKER_TYPE) continue;
<BUG>if (requiredFound || map.get(t) != REQUIRED) return false;
requiredFound = true;</BUG>
}
return requiredFound;
}

private boolean willCollapse(BnfRule rule, Map<PsiElement, Cardinality> map) {
if (!canCollapse(rule, map)) return false;
boolean requiredFound = false;
for (PsiElement t : map.keySet()) {
if (PsiUtilCore.getElementType(t) == MARKER_TYPE) continue;
if (requiredFound || map.get(t) != REQUIRED) return false;
if (isExternalPsi(t)) return false;
requiredFound = true;
}
return requiredFound;
}
