Understanding JetBrains URL Scheme
While using click-to-component recently, I discovered it didn’t support JB IDE integration, so I spent some time implementing support. Here, I’ll mark down JB’s URL Scheme support situation.
JB IDE itself doesn’t provide direct URL Scheme support. After research, I found the following 2 solutions.
JetBrains Toolbox
After installing the toolbox, it provides support for various JB IDEs.
Supported IDE List
- IntelliJ IDEA
- AppCode
- CLion
- PyCharm
- PhpStorm
- RubyMine
- WebStorm
- Rider
- GoLand
- RustRover
Supported Actions
- Checkout a repository and open it with the corresponding IDE
1 | jetbrains://${toolTag}/checkout/git?checkout.repo=${cloneUrl}&idea.required.plugins.id=Git4Idea |
- Open a repository file and move to the corresponding line and column position.
1 | jetbrains://${toolTag}/navigate/reference?project=${project}&path=${filePath}:${lineIndex}:${columnIndex} |
For specific URL Scheme rules, see the repository jetbrains-url-schemes
The drawback of this solution is that it doesn’t provide functionality to open a specific file directly.
IDE Remote Control
JB officially provides IDE Remote Control support, which means the IDE offers a control server that can be operated through HTTP API.
API Specification
1 | * @apiExample {curl} Absolute path |
For specific details, see JB’s official commit
The drawback of this solution is that IDE needs to install the IDE Remote Control
plugin. And because it’s an HTTP service, it might conflict with local ports, requiring manual modification.
At the end
Both solutions above can achieve file click-and-jump functionality, but both have shortcomings. Looking forward to JB IDE providing comprehensive URL Scheme support directly in the future.