Netbeans (7.4): Is there a way to highlight TODO's?
Asked Answered
M

7

26

I have switched from Eclipse to Netbeans. Eclipse has a way too highlighting TODO's in Java comments like:

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?

Monetary answered 27/11, 2013 at 17:55 Comment(0)
K
9

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.

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.

Look here for this new feature: http://wiki.netbeans.org/NewAndNoteworthyNB74#Tasks_window

Kingwood answered 27/11, 2013 at 19:52 Comment(0)
A
68

There's a helpful Netbeans feature that has been renamed to Action items in 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.

Adore answered 17/2, 2014 at 15:5 Comment(4)
Nice answer and good to know, but my question was not for a list of TODOs items. My question was about highlighting TODOs directly in the source code view. So still rawdog's answer is the accepted answer ...Monetary
In version 8.2 the keywords are in Tools/Options/Team/Action ItemsSent
If only I could give you more upvotes my friend! Amazing answer. @AdoreTilford
While editing PHP files it does not get highlighted... using NetBeans 11.0.Moline
L
17

Following Deve's answer, in Netbeans 8 things changed a little bit.

In version 8, it is in Tools/Options/Team/Action Items

More info: https://www.youtube.com/watch?v=HsENrzwsiOw&hd=1

Lucknow answered 21/8, 2014 at 3:23 Comment(1)
And in the OS X version of NetBeans this is NetBeans/Preferences/Team/Action ItemsTempe
K
9

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.

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.

Look here for this new feature: http://wiki.netbeans.org/NewAndNoteworthyNB74#Tasks_window

Kingwood answered 27/11, 2013 at 19:52 Comment(0)
S
4

There is a plugin "Editor TODO Highlighting", which highlights TODO's in JavaDoc syntax.

But it is only available in nightly builds of netbeans through plugin portal. Here's the issue.

Saturninasaturnine answered 19/10, 2016 at 8:3 Comment(4)
The link inside the issue is broken :(Moline
There is a new link to download from the Dropbox, just scroll downSaturninasaturnine
Thank you. It works with NetBeans 11.0, but it only highlights /** @TODO */. It does not highlight // TODO...Moline
Unfortunately this plugin works that way. It ignores // TODO etc. You need to use doc block syntax like in Cody Maust answer.Saturninasaturnine
G
2

I was able to achieve something close in Netbeans 8.0 (I can't speak for 7.4)..

You will need to use the Javadoc syntax:

/** @TODO something */

This isn't the most desirable workaround, but it is sufficient for me.

Gilley answered 4/10, 2014 at 17:42 Comment(1)
The Action Items window in NetBeans 8.0 not only has a dedicated TODO filter, it also allows for fine-tuning, e.g., you can use an additional keyword filter to limit the TODO display only to items where the description contains the word "remove"..Adriel
U
1

In netbeans 8.2 its called Action Items and 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

Add custom keywords (DOTO instead of TODO): https://www.youtube.com/watch?v=HsENrzwsiOw

Ultramicroscopic answered 27/2, 2018 at 7:3 Comment(1)
this answer is the same as earlier answers. Even the youtube link is the same as dazito postedSonora
C
0

I have not found out yet, if it's possible to highlight a code line that contains "todo" in Apache NetBeans Version 17 But in Version 17 you can go to "Windows->Action Items" and a window will pop up with all todos it can find in the current file. When i opened it the first time it took a minute to index all. Hope this helps.

Clientele answered 3/2 at 14:36 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.