Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

能否集成 tunnel 服务,直接在idea中发送命令 #92

Open
zhongjunzzz opened this issue Mar 29, 2023 · 6 comments
Open

能否集成 tunnel 服务,直接在idea中发送命令 #92

zhongjunzzz opened this issue Mar 29, 2023 · 6 comments
Labels
help wanted Extra attention is needed

Comments

@zhongjunzzz
Copy link

将命令复制到剪切板,感觉依然比较麻烦的操作,我的想法是在idea-setting中直接配置 arthas-tunnel的地址信息, 代码右击时可以将命令发送到 tunnel 执行, 执行的结果在 terminal 中显示

@WangJi92 WangJi92 added the help wanted Extra attention is needed label Aug 29, 2023
@shuxiongwuziqi
Copy link

shuxiongwuziqi commented Feb 11, 2024

你好,我也有类似的需求,所以我结合当前插件的源码和mybatis-log-plugin插件源码,整合出了一个插件,目前只支持watch,trace和stack三个命令。github地址如下: https://github.com/shuxiongwuziqi/idea-mybatis-plus-plugin/

@WangJi92
Copy link
Owner

你好,我也有类似的需求,所以我结合当前插件的源码和mybatis-log-plugin插件源码,整合出了一个插件,目前只支持watch,trace和stack三个命令。github地址如下: https://github.com/shuxiongwuziqi/idea-mybatis-plus-plugin/

看看你集成的思路是怎么样的?简单说一下,有视频或者截图更好。

@shuxiongwuziqi
Copy link

shuxiongwuziqi commented Feb 19, 2024

简单使用:
从代码中右键
image
弹出一个toolwindow,开始监听,如果arthas有输出就会在这里打印出来
image

思路是:

  1. 了解了一下tunnel的接口,其中第一个接口获取到服务列表,第二个接口获取agent的一些参数,第三个接口就可以建立ws连接
    image
  2. 然后对idea项目的pom文件进行解析,根据我们现在的规范,artifactId就是agent的名字
  3. 然后读取git当前分支是什么环境,就默认选中什么环境

大概是这样的

@shuxiongwuziqi
Copy link

你看我这个思路怎么样,我可以提个pr给你吗?

@WangJi92
Copy link
Owner

你看我这个思路怎么样,我可以提个pr给你吗?

最近有点忙,我也在思考如何集成的问题,我还没想好,你可以提交一个

@shuxiongwuziqi
Copy link

我已经提交了一个初稿,只支持watch命令唤起,外加环境配置(因为周五了,周末想休息)。你有空可以看看。有什么好的改动方案,可以微信找我:13826114940

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants