0

I am looking for a way to set the ContentProvider and LabelProvider of a JFace TableViewer without triggering a refresh.

The background of my Problem is:

  • I am dynamically changing the Columns of the TableViewer
  • I am locally defining new input data for the table.
  • This leads to the problem that the old input data is used to display the new column arrangement -> index can get out of bounds

My (ugly) solution up to now is: before I change the columns, I add content/labelprovider to the viewer and set the input to null. If you know of anything cleaner, please let us know.

user3726374
  • 504
  • 1
  • 4
  • 21
  • How dynamic are the columns? Could you have 2 or 3 tables with only one visible at a time? – greg-449 Oct 02 '14 at 06:46
  • @greg-449 There is a switch button to switch between two tables. But somehow I do not like the idea of having two tables. Once the switch is done between the tables, the old input objects shall be deleted. – user3726374 Oct 02 '14 at 07:24

0 Answers0