This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 210590 - Make it possible to add TODOs to Task list
Summary: Make it possible to add TODOs to Task list
Alias: None
Product: platform
Classification: Unclassified
Component: Action Items (show other bugs)
Version: 7.2
Hardware: PC Windows XP
: P3 normal (vote)
Assignee: Jan Peska
Depends on:
Reported: 2012-04-03 06:32 UTC by Peter Nabbefeld
Modified: 2013-02-12 14:54 UTC (History)
0 users

See Also:
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
Description Peter Nabbefeld 2012-04-03 06:32:12 UTC
E.g. use comments like this:
<!-- TODO: This template is currently buggy -->
Comment 1 Svata Dedic 2012-05-17 11:22:45 UTC
This should be already possible; see Tools | Options | Misc | Action items for recognized patterns.
Comment 2 Peter Nabbefeld 2012-05-17 12:46:19 UTC
(In reply to comment #1)
> This should be already possible; see Tools | Options | Misc | Action items for
> recognized patterns.

You seem to miss sth.:
It's not by accident, that I used category "xml/XML Multiview" to report the issue. TODOs are working fine for me in Java, but they don't work for me with XML and XSL files. If I'm just missing sth., please tell me, but it just seems there's no tasklist provider for those files.

I had a look at, finding these lines:
   181     private List<? extends Task> scanComments( FileObject resource ) {
   182         String ext = resource.getExt().toLowerCase();
   183         String mime = FileUtil.getMIMEType( resource );
   185         String lineComment = Settings.getDefault().getLineComment( ext, mime );
   186         String blockCommentStart = Settings.getDefault().getBlockCommentStart( ext, mime );
   187         String blockCommentEnd = Settings.getDefault().getBlockCommentEnd( ext, mime );

How can I find out, what is returned for XML files (which would be a necessary clue to find out what the code does, so I could probably understand what isn't working)?
Comment 3 Svata Dedic 2012-05-17 13:20:40 UTC
Good point; I reacted on the 'XML', so I've tested the TODOs on XMLs only - on the 'plain' XML, not on any more specific mimetype. Sorry.

It seems that the list file extensions + mimetypes supported by task scan is hardcode in the org.netbeans.modules.tasklist.todo.settings.Settings class.

Maybe support for MIME inheritance (e.g. text/xsl+xml => text/xml) could be supported as well.

Moving to tasklist/action items support.
Comment 4 Jan Peska 2013-02-12 14:54:28 UTC

user can manages supported file extensions and MIME types of TODO scanner via Tools/Option/Miscellaneous/Action Items