|
|
|
|
|
|
|
|
|
|
Re: Adapters [message #1745489 is a reply to message #1745456] |
Tue, 11 October 2016 09:40  |
Eclipse User |
|
|
|
Felix,
The implementation for MinimalEObjectImpl's eAdapter's list is tricky. A new list is created for each call to eAdapters and that list is backed by an array kept in the eStorage. The array that it uses is never modified. In fact the array instance may be shared among many EObjects, so for example, when adding an EContentAdapter, all objects in the tree might well share the same array of adapters containing that EContentAdapter. So the list will certainly never see a partially initialized array...
Ludwig,
I really did suggest setting a breakpoint. It's best to find out where exactly are all the calls that modify the adapters on that object. If it's being removed or otherwise going missing, which could happen if multiple threads are adding adapters at the same time for the same object, all cases must set a new array and must go through this method. So either the adapter isn't really going missing or some call to this method sets an array that doesn't have this adapter in it. You've instrumented the call with logic, but I have no idea what that logic really tests and no idea if the logic itself is correct. Set a breakpoint to find out all places that modify the array. If there are multiple threads doing it, you should end up seeing the process stop in multiple threads.
|
|
|
Powered by
FUDForum. Page generated in 0.05571 seconds