I'm using DaemonCodeAnalyzerEx to retrieve the linting information from the editor, such as deprecations, unused imports and so on.
I am setting text in the current document in the editor, and what I don't know is how to wait for the linting pass to complete before attempting to retrieve the linting info. I have tried various refresh methods, DaemonCodeAnalyzer.restart(), etc etc, but nothing is working for me.
I also tried subscribing to DaemonCodeAnalyzer.DAEMON_EVENT_TOPIC but it appears to never fire com.intellij.codeInsight.daemon.DaemonCodeAnalyzer.DaemonListenerAdapter#daemonFinished.
I'm quite new to this whole thing so quite likely a noob fail, so any help appreciated.