Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » Reflective feature delegation works incorrectly
Reflective feature delegation works incorrectly [message #627250] Thu, 27 November 2008 12:19
Rimvydas is currently offline RimvydasFriend
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?
Previous Topic:Export to UML from ECORE fails
Next Topic:Re: Getting the source code for eclipse uml2
Goto Forum:
  


Current Time: Fri Apr 26 04:59:03 GMT 2024

Powered by FUDForum. Page generated in 0.02899 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top