I'm working on a custom language plugin (Gosu) for IntelliJ IDEA 11. The problem I have is that IDEA reindexes the whole project (both Java and Gosu files) at every startup. If I disable the plugin, IDEA works as expected, indexing only the first time. It therefore appears abvious that our plugin is doing something wrong and corrupting the whole index. Debugging it a little it looks that the index is not saved to disk at shutdown since at the next startup it thinks that none of the file are indexed. Any ideas what might cause this? How would I investigate further?