Bug 6976 - Auto collect tasks from code
Summary: Auto collect tasks from code
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.0   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: 2.1 M1   Edit
Assignee: Philipe Mulet CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-12-15 15:58 EST by Genady Beryozkin CLA
Modified: 2002-09-19 11:38 EDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Genady Beryozkin CLA 2001-12-15 15:58:14 EST
I would like to see either "@todo" javadoc elements or
// TODO:
line comments appear as tasks in the taskbar.

Or even better, let the user specify the string (e.g, "XXXX") which will be 
considered as a task in the code, like below:

//XXXX: This is my xxxx task

or in javadoc (less preferable, this will cause javadoc to produce warnings)

@xxxx this is my xxxx javadoc task
Comment 1 Philipe Mulet CLA 2001-12-17 03:52:30 EST
Not for 2.0.
Comment 2 Genady Beryozkin CLA 2001-12-20 15:05:21 EST
please leave it open, so it won't be forgotten.
Thanks
Comment 3 Philipe Mulet CLA 2002-01-14 09:10:21 EST
It is not closed, simply tagged as -> LATER for further consideration.
Comment 4 Randy Hudson CLA 2002-06-12 10:11:32 EDT
It would be nice if I could call attention to a specific developer, like:
@Eric clean this up now.

Does Eclipse know who the user is?  A strange side-effect would be that 
changing the user for this feature would cause a re-compile?  Or, you could 
just remember all @Developers tasks, and filter based on the current developer 
selected.
Comment 5 Philipe Mulet CLA 2002-09-03 09:51:21 EDT
Resurrecting. I am leaning towards a simple solution:

@todo tag, and no user support.
Comment 6 Randy Hudson CLA 2002-09-03 11:39:14 EDT
When this feature is implemented, please route to code assist to take advantage.
For example, any time code assist inserts a method stub, it should add a @todo 
item telling me to implement that method.

when "Override method(s)" is finally fixed so that it inserts the stubs in 
their correct alphabetical order, you can imagine that it would be hard to jump 
around and remember all of the additions you just caused.  Placing @todos will 
make this navigation possible.  It would also be nice if deleting the Task from 
the task list removed the @todo tag.
Comment 7 Philipe Mulet CLA 2002-09-03 12:26:11 EDT
Sounds like nice suggestions, will route them to jdt/ui.

Now, for the todo I will make it user configurable through some option, so that 
a random tag can be used (and checked in any comment).
Comment 8 Philipe Mulet CLA 2002-09-04 04:45:21 EDT
Fixed. 
Comment 9 Philipe Mulet CLA 2002-09-04 04:59:36 EDT
See bug 23145 for UI implications.

Here is the description of the added support:
Compiler can now optionally collect TODO tasks from the source code. 
Occurrences of a TODO tag are looked for inside any type of comments, and 
reported along with problems. 
New problem ID got created: org.eclipse.jdt.core.compiler.IProblem#ToDo. 
JavaCore option added to control the severity of TODO reports 
(ignore/warning/error). 
* COMPILER / Reporting occurrences of TODO tags in comments
*    When enabled, the compiler will issue an error or a warning whenever it 
encounters
*    a TODO tag inside any comment. The tag value itself is defined by the 
option
*    "org.eclipse.jdt.core.compiler.problem.todoTag".
*     - option id:		
	"org.eclipse.jdt.core.compiler.problem.todo"
*     - possible values:	{ "error", "warning", "ignore" }
*     - default:			"warning"

JavaCore option added for specifying the TODO tag value (default is "TODO:"). 
* COMPILER / Define the TODO task tag
*    Define the tag used to recognize TODO tasks in comments.
*     - option id:		
	"org.eclipse.jdt.core.compiler.problem.todoTag"
*     - possible values:	"" where  is a non-empty string, without any 
wild-card.
*     - default:			"TODO:"

Comment 10 Philipe Mulet CLA 2002-09-04 05:04:00 EDT
By customizing the todo tag, one could achieve user selective TODO tasks 
detection. 

TODO:(BOB) add spec

could be found exclusively using tag "TODO:(BOB)".
Comment 11 Philipe Mulet CLA 2002-09-04 05:22:22 EDT
Default for TODO severity should read IGNORE (not warning).
Comment 12 David Audel CLA 2002-09-19 11:38:21 EDT
Verified.