| [news.eclipse.tools.emf] Re: Initialize multivalued attributes/references |
Felix,
Comments below.
No, it's the same. That makes it even more mysterious.Hi Ed, >> when adding a multivalued attribute to an EClass, the generated codedoesn't initialize the attribute. Thus,This doesn't sound quite right to me. All features for which upperBound > 1 will have an initialized list.
calling getMyAttributeList() might return null. The solution is to perform a check or modify the generated code.
Uhm, the only thing i can think of that the behaviour is different for EAttributes and EReferences. I'm talking about an EReference.
There must be something that's gone unsaid so far because multi-valued features (attributes or references) will always return a list, never null. Can you think of anything odd about your model that makes it different from author -> books which we know works properly?
Is this list just a single valued feature who's value happens to be a list (like from an XSD list type)?
I directly create the model with the tree editor, just like the author->*book example. So the type is book and its upperbound is -1.
Felix