Community
Participate
Working Groups
With bug 307665 (see comment 10) a performance change was introduced which casts the structural feature to BasicEList<EObject> and invokes the addUnique() method instead of simply add() on EList. This works fine for normal lists, but not for EMaps. The code should instead cast to InternalEList<EObject> which all many values structural features can be expected to implement. This interface also declares the addUnique() method.
Please check for other ocurrences of BasicEList, too.
fixed
*** Bug 325984 has been marked as a duplicate of this bug. ***
Could you please tell us in what revision this has been solved and in what release we can expect it. Please also note that nothing prevents list exposed by models to not be based on InternalEList at all, for example in the case of a derived reference implemented by the user. I didn't see how you solved the problem but it might be safer to check if the object is actually an instance of BasicEList and use the simple "add" method otherwise as a fallback.
see comment #4
We should discuss this as the JavaDoc InternalEList states: An interface that the value of multi-valued feature is expected to implement. I'd like to close this again as the current impl meets the expectations of implementators and clients.
You're right, it seems you're supposed to implement InternalEList even if that's not required by the generated interface ... I don't really get the rationale behind that but that's not the matter here. You're right, you can leave the bug closed. Could you please answer my other question regarding the revision and release where the fix can be found. Thank you.
The fix is part of the Indigo Stream of Xtext. A first milestone is likely to appear next Tuesday.
Note that such early milestones are not intended to be used in production. You should instead fix this by subclass the org.eclipse.xtext.parser.DefaultEcoreElementFactory
Fix backported to 1.0.2
Closing all bugs that were set to RESOLVED before Neon.0