Reflective feature delegation works incorrectly [message #627250] |
Thu, 27 November 2008 12:19 |
Rimvydas Messages: 47 Registered: July 2009 |
Member |
|
|
Hello,
Suppose I have a model:
1) classes A, B and C
2) B and C are derived from A
3) A class has a property allElements of type A (derived union, ordered,
multiplicity: 0..*)
4) B class has a property cElements of type C (ordered, multiplicity:
0..*), subsetted property A.allElements
If I generate a code using genmodel property Feature delegation: none then
generated method getAllElements in class A returns object
DerivedUnionEObjectEList and the model works correctly. E.g.:
B b = DataFactory.eINSTANCE.createB();
C c = DataFactory.eINSTANCE.createC();
b.getCElements().add(c);
System.out.println("c element count: " + b.getCElements().size());
System.out.println("all element count: " + b.getAllElements().size());
c element count and all element count is equal to 1.
But if I change genmodel property to Feature delegation: Reflective then
the code above will return:
c element count: 1
all element count: 0
My question:
Is it possible to configure genmodel that it would generate correct
implementation then Feature delegation property value is Reflective? If
yes then how?
|
|
|
Powered by
FUDForum. Page generated in 0.02899 seconds