EStructuralFeature emofFeature = (EStructuralFeature)entry.getKey();
EStructuralFeature ecoreFeature = (EStructuralFeature)entry.getValue();
resource.setID(ecoreFeature, resource.getID(emofFeature));
EObject eObject = emofFeature.eContainer();
@SuppressWarnings("unchecked")
List<EObject> list = (List<EObject>)eObject.eGet(emofFeature.eContainmentFeature());
list.set(list.indexOf(emofFeature), ecoreFeature);
}
for (TreeIterator<Notifier> contents = EcoreUtil.getAllContents(resource.getContents(), false); contents.hasNext(); )
{