1.7 KiB
1.7 KiB
Hello World JetBrains Plugin Template
This is a simple Hello World template for a JetBrains plugin that will work with any of their IDEs. It demonstrates the basic structure and components needed for a JetBrains plugin.
Project Structure
build.gradle: Gradle build configuration for the pluginsettings.gradle: Gradle settings for the projectsrc/main/java/org/example/HelloWorldAction.java: The action class that displays a "Hello World" messagesrc/main/resources/META-INF/plugin.xml: Plugin configuration file
Features
- Adds a "Hello World" action to the Tools menu
- Provides a keyboard shortcut (Ctrl+Alt+H) to trigger the action
- Displays a simple message dialog when the action is triggered
Building the Plugin
To build the plugin, run:
./gradlew build
This will create a plugin ZIP file in the build/distributions directory.
Installing the Plugin
- Open any JetBrains IDE (IntelliJ IDEA, PyCharm, WebStorm, etc.)
- Go to Settings/Preferences > Plugins
- Click on the gear icon and select "Install Plugin from Disk..."
- Navigate to the
build/distributionsdirectory and select the ZIP file - Restart the IDE when prompted
Using the Plugin
After installing the plugin:
- Go to the Tools menu and click on "Hello World", or
- Use the keyboard shortcut Ctrl+Alt+H
A message dialog will appear with the text "Hello, World!".
Customizing the Plugin
To customize the plugin:
- Update the plugin metadata in
plugin.xml - Modify the
HelloWorldActionclass to change the behavior - Add more actions or extensions as needed
Requirements
- Java 11 or later
- Gradle 7.0 or later
- Any JetBrains IDE for testing
License
This template is available under the MIT License.