private static Collection<StrutsPackage> removeCurrentElementFromVariants(final ConvertContext context,
final Collection<StrutsPackage> allVariants) {
final StrutsPackage currentElement = (StrutsPackage)DomUtil.getDomElement(context.getTag());
assert currentElement != null : "currentElement was null for " + context.getTag();
final GenericDomValue currentNameElement = currentElement.getGenericInfo().getNameDomElement(currentElement);
if (currentNameElement == null) {
return allVariants; // skip due to XML errors
}
final String currentName = currentNameElement.getStringValue();
if (currentName == null) {
return allVariants; // skip due to XML errors
}
final StrutsPackage currentElementInVariants = DomUtil.findByName(allVariants, currentName);