Expose plugin to headless mode Follow
A few month ago a paper was published ( https://arxiv.org/pdf/2103.12778.pdf ) where they build a psi miner. They stated they build the plugin in a way it can be called in the headless mode of intellij. I want to do something similar. So how can I expose my plugin to the headless mode so that it can be called from the command line?
Please sign in to leave a comment.
See com.intellij.idea.Main#isHeadless(java.lang.String) for a start.
Do you happen to know where i can find documentation for this?
What exactly do you plan to build?
basically an different PSI miner than the one introduced in the linked paper ( https://arxiv.org/pdf/2103.12778.pdf ).
I want an plugin that runs in headless mode. Then the plugin can be called via cmd from another program and be given a string to a project.
Within the project it shall parse something for me an do something based on the parsing. (the parsing part i already got covered what i still need is the knowledge of how i can start the IDE in headless mode from the other program and how i can reach my plugin within the ide.)
This is a good start but i still don't know were to use this method. How to configure the plugin so this is accepted as entry point.
You may implement ApplicationStarter extension point to create a custom command-line application for IntelliJ-based IDE.
Thx very much.
can this also be started in debug version?
Nikolay Chashnikov I'm also using the appStarter extension point. How can I start IntelliJ using this while developing the plugin?
Simon Stratmann see https://github.com/JetBrains/gradle-intellij-plugin/#running-dsl, you can pass args via Gradle script
same is done by builtin Gradle task building Searchable Options, https://github.com/JetBrains/gradle-intellij-plugin/blob/cae39d2c24a384fe9615148ca7b8c767be98da9c/src/main/kotlin/org/jetbrains/intellij/tasks/BuildSearchableOptionsTask.kt#L9
Thanks for the pointer. For future reference: