Kenn,
of course... again, i refer to the Package::ownedTypes containment of
Figure 7.14 in the UML2 spec.
When i generate the corresponding code, it looks like this:
public EList<Type> getOwnedTypes() {
// TODO: implement this method to return the 'Owned Type' reference
list
// Ensure that you remove @generated or mark it @generated NOT
throw new UnsupportedOperationException();
}
but it should look like this:
public EList<Type> getOwnedTypes() {
return new DerivedSubsetEObjectEList<Type>(Type.class,
this, TestingPackage.PACKAGE__OWNED_TYPE, OWNED_TYPE_ESUPERSETS);
}
Well, it was not hard to implement this if you understand how the UML
list framework works, but i was wondering, why the generator is not
capable to generate it. Almost any information, that is necessary, is
avialable in the model, i think.
Thx
Timothy
Kenn Hussey schrieb:
Timothy,
I'm afraid you'll have to provide a bit more detail about your model
in order for us to help. What do you mean by "manually defining the
relation"?
Note that code using derived subset lists will generally only be
generated if the subset is derived and the option to process subsets
is turned on in the wizard...
Kenn
Timothy Marc wrote:
Hi all,
i'm using the UML2 genmodel to generate an Ecore model, which is
aware of the UML2 subsets mechanism. This works well for the most
parts of my model, but i was wondering why a derived subset wasn't
generate the DerivedSubsetEList. By manually defining the relation,
it works as expected, but it won't be generated.
Is this the intended behavior?
Thanks
{Timothy}