Execute IntelliJ Indexing Programmatically
已回答
I want to execute IntelliJ indexing via programming. Basically, I want to create one script(Gradle) which will execute all necessary steps(i.e build project, indexing, etc.) without opening IntelliJ. Does IntelliJ provides any API to do this ?
请先登录再写评论。
You may be able to do this using ApplicationStarter but you'd need to write a custom plugin. You can also check https://www.jetbrains.com/help/idea/working-with-the-ide-features-from-command-line.html#arguments
I've prototyped something similar but used the embedded web server for controlling IntelliJ while running.
But why would you want to run the indexing without anything else? Perhaps you're looking for https://www.jetbrains.com/help/idea/shared-indexes.html?
Can you please share any examples of ApplicationStarter?
I have multiple projects which updates from time to time in order to not waste much time when I will open it after some time I've made this python script(Windows) which I'm running in loop for each directory. I assumed that if there is less than 10% CPU usage, IDE finished indexing and is in idle state.