Retrieving elements (child elements) from package

Hi,

I’m tryiing to write a context plugin, which retrieve all elements contained in a selected package (i.e. ownedElements) and do some operations on them. I know that there is a childIterator() method, however the method does not find IAssociaction, IAssociactionClass etc.

Is there any possiblity to do this, or should I iterate each class found by childITerator() and using toRelationshipIterator() or fromRelationshipIterator(), retrieve all contained Associations and AssociationsClasses or maybe there is some other way to do this?

Thanks in advance,
Derek

Hi Derek,

Thanks for replying.

…should I iterate each class found by childITerator() and using toRelationshipIterator() or fromRelationshipIterator(), retrieve all contained Associations and AssociationsClasses…
Yes, you can retrieve Association/IAssociation and Association Classes/IAssociation Classes in this way.

If there is any further inquiry, please feel free to ask.

Best regards,
Lilian Wong