Indexing of custom language frameworks: File location + Background task?
Hi,
I'm writing a custom language integration for the R-language. To get framework aware code-completion etc., my plugin builds an index of the user's R-installation (using some custom code not by using the indexing framework of Intellij).
1) I want to save the index with ObjectOutputStream into a file (to avoid reindexing whenever Idea restarts). What is the proper place (in the intellij cache/config directory) to put the index file? How can I obtain it programmatically?\
2) I would like to expose the indexing status to the user by using a background task. Is there an easy example about how implement such a background task?
Thanks,
Holger
Please sign in to leave a comment.
Hi again,
I'm still looking forward to find solutions to the mentioned problems. So if you've an idea, feel welcome to share it with me.
Best,
Holger
Hello, 1) com.intellij.openapi.application.PathManager#getIndexRoot() 2) com.intellij.openapi.progress.ProgressManager#runProcessWithProgressAsynchronously() Why do you not use builtin indexing infrastructure? Regards, Yann
Hi Yann,
I don't use the infrastructure,because I thought it's more about indexing files in a project/module than about indexing frameworks (like jdk or the user's R package index in my case). Am I wrong?
Best,
Holger
The framework is used in exactly the same way for indexing sources and libraries.
Hello Dmitry,
thank you for your quick response. Is there a tutorial/easy to read code-example about how to implement it for custom language framework? Is it possible to implment a background tak without using the indexing framework of intellij?
Best,
Holger
Check out this new document: http://confluence.jetbrains.net/display/IDEADEV/Indexing+and+PSI+Stubs+in+IntelliJ+IDEA
Thanks a lot Dmitry, this documentation is greatly appreciated. This is an essential area that's been a black art until now.
Cheers,
Colin