The EcoreUtil.copy returns null when sourceAEI is an instance of an array (i.e., it has a selector).
public void execute() { clonedAEI = (ArchiElemInstance) EcoreUtil.copy(sourceAEI); clonedAEI.setTypeOf(sourceAEI.getTypeOf()); clonedAEI.setInstanceName(sourceAEI.getInstanceName() + "_cloned_" + getRandomCloneIndex()); ((AEmiliaSpecification) this.getModel()).getArchiTypeDecl().getAtDeclaration().getAeiDecl().add(clonedAEI); cloningOutputInteractions(); cloningInputInteractions(); cloningArchitecturalInteraction();.
Check the commit 961edf8
The
EcoreUtil.copyreturns null whensourceAEIis an instance of an array (i.e., it has a selector).public void execute() { clonedAEI = (ArchiElemInstance) EcoreUtil.copy(sourceAEI); clonedAEI.setTypeOf(sourceAEI.getTypeOf()); clonedAEI.setInstanceName(sourceAEI.getInstanceName() + "_cloned_" + getRandomCloneIndex()); ((AEmiliaSpecification) this.getModel()).getArchiTypeDecl().getAtDeclaration().getAeiDecl().add(clonedAEI); cloningOutputInteractions(); cloningInputInteractions(); cloningArchitecturalInteraction();.Check the commit 961edf8