Trigger progress indicator within Daemon code analyzer (ProgressManager)

My annotator engine uses lazy loaded data from database. Since database responses may take more than few seconds, I want to be able to show a modal progress indicator using ProgressManager.
Nevertheless, at the stage I want to start the loading process I am within a "Daemon code analyzer" thread, which does not allow me to trigger a ProgressManager process (assert hard stop).

I am using ProgressManager.runProcessWithProgressSynchronously(...)
Looks like only "AWT-EventQueue" is allowing it.

Any idea how to solve this problem?
Would appreciate any hint.

Comment actions Permalink

Found the answer to my question..

For the record:... :)
Processes which need UI interaction (similar to my progress indicator) need to be started in an EventQueue thread.
e.g. EventQueue.invokeAndWait(Runnable runnable)

Even within daemon code analyzer thread we may start a joined EventQueue thread (e.g. while performing annotation).


Please sign in to leave a comment.