改进IntelliJ注释(git blame) [英] Improve IntelliJ annotate (git blame)

查看:629
本文介绍了改进IntelliJ注释(git blame)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想改进注释选项"(右键单击代码行号冒号->注释),它类似于git blame(但已集成到IntelliJ中).

I'd like to improve the "annotate option" (right click on code line number colon -> annotate), which is similar to git blame (but integrated to IntelliJ).

1/有可能吗? (通过IntelliJ文件的插件或原始修改?是其他方式?)
2/我正在使用基于IntelliJ的Android Studio,这会成为问题吗?
3/如果1/& 2/是的,有关如何开始的任何提示?

1/ Is it possible ? (via plugin or raw modification of IntelliJ files ? something else ?)
2/ I'm on Android Studio (based on IntelliJ), will it be an issue ?
3/ If 1/ & 2/ are true, any tips on how to start ?

PS:我的目标是不显示一些提交(例如重新格式化"),因为它们不提供有关代码历史记录的关键信息.

PS : My goal is not to display some commits (like "Reformat") in the annonate because they do not provide crucial informations about code history.

推荐答案

IntelliJ并没有实现自己的用于处理注释的逻辑.相反,它调出git的本机blame命令.

IntelliJ doesn't implement its own logic for handling annotations. Instead it calls out to the git's native blame command.

默认情况下,它在进行提取时使用-w标志,因此在输出中仅忽略行的空白更改.不幸的是,这些选项是插件中的硬编码,并且用户无法对其进行调整.

By default, it uses the -w flag when making the fetch, so white-space-only changes to lines will be ignored in the output. Unfortunately, these options are hard-coded in the plugin, and cannot be adjusted by the user.

粗略的搜索未找到提供其他选项的其他插件的结果,但是您始终可以提交功能请求以获取其他注释选项.

A cursory search yielded no results for another plugin that would provide additional options, but you could always submit a feature request for additional annotate options.

GUI设计师倾向于只为开发人员提供日常操作所需的功能和选项的便捷访问权.他们认为,如果您需要更多功能或需要维护,可以使用命令行,该命令行提供了更多

GUI designers tend to only bother providing easy access to the features and options necessary for daily operation by developers. They assume that if you need more power, or are a maintainer, you'll use the command line, which offers a lot more options any IDE can reasonably implement a GUI for.

这篇关于改进IntelliJ注释(git blame)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆