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

Summary: Make it possible to add TODOs to Task list
Product: platform Reporter: Peter Nabbefeld <epdv>
Component: Action ItemsAssignee: Jan Peska <JPESKA>
Status: REOPENED ---    
Severity: normal    
Priority: P3    
Version: 7.2   
Hardware: PC   
OS: Windows XP   
Issue Type: ENHANCEMENT Exception Reporter:

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 TodoTaskScanner.java, finding these lines:
   181     private List<? extends Task> scanComments( FileObject resource ) {
   182         String ext = resource.getExt().toLowerCase();
   183         String mime = FileUtil.getMIMEType( resource );
   184 
   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
fix: http://hg.netbeans.org/core-main/rev/6bce001495c4

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