Is there a way to find out Indexer is still running except an exception?
已回答
I'm trying using different index-based methods in my plugin but sometimes it drops out with this exception:
IndexNotReadyException
This results in bad user experience for my users 'cause functionion of the plugin is not reliable and I need to display inconsistent state somehow. I wish there'd be a way just to ask if indexer is still running - then I would just do not display content at all.
请先登录再写评论。
IndexNotReadyException is thrown from the inside of FileBasedIndexImpl.java#L711 in case you're still in Dumb mode. Before performing your action, check if IDE is not in Dumb mode anymore:
!DumbService.isDumb