IntelliJ IDEA plugin - test extension points by publishing plugin?
My team and I have developed a plugin for IntelliJ IDEA using the JetBrains API. Now we would like to test it "live", but we are not sure how to do so.
To the plugin itself: It is a tool that helps to mine source code. The user should have the opportunity to add his own miner, after he has installed our plugin in the IDE. For this JetBrains offers so-called extension points.
(1) If you want to test the plugin, you have to create your own project first and then install our plugin. This created project must also be an IntelliJ plugin project, where you add in the **plugin.xml** our extension point, which we already defined in our project:
<extensionPoints>
<extensionPoint name = "IMinerExtensionPoint" interface = "some.package.IMiner"/>
</extensionPoints>
Then the user would have to write in his **plugin.xml**:
<extensions defaultExtensionNs = "OurPluginNameID">
<IMinerExtensionPoint implementation = "some.of.his.package.MyMiner"/>
</extensions>
Or am I wrong with this? I'm not sure whether I understood the Extension Point Mechanism.
(2) Now the problem is that I do not know how to install our plugin in another project. I found out that it can be published through the JetBrains plugin repository. However, this is more difficult because we are working on a gradle project. Following the documentation and adding some user credentials in the gradle.properties leads to compile errors. In our case it would be more appropriate to be able to export this locally (for example as a .jar) and then integrate it into the IDE. However, I have not figured out which modules the artifact needs for the export. Does anyone have experience with this?
Please sign in to leave a comment.
You can have a look at my gradle plugin setup: https://github.com/SeeSharpSoft/intellij-csv-validator
The plugin is published via Travis, where also the credentials are stored. However, when using the Jetbrains gradle plugin like in my setup, you can locally just run 'buildPlugin' and upload the generated JAR manually to the Jetbrains repo.
Furthermore you can use the JAR package and add it manually to your plugins in any JetBrains IDE:
Hello, thank you really much. I already searched GitHub for code examples and this looks familiar to me. To upload the plugin manually seems to me the easiest option right now.
PS.: nice plugin you wrote!