This project uses Gradle as a package manager and a builder/runner.
The extension registers a service which keeps track of the current terminals.
A ToolWindowManager listener is also registered, which allows us to get the ContentManager of the terminal ToolWindow.
This ContentManager is used through two ITerminalEntry:
- ExistingTerminalsEntry fetch the currently opened terminals and send me to the service
- ListenTerminalsEntry listen for creating or deleting terminals and also send them to the service
The service finally handles those two entries and processes the logic to run the right commands at the right moment.
- Clone this repo and import it to your IDE as a Gradle project.
- Run the plugin in a test IDE using
./gradlew runIde
(or.\gradlew.bat runIde
on Windows)
Note: you may need to run
./gradlew clean
before this, or the plugin will be marked as incompatible with your IDE.
- Build the plugin using
./gradlew buildPlugin
(or.\gradlew.bat buildPlugin
on Windows) - You can see all tasks with
./gradlew tasks
(or.\gradlew.bat tasks
on Windows)
You can also run the tasks directly inside IntelliJ IDEA, in the Gradle panel: