mirror of
https://github.com/chylex/IntelliJ-Inspection-Lens.git
synced 2025-05-07 08:34:06 +02:00
Fix exception when async description supplier runs on a non-EDT thread
This commit is contained in:
parent
10461d2927
commit
cd465ebc0e
@ -47,7 +47,15 @@ class LensMarkupModelListener private constructor(editor: Editor) : MarkupModelL
|
||||
private fun showAsynchronously(highlighterWithInfo: HighlighterWithInfo.Async) {
|
||||
highlighterWithInfo.requestDescription {
|
||||
if (highlighterWithInfo.highlighter.isValid && highlighterWithInfo.hasDescription) {
|
||||
lens.show(highlighterWithInfo)
|
||||
val application = ApplicationManager.getApplication()
|
||||
if (application.isDispatchThread) {
|
||||
lens.show(highlighterWithInfo)
|
||||
}
|
||||
else {
|
||||
application.invokeLater {
|
||||
lens.show(highlighterWithInfo)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user