| [EMF DataBinding] - Getter called outside realm of observable [message #1100630] |
Tue, 03 September 2013 07:12  |
Philippe EUGENE Messages: 20 Registered: January 2011 |
Junior Member |
|
|
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.
|
|
|
|
| Re: [EMF DataBinding] - Getter called outside realm of observable [message #1100672 is a reply to message #1100664] |
Tue, 03 September 2013 08:30   |
Philippe EUGENE Messages: 20 Registered: January 2011 |
Junior Member |
|
|
I could reproduce the bug with the sample application : Mail template.
1. Create the application with the wizard
2. Just add this line in the View :
ObservableListContentProvider contentProvider = new ObservableListContentProvider();
3. Launch the application => OK. All works fine.
For reproduce the bug :
4. Add the org.eclipse.ui.ide in the launch configuration (i force the autostart a true for launch the plugin, in my ownn product RCP the autostart is at the default value)
5. Launch the application => Reproduce the bug.
For information : my target Platform is a 3.7
[Updated on: Tue, 03 September 2013 08:32] Report message to a moderator
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02285 seconds