[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform.swt] TableViewer is not Refresh()?

Dear All,

I am updating my table viewer content on a background thread. After Thread completion i am refreshing my table viewer through refresh() methodm, but visible area of the tableviewer is not getting refreshed/updated. When we click on the Table row, then immediately it's showing updated values. But unvisible areas in the table viewer is got updated.

Job job = new Job("Updating Items...") {
protected IStatus run(IProgressMonitor monitor) {
try{
 upfateTheModel();
}catch (Exception e) {
 Log.error(e);
}
return Status.OK_STATUS;
}
};
job.setPriority(Job.SHORT);
job.setUser(true);
job.schedule(); // start as soon as possible
job.addJobChangeListener(new JobChangeAdapter() {
public void done(IJobChangeEvent event) {
      	tableViewer.refresh();
}
});

How can I update the viewer even if the model updated in background thread?

with Thanks and Regards,
-arun