Is there a way to find out Indexer is still running except an exception?

Answered

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. 

1 comment
Comment actions Permalink

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
0

Please sign in to leave a comment.