Skip to content
Snippets Groups Projects
Commit 30da1bb9 authored by Stefan Herrnleben's avatar Stefan Herrnleben
Browse files

clone models before writing them to file to fix problem with regenerated uids

parent e31cc39d
No related branches found
No related tags found
No related merge requests found
......@@ -58,7 +58,7 @@ public class DNIAPParser {
.put(Resource.Factory.Registry.DEFAULT_EXTENSION, new XMIResourceFactoryImpl());
resourceSet.getPackageRegistry().put(DNIAPPackage.eNS_URI, DNIAPPackage.eINSTANCE);
Resource resource = resourceSet.createResource(URI.createFileURI(file.getAbsolutePath()));
resource.getContents().add(adaptationPoints);
resource.getContents().add(DNIAPUtil.cloneModel(adaptationPoints));
resource.save(Collections.EMPTY_MAP);
}
......
......@@ -17,7 +17,7 @@ import tools.descartes.dni.dnimm3.NetworkInfrastructure;
import tools.descartes.dni.dnimm3.impl.NetworkInfrastructureImpl;
public class DNIParser {
private DNIParser() {
}
......@@ -58,7 +58,7 @@ public class DNIParser {
.put(Resource.Factory.Registry.DEFAULT_EXTENSION, new XMIResourceFactoryImpl());
resourceSet.getPackageRegistry().put(DNIPackage.eNS_URI, DNIPackage.eINSTANCE);
Resource resource = resourceSet.createResource(URI.createFileURI(file.getAbsolutePath()));
resource.getContents().add(networkInfrastructure);
resource.getContents().add(DNIUtil.cloneModel(networkInfrastructure));
resource.save(Collections.EMPTY_MAP);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment