Expose plugin to headless mode

已回答

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? 

 

 

0

Thx very much. 

can this also be started in debug version?

1

Nikolay Chashnikov I'm also using the appStarter extension point. How can I start IntelliJ using this while developing the plugin?

1

See com.intellij.idea.Main#isHeadless(java.lang.String[]) for a start.

0

Do you happen to know where i can find documentation for this? 

0

What exactly do you plan to build?

 

0

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.) 

 

See com.intellij.idea.Main#isHeadless(java.lang.String[]) for a start.

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. 

 

 

0

You may implement ApplicationStarter extension point to create a custom command-line application for IntelliJ-based IDE.

0

Thanks for the pointer. For future reference:

open class RunIdeCli: RunIdeBase(false) {

private val traverseUIArgs = listOf("apisearch")

init {
args = traverseUIArgs
}

override fun exec() {
super.exec()
}

override fun setArgs(applicationArgs: List<String>?): JavaExec =
super.setArgs(traverseUIArgs.union(applicationArgs?.toList() ?: emptyList()))

override fun setArgs(applicationArgs: MutableIterable<*>?): JavaExec =
super.setArgs(traverseUIArgs.union(applicationArgs?.toList() ?: emptyList()))
}
0

请先登录再写评论。