how to get fileBaseIndex ready

Answered

I create a toolwindow  when project opened , and throw a indexNotReady Exception, I want to make  the index ready, so I  try to call

FileEditorManager#openFile

to  load  fileIndex , then I call  method

runWhenLoaded

to do some work ,but I got 


com.intellij.openapi.diagnostic.RuntimeExceptionWithAttachments: EventQueue.isDispatchThread()=false,

How to fix it ?

0
2 comments

Make your ToolWindowFactory implement also DumbAware interface.

0

any other method I can make the file index ready?  by open/close files, it takes long time !

0

Please sign in to leave a comment.