allowSlowOperations deprecated?
已回答
Here's another one I stumbled upon. My plugin has to search for all files with certain extension within a project, e.g.
Collection<VirtualFile> libs = FilenameIndex.getAllFilesByExt(project, "libsonnet", GlobalSearchScope.allScope(project));
Previously I used to wrap this in SlowOperations.allowSlowOperations but it is deprecated now - so what's the alternative?
请先登录再写评论。
Hi Eugene,
There is no alternative to allowing slow operations. As the deprecation message states, they will be banned on the EDT (UI thread).
You should fix your code to not call slow operations on EDT. Please see
SlowOperations.assertSlowOperationsAreAlloweddoc for the details.