- StructuredSelection selection = new StructuredSelection(components);
- fTreeViewer.setSelection(selection);
+ final StructuredSelection selection = new StructuredSelection(components);
+ UIJob myJob = new UIJob("Select") { //$NON-NLS-1$
+ @Override
+ public IStatus runInUIThread(IProgressMonitor monitor) {
+ fTreeViewer.setSelection(selection);
+ return Status.OK_STATUS;
+ }
+ };
+ myJob.setUser(false);
+ myJob.schedule();