The project aims to demonstrate how to use OpenAI models inside the IntelliJ IDEA plugin. The plugin provides function name suggestions for Kotlin code.
To learn more, explore the IntelliJ Platform SDK documentation and check out code samples in the IntelliJ Platform SDK Code Samples repository.
Available Run configurations
can be found in Gradle
→ Run Configurations
:
Build Plugin
: Runs:buildPlugin
task. Build the plugin and saves.zip
archive with it inbuild/distributions
folder.Run Plugin
: Runs:runIde
task. Use the Debug icon for plugin debugging.Run Qodana
: Runs:runInspections
task. Starts Qodana inspections in a Docker container and serves a generated report onlocalhost:8080
.Run Tests
: Runs:test
task.Run Verifications
: Runs:runPluginVerifier
task to check the plugin compatibility against the specified IntelliJ IDEs.
The plugin requires Java 17 and IntelliJ IDEA of version 2022.3.3 or higher to work.
To install the plugin:
- Open IntelliJ IDEA and go to
File
/Settings
/Plugins
- Select the gear icon, and choose
Install Plugin from Disk...
- Choose the ZIP archive
ide-workshop-tutorial-0.0.1.zip
- Click
Apply
- Restart the IDE
The plugin requires OpenAI API key. You need to configure OPENAI_API_KEY
in environment variables on your laptop.
Place the caret at the function name, click the light bulb icon (or press ⌥ Opt ↩ Enter
), and
select Generate function name
action in the list to generate function name
suggestions.
When a list of suggestions appears, click on any name in the list, and the plugin will perform an automatic rename method refactoring.
If you have any questions about the use cases, feel free to contact us using GitHub issues.
Plugin based on the IntelliJ Platform Plugin Template.