0

I am using RCP for a while now and I want to open an editor in the background with the possibility to abort and to do something in the meantime. The Composite created by createPartControl can be quite large.

But so far I could not find anything that helps doing that. I tried out the WorkspaceJob in Eclipse-RCP, but then I got Invalid thread access. After that I tried the UIJob. This one does not throw an exception but still blocks the UI from using it differently and there is no possibility to abort the Job (runInUIThread).

I thought there has to be a way to initialize the Composite in the background and then do the drawing synchronized with the UIThread. But so far I could not find anything suitable for that.

Does anyone have any idea how to achieve that?

flavio.donze
  • 7,432
  • 9
  • 58
  • 91
Ruth
  • 856
  • 2
  • 13
  • 26

1 Answers1

2

Everything that creates UI components like Composite must be run in the UI thread so you can't do this.

Eclipse expects createPartControl to run quickly, if you have anything to do which does not involve creating UI objects you could run those parts in a Job.

greg-449
  • 109,219
  • 232
  • 102
  • 145