Update TableViewer with new data on top of existing one. [message #1860956] |
Mon, 11 September 2023 17:22 |
Nagaraj Kandoor![Friend of Eclipse Friend](https://www.eclipse.org/donate/web-api/friends_decorator.php?email=nagarajkandoor%40gmail.com) Messages: 56 Registered: May 2020 |
Member |
|
|
Currently i am working on task which requires me to update TableViewer data on top of existing one.
I have a view which extends ViewPart and which displays data in TableViewer.
While loading view i am setting TableViewer data
ex:
viewer.setContentProvider(ArrayContentProvider.getInstance());
viewer.setInput(new String[] { "One", "Two", "Three" });
now i need to update TableViewer without loosing existing data.
i am doing this but i don't see TableViewer is getting updated
Display.getDefault().asyncExec(() -> {
viewer.setContentProvider(ArrayContentProvider.getInstance());
viewer.add(new String[] { "Four", "Five"});
viewer.getControl().setRedraw(true);
viewer.refresh();
});
Any idea why ViewPart tableviewer is not updated new data?
Thanks
Nagaraj
|
|
|
Powered by
FUDForum. Page generated in 0.01442 seconds