Friday, May 7, 2010

How to customize the copy functionality of EcoreUtil ?

EcoreUtil.Copier testCopier = new Ecoreutil.Copier() {

protected void copyContainment(EReference eRef, EObject eObj, EObject copyEObj) {
// skip the unwanted feature
if(eRef != unwanted_feature) {
super.copyContainment(eRef, eObj, copyEobj);
}
}
//
testCopier.copyAll(testObjects);
testCopier.copyReferences();
//

to be continued ..

No comments: