[EMF DataBinding] - Getter called outside realm of observable [message #1100630] |
Tue, 03 September 2013 07:12  |
Eclipse User |
|
|
|
Hi,
My eclipse RCP Application working properly for several months.
But since Friday I have a bug that I could not resolve.
I have many views, with viewers. And the viewers are populate using jFace and EMF Databinding.
The code is very simply, like this :
...
master = new WritableValue();
master.setValue(anEOject);
...
ctx = new EMFDataBindingContext();
contentProvider = new ObservableListContentProvider();
...
The bug occured when creating new ObservableListContentProvider();
I know the source of the bug:
At this moment in views : Display.getCurrent() != Display.getDefault();
When created the provider => the default display is used
protected ObservableCollectionContentProvider(
IViewerUpdater explicitViewerUpdater) {
this.explicitViewerUpdater = explicitViewerUpdater;
...
display = Display.getDefault();
...
When checking if the realm is current : => the current dispay is used
public boolean isCurrent() {
return Display.getCurrent() == display;
}
The default Display is created by :
IDEWorkbenchPlugin.createProblemsViews => create the Default display in the Eventmanager Thread.
and after
Workbench.createAndRunWorkbench => create the default Realm using the Display in the main thread.
Is there a way to resolve this problem ?
Thanks for help.
--
Philippe EUGENE.
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03737 seconds