EObject current = e;
Pair<NameType, String> name = namingStrategy.nameOf(e);
if (name == null) {
return EMPTY_NAME;
}
QualifiedName qualifiedName = converter.toQualifiedName(name.getSecond());
while (current.eContainer() != null) {
current = current.eContainer();
QualifiedName parentsQualifiedName = getFullyQualifiedName(current, namingStrategy);
if (parentsQualifiedName != null) {
return pair(name.getFirst(), parentsQualifiedName.append(qualifiedName));
}
}
return pair(name.getFirst(), addPackage(e, qualifiedName));
}
});