IDE评论关键字 [英] IDE comment keywords

查看:137
本文介绍了IDE评论关键字的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我最近才发现了TODO评论。对于那些不知道的人,大多数现代IDE会在评论中识别这个单词,并将评论行标记为不同的颜色,以便它突出。

So I only recently discovered the TODO comment. For those of you that don't know, most modern IDE's will recognize this word in a comment and flag the comment line a different colour so It stands out.

EG。

//Need to talk to Bill about refactoring this code

//TODO:Need to talk to Bill about refactoring this code

您可能会注意到IDE中的 Eclipse Rubymine 突出显示TODO评论还有一些很好的其他功能。

You may notice in IDE's like Eclipse or Rubymine highlight the TODO comment and some nice other features to do with it.

我的问题是:还有其他什么关键字像TODO?这似乎是一种更好的方式,通过评论和一个应该在IDE中广为人知的功能与开发人员进行沟通。毕竟他们的目的是帮助开发..

My question is: What other keywords are there like the TODO? It seems like a much better way of communicating to developers through comments and a feature that should be a bit more widely known in IDE's. Their purpose is to help with development after all..

推荐答案

我可以说Eclipse,你可以自定义它。

I can speak of Eclipse, you can customize it.

单击窗口 - >首选项,然后搜索常规 - >编辑器 - >结构化文本编辑器 - >任务标签,或 Java - >编译器 - >任务标签(可能还有一些其他的,如JavaScript,PHP,StatET等)。

Click on Window -> Preferences, and search for General -> Editors -> Structured Text Editors -> Task tags, or for Java -> Compiler -> Task tags (there might be some additional ones like for JavaScript, PHP, StatET, etc.)

TODO, FIXME, XXX

我使用了一些额外的:

I use some additional ones like:

CHECKME, DOCME, TESTME, PENDING

我个人喜欢使用 DISCUSS / REVIEW 标签来确保我在代码审查或结对编程期间与某人讨论某些问题(例如,我没有误解规范应该如何工作等等。)

I personally like to use the DISCUSS/REVIEW tags just to make sure I speak about some issue with someone during a code review or pair programming (e.g., I haven't misunderstood the specification how something should work etc.).

你也可以设置分配给不同任务标签的优先级

You can also set the priorities assigned to the different task tags there too.

这篇关于IDE评论关键字的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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