Extending JetBrains Toolbox App Browser Extension

· 1 min read

JetBrains’ browser plugin can achieve one-click checkout repo to open JB IDE, but doesn’t support domestic Git services like Gitee and Tencent Gongfeng. Understanding that the plugin’s code is open source, I decided to extend support for these services.

Results

https://static.1991421.cn/2022/2022-05-17-224737.gif

Download link: Click here

Principle

Here’s a brief explanation of the plugin’s basic principle. For detailed source code, check the repo.

  1. JB IDE itself provides URL Schema method to trigger actions, like checkout here. But the official doesn’t provide a complete action list, so based on source code I’ve collected some and organized them in jetbrains-url-schemes
  2. Plugin executes some actions when hitting target git web pages
    1. Extract repo, user and other info from URL to determine clone repo address
    2. Analyze programming languages involved in the repo through separate API or partial info from web pages, then determine which IDE to use through language and percentage weighting
    3. Append button at target location
    4. Implement URL Schema jump when user clicks button

Final Thoughts

Through this extension support, you can now seamlessly experience the convenience of plugin to IDE.