Resource resource = eclass.eResource();
ResourceSet resourceSet = resource.getResourceSet();
TransactionalEditingDomain domain = TransactionalEditingDomain.Factory.INSTANCE.createEditingDomain(resourceSet);
try{
if (domain != null){
Command setCommand = domain.createCommand(SetCommand.class, new CommandParameter(eclass,
EcorePackage.Literals.ENAMED_ELEMENT__NAME, newName));
domain.getCommandStack().execute(setCommand);
try {
resource.save(Collections.emptyMap());
} catch (IOException e) {