|
Re: EMF-Edit - mapping features to table columns [message #1736836 is a reply to message #1736711] |
Sat, 02 July 2016 10:56  |
Eclipse User |
|
|
|
The line which maps the feature in the EMF object to the table column is this:
AdapterFactoryTableCellFactory<Object, Object> firstNameCellFactory = new AdapterFactoryTableCellFactory<>(adapterFactory, 0);
It is the index '0' which selects out the feature of the EMF object, and in order to map the index to the feature, AdapterFactoryTableCellFactory delegates to any AdapterFactory supporting ITableItemLabelProvider.
The default AdapterFactory generated by EMF.Edit does not support ITableItemLabelProvider. So in order to display an EMF object in a table, as per the Contacts demo, add support for ITableItemLabelProvider into the AdapterFactory, following http://eclipseo.blogspot.co.uk/2014/11/displaying-your-emf-model-on-tableviewer.html
Robert
|
|
|
Powered by
FUDForum. Page generated in 0.03010 seconds