diff --git a/tools.descartes.dni.adaptation/src/tools/descartes/dni/dnimm3ap/tools/DNIAPParser.java b/tools.descartes.dni.adaptation/src/tools/descartes/dni/dnimm3ap/tools/DNIAPParser.java index d82b415f5aab0a365cba4cac654634040a278a68..1f8bcd31a385442df9a25073c6c106aa8a0dba65 100644 --- a/tools.descartes.dni.adaptation/src/tools/descartes/dni/dnimm3ap/tools/DNIAPParser.java +++ b/tools.descartes.dni.adaptation/src/tools/descartes/dni/dnimm3ap/tools/DNIAPParser.java @@ -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); } diff --git a/tools.descartes.dni.core/src/tools/descartes/dni/dnimm3/tools/DNIParser.java b/tools.descartes.dni.core/src/tools/descartes/dni/dnimm3/tools/DNIParser.java index 8486cde15b586a434374f85aa787735ee36da2fb..46555ff172ba79b1068dddacb46514f30247cdc4 100644 --- a/tools.descartes.dni.core/src/tools/descartes/dni/dnimm3/tools/DNIParser.java +++ b/tools.descartes.dni.core/src/tools/descartes/dni/dnimm3/tools/DNIParser.java @@ -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); }