use of org.eclipse.xtext.resource.persistence.SerializableEObjectDescriptionProvider in project xtext-core by eclipse.
the class SerializableResourceDescription method createCopy.
private static SerializableEObjectDescription createCopy(final IEObjectDescription desc) {
if ((desc instanceof SerializableEObjectDescriptionProvider)) {
return ((SerializableEObjectDescriptionProvider) desc).toSerializableEObjectDescription();
}
SerializableEObjectDescription _serializableEObjectDescription = new SerializableEObjectDescription();
final Procedure1<SerializableEObjectDescription> _function = (SerializableEObjectDescription it) -> {
it.setEClass(desc.getEClass());
it.setEObjectURI(desc.getEObjectURI());
it.qualifiedName = desc.getQualifiedName();
int _size = ((List<String>) Conversions.doWrapArray(desc.getUserDataKeys())).size();
HashMap<String, String> _hashMap = new HashMap<String, String>(_size);
it.userData = _hashMap;
String[] _userDataKeys = desc.getUserDataKeys();
for (final String key : _userDataKeys) {
it.userData.put(key, desc.getUserData(key));
}
};
return ObjectExtensions.<SerializableEObjectDescription>operator_doubleArrow(_serializableEObjectDescription, _function);
}
Aggregations