IStructuredContentProvider.getElements being called twice [message #1220821] |
Fri, 13 December 2013 15:48  |
Eclipse User |
|
|
|
Hi,
I have a JFace TableViewer that is bound to an EMF model like so:
<TableViewer x:Name="f_v_elements" input="{Binding Path=elements}">
<TableViewer.contentProvider>
<part:ElementsContentProvider/>
</TableViewer.contentProvider>
</TableViewer>
And a content provider:
Class ElementsContentProvider implements IStructuredContentProvider {
@Override
public Object[] getElements(Object inputElement) {
System.out.println(inputElement.getClass());
}
...
}
Before opening the view, I set the DATACONTEXT to an instance of my EMF model.
What I see is that the IStructuredContentProvider.getElements is being called twice.
In the first call, inputElement is of type org.eclipse.emf.ecore.util.EObjectContainmentEList which is a list with elements of my EMF model. That's OK.
The second call, inputElement is of type class org.eclipse.core.databinding.observable.list.WritableList.
Where did that came from, and what do I do with it?
Thanks,
-S.
|
|
|
|
|
Re: IStructuredContentProvider.getElements being called twice [message #1220878 is a reply to message #1220865] |
Sun, 15 December 2013 03:54  |
Eclipse User |
|
|
|
Yes, I have debugged the proper code locations and could not imagine why this has to be done twice. It seems there is some redundancy here: could you please file a bug report?
Sharon Dagan wrote on Sat, 14 December 2013 21:56I get it, but why does the setInput method being called twice? why not just one time with a WritableList?
|
|
|
Powered by
FUDForum. Page generated in 0.06031 seconds