8

I found out how to change the color of the todo tag in eclipse (window->preferences->general->editors->text editors->annotations->tasks) but this changes it so that when I write //TODO the entire line is affected. Is it possible so make it so that ONLY the word TODO is afected?

David says Reinstate Monica
  • 19,209
  • 22
  • 79
  • 122

1 Answers1

19

Is it possible so make it so that ONLY the word TODO is afected?

Yes, you can change the color of "task tag" comments under Preferences → Java → Editor → Syntax Coloring ⇉ Comments → Task Tags, as shown in the screenshot below. Note that "TASK" in the preview window is hot pink. "TODO" is a task tag, so it also appears hot pink for me.

Imgur

user1201210
  • 3,801
  • 22
  • 25
  • I was hoping to have the task tag have a highlighted background like I have it on VIM :/ Do you know if you can do that? – David says Reinstate Monica Dec 02 '12 at 18:54
  • 1
    @DGrin91 I don't think it can be done with the built-in preferences ("you could always write a plugin to do it..."). The "task tag" is colored like normal syntax, and normal syntax doesn't have a highlight feature. The "task" that contains the tag is treated like an annotation, which *can* be highlighted. The distinction seems artificial considering it's all comment text, but that seems to be how it's split up. – user1201210 Dec 02 '12 at 19:23
  • Thats what I thought. This is still good though, thanks a lot. – David says Reinstate Monica Dec 02 '12 at 19:38