This plugin exists to support projects using Kobweb, by offering IDE UX enhancements, Kobweb-specific inspections, useful refactoring actions, and more.
The list of features includes but is not limited to:
@Page
, @App
and so on.So much of IntelliJ plugin development is outside the scope of anything we can hope to cover here. However, we'll share a few links, tips, and high level concepts.
First:
plugin
subdirectory.The IntelliJ API surfaces an astounding number of extension hooks. To add your own custom logic,
search for your desired extension point here,
implement it, and then register your implementation in the plugin's resources/META-INF/plugin.xml
file.
The IntelliJ codebase is unfortunately not the most well documented, especially some of the older parts, so usually the best advice is to search open source plugins for examples of how to do what you want.
Consider referencing the IntelliJ Community codebase and the Android Studio codebase. You might also try searching through GitHub or grep.app to see how other plugins are implemented.
A Run Plugin
run configuration is provided for testing during development.
This will open up a new IntelliJ instance with the plugin installed. (This feels weird the first time you try it, but you'll get used to it!)
You can then open up a project and test your features. You can find sample projects under sample-projects/ which you can use.
To build the plugin, run the Build Plugin
run configuration.
The built plugin will be located in the plugin/build/distributions directory.
Once built, you can install the plugin from disk onto a real IDE environment.
Follow the official instructions here.
The Gradle task associated with publishing a plugin is :plugin:publishPlugin
.
Publishing the plugin requires either credentials be set on your local machine or by using the project's GitHub publish action (preferred), as the credentials have been installed into the repository as a secret.
Before publishing, you should make sure you've reviewed the following checklist:
kobweb-ide-plugin
version in the libs.version.toml
is correct (and does not end in a -SNAPSHOT
suffix).intellij-platform
version is up-to-date.
intellijPlatform.intellijIdeaCommunity(<version>)
declaration in the dependencies
block of the build.gradle.kts
file is set to as low a version as possible (to maximize
compatibility).ideaVersion.untilBuild
property still encompasses the latest EAP version.:plugin:buildPlugin
and installing it from disk.:plugin:verifyPlugin
(or
checking GitHub CI).Finally, publish the plugin using the publishPlugin
task (or
using GitHub CI).
When finished, verify https://plugins.jetbrains.com/plugin/23883-kobweb is up to date.