Using ModalityState to manage nested indicators


I am using calling runProcessWithProgressSynchronously({ readAndWrite() }, ...) to perform read and write work in my action.

During readAndWrite() I make use of other intentions (i.e. AddNamesToCallArgumentsIntention) which also display their own dialogs/indicators.

Using app.invokeLater({ write() }, defaultModalityState()) seems to result in inconsistent behavior where the indicators are sometimes display and sometimes not.

How can I use the ModalityState to ensure UI consistency?



Please sign in to leave a comment.