custom file editor provider doesn't show up after project reopening

is there a way to postpone custom file editor initialization to the point when idea's indices have been initialized ?
The problem is when I re-open a project in Intellij Idea, my custom editor tabs (for suitable files) simply disappear - only the default Java editors show up. In order to access these custom tabs, I need to close and re-open the files in question.
Sadly, my custom editor needs access to idea's indices so I couldn't simply mark it as DumbAware (as was suggested in javascript:;) - but I figured that if I could mark its' class as 'DumbAware' AND wrap my 'init' method in some kind of callback which would trigger when the indices are accessible, my custom tab would appear (as 'dumb aware') and intialize when it is possible. These custom tabs are already initialized lazily (when clicked) so this effect should be possible to achieve - of course if there is a way to register some kind of listener that would trigger when Idea's indices are in consistent and up-to-date state.
I figured that I could display some kind of a placeholder ('loading' indicator) when a tab has been clicked for the first time and somehow swap it with the real component when the editor provider finishes it's initialization - do you think it is feasible ?.

Thx in advance for any feedback


Please sign in to leave a comment.