Thursday, January 2, 2014

TableViewer.refresh(true, false) behaves as TableViewer.refresh(true, true)

The problem I met is that refresh(true, false) method of org.eclipse.jface.viewers.TableViewer class behaves as refresh(true, true) on Linux platforms.

I found an opened bug for this case: https://bugs.eclipse.org/bugs/show_bug.cgi?id=414455 but the current SWT 4.3 stable version doesn't contain the fix.

To overcome this problem temporary (until SWT 4.4 is released) I used "SWT.MULTI" style bit during TableViewer creation.

I played with different styles, but it is the only way to avoid the problem. "SWT.NONE" didn't help as well because of the logic inside org.eclipse.swt.widgets.Tablet constructor which overwrites "style" parameter: