I am currently developing an Eclipse RCP application. I have two parts side by side. Both of them feature a NatTable. When I select a cell in on table and click a button, I add a label to that cell. The change is immediately displayed in the table by calling a StructuralRefreshCommand. I have now connected the second table to the first, i. e. when I click the button in one part, both tables should do a StructuralRefreshCommand. Both commands are executed. However, I have to click in the non-active table for the changes to be visible. Under some circumstances I do not need to click into the second table. Are there any other ways of refreshing the table?
For the record: I have also connected both scrollbars. These changes are working either way and are visible immediately.
Refreshing a NatTable is done the way you describe it. There is a convenience method NatTable.refresh() that does exactly the same. I'm not sure if this is related to some Eclipse focus stuff. Maybe the refresh() to one of the tables is not executed because the part doesn't have the focus. Are you developing a Eclipse 3.x or Eclipse 4 based application. If it is Eclipse 4, did you implement a method annotated with @Focus in every part? There might be strange behaviour in Eclipse 4 if this is not done as described here http://www.vogella.com/articles/EclipseRCP/article.html#programmingmodel_annotation.
Thank you for your quick help. I was able to fix another bug with your help. My original problem, however, still exists. I have examined the issue a bit deeper. The issue seems to be caused by a faulty SelectionService. I will dig deeper into this one.
Sorry for the hassle.