|Re: emf forms observable updates across threads [message #1749438 is a reply to message #1749283]
||Tue, 06 December 2016 18:07
| Jay Norwood
Registered: July 2009
The model instance is loaded from an xmi file.|
dsloaded = (Dsense) resource.getContents().get(0);
The list being displayed is cleared, then repopulated. I've tried repopulating the list both directly via emf api calls, or by executing a command to add a list of new items, such as below:
EditingDomain editingDomain = AdapterFactoryEditingDomain.getEditingDomainFor(cameraRecordings);
Command command = AddCommand.create(editingDomain, cameraRecordings, cameraRecordings.getRecordings(),crn.getRecordings());
These api accesses seem to work ok to modify the model, and the values are updated in the various views with an error.
I get an error, though, if I try to manually edit the class attributes using the emf forms editing dialogs.
However, if I create a copy of the full model for each tab view, using ECoreUtil.copy, then the emf forms dialog editing works without error.
dsense = EcoreUtil.copy(DemoWorkbench.getDsenseInstance());
So, does EcoreUtil.copy have some side-effect wrt the editing domain that would enable the emf forms operation? I was guessing that the problem was that listeners in the other UI threads (per tab) were being notified by the emf forms databinding while the threads were not active.
I'll attempt to make some small example.
Powered by FUDForum
. Page generated in 0.07472 seconds