if (object instanceof NamedElement) {
NamedElement e = (NamedElement) object;
if (e.getName() != null && !e.getName().isEmpty()) {
return e.eClass().getName() + ": '" + e.getName() + "'"; // InternetApplication: 'root'
} else {
return e.eClass().getName(); // InternetApplication
}
} else if (object instanceof ENamedElement) {
ENamedElement e = (ENamedElement) object;
if (e.getName() != null && !e.getName().isEmpty()) {
return e.eClass().getName() + ": '" + e.getName() + "'"; // EClass: 'root'