How do I enable TODO/FIXME/XXX task tags in Eclips

2019-01-09 23:53发布

In all my years of using Eclipse, I never knew until now that TODO / FIXME / XXX comment tags are supposed to appear in the task list. Apparently this is something that is disabled by default because I have been using those tags for as long as I've been using Eclipse and I have never seen one of them appear in the task list. Can anyone indicate how to enable this feature? I see no preferences option anywhere that says anything to the effect of 'Let my source code tags appear in the task list'. It would be a nice feature if it existed, but I'm beginning to be doubtful.

I have asked around, and as others have suggested to me, these are some things which obviously have no effect but that I have tried anyway:

  • Upgrading to the latest version of Eclipse.
  • Restarting Eclipse.
  • Closing and re-opening the task list.
  • Refreshing the project.

I am using:
Eclipse Java EE IDE for Web Developers.
Version: Helios Service Release 1
Build id: 20100917-0705

5条回答
\"骚年 ilove
2楼-- · 2019-01-10 00:35

For me, such tags are enabled by default. You can configure which task tags should be used in the workspace options: Java > Compiler > Task tags

alt text

Check if they are enabled in this location, and that should be enough to have them appear in the Task list (or the Markers view).

Extra note: reinstalling Eclipse won't change anything most of the time if you work on the same workspace. Most settings used by Eclipse are stored in the .metadata folder, in your workspace folder.

查看更多
来,给爷笑一个
3楼-- · 2019-01-10 00:51

In the distribution I use, the tasks are listed in the task list by default (at least for Java). For other content types, you may check the following settings.

Display the Tasks View: Window > Show View > Other > General > Tasks

For non-Java Task Tags: check the following settings: Window > Preferences > General > Editors > Structured Text Editors > Task Tags You can enable searching for task tags in the [Task Tags] tab and select the content types in the [Filters] tab.

For Java task tags, you should look in: Window > Preferences > Java > Compiler > Task Tags

J.

查看更多
冷血范
4楼-- · 2019-01-10 00:55

All those settings are necessary to choose which tags you are interested in, but in order to display these tags in a list, you also need to select the right Eclipse perspective. I finally discovered that the "Markers" tab containing the "Task" list is only available under the "Java EE" perspective... Hope this helps! :-)

查看更多
Summer. ? 凉城
5楼-- · 2019-01-10 00:57

I'm using Eclipse Classic 3.7.1.

The solution is: Window > Preferences > General > Editors > Sctructured Text Editors > Task Tags and checking "Enable searching for Task Tags" checkbox.

查看更多
我欲成王,谁敢阻挡
6楼-- · 2019-01-10 00:59

There are apparently distributions or custom builds in which the ability to set Task Tags for non-Java files is not present. This post mentions that ColdFusion Builder (built on Eclipse) does not let you set non-Java Task Tags, but the beta version of CF Builder 2 does. (I know the OP wasn't using CF Builder, but I am, and I was wondering about this question myself ... because he didn't see the ability to set non-Java tags, I thought others might be in the same position.)

查看更多
登录 后发表回答