I recently had some more frustration with Eclipse, with no solution on the web, so I’m posting mine.
The problem:
I had an auto-generated task (TODO) from creating a class that implemented an interface. At some point, I noticed the task comment was gone, but the task indicator (checkbox icon) was still there. Probably because I have it set to reformat on save, but maybe I deleted the task comment without hitting the task button (or both). Anyway, I could not clear it no matter what:
- Double clicking the icon didn’t work since it couldn’t find the comment.
- Clicking the “Clean and Redetect Tasks” button did nothing.
- Restarting Eclipse (which I do more often than a Windows admin reboots), did naught.
- The Task View displayed the offending tasks, but the Delete option was greyed out. Selecting the task and hitting delete 3 million times while cursing furiously at the screen brought no justice.
The solution:
- Go to Window >> Preferences, then Java/Compiler/Task Tags. Select the TODO task tag, or whatever accursed tag haunts you.
- Click Remove. When it threatens a rebuild, call it’s bluff (that is, agree). When it’s done (and it took its sweet time), the offending tasks will be gone. Rejoice!
- Click New… and restore the TODO tag. All legitimate TODO tasks will be restored. Callooh! Callay!
keywords: can’t delete tasks, task tags, eclipse 3.4, mylyn
I wasn’t able to delete the undeleteable tasks exactly like this. In case someone has trouble with this, what worked for me was to remove the particular tag from the task tags like you describe (which didn’t delete them unfortunately), then go through double clicking each of the tags in the tasks view that I want to delete, manually delete that line and save (so it disappears) then undo and save again. That way they don’t come back. Then you can recreate the task tag and all the ones you wanted to retain will reappear.
I went crazy with this as well.
Don’t know if it is still a problem in 3.6 (still downloading)
But in 3.5 the following helped. (especially for the todo tags in xml files):
– stop eclipse
– Delete all .markers files found in any .plugins/org.eclipse.core.resources/.projects// directory.
– start eclipse
done \o/
clean all projects to rebuild the list
Unfortunately neither your method nor moox’s were able to help me remove my undeletable tasks.
What I had done was create a new task tag, “NOTE”, without realizing that one file was full of comments containing “note”. I decided to remove the task tag, but the new “note” tasks remained and nothing I did could remove them, not even deleting the offending lines from the file. The thing that finally did the trick was to empty the file completely and save it. I could then paste the file’s contents back in.
Hope that helps somebody.
Thx Ryan, that helped for me. I think thats the easyest way.
BertlPub’s method worked for me…
– close eclipse
– cd …/workspace (wherever the eclipse workspace is for you)
– rm .metadata/.plugins/org.eclipse.core.resources/.projects//.markers
– open eclipse
– clean project
thanks!
Is a bug:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=309567
Thanks for this post. Based on the comments, I did a clean/build and to see what that did and it got rid of the markers. I use m2eclipse, so rarely use the Eclipse clean/build anymore and didn’t think to try that. This was using Eclipse Helios SR2.
If you are dealing with a small amount of files, just doing a cut + paste clears the task list.
BertIPubs recommendation worked for me: Remove the line (Ctrl-X), save, insert the line (Ctrl-V), save again. The difference is, i do not have original eclipse but qnx momentics ide, which is based on eclipse. Seems to have the same bug. If anyone wants to know how to handle this in momentics ide 🙂
I recently ran into this issue for the first time. I removed my TODO: comment and it still insisted that it was commented and the “remove task” option was gray. After playing around with it, I accidentally found a really easy fix –
1. ) I made another task (literally // TODO: figure out how to fix comment) near where the original comment was.
2.) I deleted a line or two so it was even with where Eclipse thought my first TODO was so that Eclipse merged the two.
3.) I deleted my new comment text in my code.
4.) Clicking on the original Task gave me the option to “deleted added line”.
5.) After that I saved and the comment was gone.