Community
Participate
Working Groups
Build Identifier: As discussed in this thread http://www.eclipse.org/forums/index.php/t/245046/ a API for cloning an existing model would be helpfull. Reproducible: Always
Enhancement implemented. See IModelElement.copy( [IModelElement] ) method. Unit tests in TestModelingMisc0012. Please verify. Usage examples (from 0.4 enhancements guide): In this example, the copy method is used to duplicate the entities held in a list property. ModelElementList<Entity> entities = model.getEntities(); for( int i = 0, n = entities.size; i < n; i++ ) { final Entity original = entities.get( i ); final Entity duplicate = entities.addNewElement(); duplicate.copy( original ); } Here, an entire model is copied to a memory resource. Perhaps the original model instance was loaded from disk via an XML resource. Model original = ... Model duplicate = Model.TYPE.instantiate(); duplicate.copy( original );
I've used IModelElement.copy() method. Closing.
Since you are a committer, you can mark the bug as closed when verifying, without going through the verified status.