问题
The Title says it all. I am using ADT and I have a source code full of //TODO
tags.
I can go through the tags using the Tasks View but when I want to mark a task as completed the Mark Completed
option is grayed out.
what is the cause of this and how can I fix it ? deleting the //TODO
tags for completed tasks is not an option, I want to be able to review my changes later.
回答1:
Create another task flag in Preferences->Java->Compiler->Task Tags, say // DONE
.
Then when you fix a TODO, change it in to a DONE which will still remain in the Tasks view but be distingishable
回答2:
You can only mark tasks completed that you add through the add Task
menu option in the Tasks view, you can't do this for tasks created because of // TODO
.
This is described in Elipse bug 309567
回答3:
Tasks created through using // TODO
can not be set to Complete. They have to be created using the Add Task...-dialog and there are two ways to do this:
If you want your task to be pointing to a piece of code then right-click on the marker bar or the line number of the row and select Add Task.... This will allow you to add a task which can be set to Complete and it will also take you to your code if you double-click on it in Tasks-view. Here's a guide with images: http://www.tutorialspoint.com/eclipse/eclipse_task_management.htm
If you want to add a more general task with no path-, location- and resource-information/connection then instead go to the Tasks-view, right-click and select "Add Task...". This task will show up in Tasks and you can mark it as complete, but it will not take you anywhere in your code when double-clicked.
回答4:
I know this question is years old, but for others that read this, this is how I handle task tags.
All my tags begin with ! such as !Bug, !Improve so that the task manager will not find all the uses of these words that are not part of a task. Task comments always begin with a task tag. All of this makes it easy to sort the list of tags found to group them b type.
There is a low priority !Resolved tag so when a task is resolved all that is needed it to add Resolved after the existing ! which leaves in in the task list for future reference.
// !Question find why fudge factors are necessary becomes // !Resolved Question find why fudge factors are necessary
Because this can be used along with "Add Task" it adds another level of reporting, especially if the same tags are used in the add task dialog. The issues I have with add task is they don't seem to be editable, and they are not easily seen when reading though the source without clicking on the task icon, and I do not know if they get included in the source control. I do like that they can be marked completed and the task view can omit them.
来源:https://stackoverflow.com/questions/22288691/eclipse-task-list-mark-completed-is-not-active