Java Netbeans (7.4):有没有办法突出显示待办事项?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/20249667/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Netbeans (7.4): Is there a way to highlight TODO's?
提问by Steffen
I have switched from Eclipse to Netbeans. Eclipse has a way too highlighting TODO's in Java comments like:
我已经从 Eclipse 切换到 Netbeans。Eclipse 有一种方式在 Java 注释中突出显示 TODO,例如:
public void test(String str) {
// TODO: check if str is null!
...
...
}
In Eclipse I could change the editor configuration so that the TODO was printed bold or in another color. Is there a way to set that up in Netbeans?
在 Eclipse 中,我可以更改编辑器配置,以便将 TODO 打印为粗体或其他颜色。有没有办法在 Netbeans 中设置它?
采纳答案by rawdog
Sorry, right now there is no way to separate highlighting for TODO. You can only change the highlighting for comments. But that's not what you want.
抱歉,现在无法为 TODO 单独突出显示。您只能更改评论的突出显示。但这不是你想要的。
In NB 7.4 there is a new way to control tasks (especially bug tasks). You can connect NB with a bug tracking tool like Bugzilla or JIRA.
在 NB 7.4 中有一种新的方法来控制任务(尤其是 bug 任务)。您可以将 NB 与 Bugzilla 或 JIRA 等错误跟踪工具连接起来。
Look here for this new feature: http://wiki.netbeans.org/NewAndNoteworthyNB74#Tasks_window
在此处查看此新功能:http: //wiki.netbeans.org/NewAndNoteworthyNB74#Tasks_window
回答by Deve
There's a helpful Netbeans feature that has been renamed to Action itemsin version 7.4 and has formerly been known as Todo Tasks. To show occurences of keywords in comments like TODO
or FIX
in a separate list go to Window/Action Items. The listed keywords can be configured in Tools/Options/Miscellaneous/Action Items.
有一个有用的 Netbeans 功能已在 7.4 版中重命名为Action items,以前称为Todo Tasks。要在评论中TODO
或FIX
在单独的列表中显示关键字的出现,请转到Window/Action Items。列出的关键字可以在Tools/Options/Miscellaneous/Action Items 中配置。
回答by dazito
Following Deve's answer, in Netbeans 8 things changed a little bit.
按照德夫的回答,在 Netbeans 8 中,事情发生了一些变化。
In version 8, it is in Tools/Options/Team/Action Items
在第 8 版中,它位于 Tools/Options/Team/Action Items
回答by Cody Maust
I was able to achieve something close in Netbeans 8.0 (I can't speak for 7.4)..
我能够在 Netbeans 8.0 中实现一些接近的东西(我不能说 7.4)。
You will need to use the Javadoc syntax:
您将需要使用 Javadoc 语法:
/** @TODO something */
This isn't the most desirable workaround, but it is sufficient for me.
这不是最理想的解决方法,但对我来说已经足够了。
回答by PeterM
There is a plugin "Editor TODO Highlighting", which highlights TODO's in JavaDoc syntax.
有一个插件“Editor TODO Highlighting”,它突出显示了 JavaDoc 语法中的 TODO。
But it is only available in nightlybuilds of netbeans through plugin portal. Here's the issue.
但它仅在通过插件门户的 netbeans夜间构建中可用。这是问题。
回答by Ales
In netbeans 8.2 its called Action Itemsand you can find it in Window tab > Action items.Maybe this link can be useful: http://www-acad.sheridanc.on.ca/~jollymor/prog24178/nbActionItems.html
在 netbeans 8.2 中,它称为操作项,您可以在窗口选项卡 > 操作项中找到它。也许这个链接可能有用:http: //www-acad.sheridanc.on.ca/~jollymor/prog24178/nbActionItems.html
Add custom keywords (DOTO instead of TODO):https://www.youtube.com/watch?v=HsENrzwsiOw
添加自定义关键字(DOTO 而不是 TODO):https : //www.youtube.com/watch?v= HsENrzwsiOw