I need to display a progressbar in eclipse rcp app, for long task.
The task is also using GUI components.
ProgressMonitorDialog progBar = new ProgressMonitorDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell());
progBar.run(true, false, new IRunnableWithProgress(){
public void run(IProgressMonitor monitor) {
editor.doTask(monitor);
}
});
public void doTask(IProgressMonitor monitor) {
monitor.beginTask("Progress", IProgressMonitor.UNKNOWN);
theomposite.getValues(); // <- fails here *WRONG THREAD*
Because it's not the same thread I am getting
Caused by: org.eclipse.swt.SWTException: Invalid thread access