Skip to content

About

ZTools 插件:快速打开 OpenIDEA 最近项目

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

openidea-plugin

A ZTools plugin

一个 ZTools 插件:快速打开 OpenIDEA 的最近项目。

功能

  • 读取 ai.l0ng.openidea 的最近项目记录,按打开时间倒序展示
  • 支持项目名 / 路径 / 分支模糊搜索(空格分隔多关键词)
  • 分支实时读取 .git/HEAD,切换分支后无需重开项目
  • 一键在 OpenIDEA 中打开项目,复用已运行实例
  • 支持项目分组标签:读取 recent-groups.json,副标题显示 [组名],组名也可搜索
  • 目录已不存在的项目标注 [目录缺失],远程项目标注 [远程]

数据来源

平台 路径
macOS ~/Library/Application Support/ai.l0ng.openidea/recent.json
Windows %APPDATA%\ai.l0ng.openidea\recent.json

字段:path、name、openedAtMs、branch、missing。其中 branch 与 missing 是上次展示时的快照,插件会重新计算。

同目录下的 recent-groups.json(可选)保存项目分组,插件只读取 name 与 paths 做标签展示,不改变排序。

启动方式

  • macOS:OpenIDEA.app/Contents/Resources/bin/openidea <path>
  • Windows:openidea.exe --cli <path>,或解析官方 %LOCALAPPDATA%\OpenIDEA\bin\openidea.cmd 包装脚本

开发

npm install

无构建步骤,把本目录作为本地插件导入 ZTools 开发模式即可调试。

结构

  • preload.js:入口,导出 window.exports(列表模式)
  • service/features.js:enter / search / select,列表组装与搜索
  • service/init_service.js:读取 recent.json
  • utils/launcher.js:定位 OpenIDEA 并调用其 CLI 打开项目
  • utils/project_path.js:远程/缺失判定与实时分支读取

参考

上游实现:https://github.com/l0ng-ai/openidea

License

MIT

About

ZTools 插件:快速打开 OpenIDEA 最近项目

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages