Closed foto-andreas closed 5 days ago
This is how IntelliJ API works (it got stricter in recent versions and throws exceptions in more cases).
In case you haven't seen it, see https://github.com/JetBrains/intellij-community/blob/321e4bd1d89e60b611a1529753d83746a84ef557/platform/core-api/src/com/intellij/util/SlowOperations.java#L74 and https://plugins.jetbrains.com/docs/intellij/threading-model.html
The simplest workaround is probably this:
import com.intellij.openapi.actionSystem.ex.ActionUtil.underModalProgress
...
val file = underModalProgress(project, "") { FileSearch.findFileByName(fileName, project) }
thank you for the hint!
Hi Dmitry,
I updated to 0.9.4 using 2024.3 beta currently:
Andreas