How do I limit task tags to current project in Eclipse?

Eclipse

Eclipse Problem Overview


Eclipse currently shows the task tags (// TODO) from all open projects. I would be grateful if anyone could point out the preference, where I could restrict the scope of tasks displayed (e.g. only tasks from current project).

Eclipse Solutions


Solution 1 - Eclipse

In Eclipse Helios (3.6) you can configure the scope.

Down arrow at the top right -> Configure Contents:

Configure Contents img

Select a configuration on the left (or create a new one) and on the right in the Scope section select "On any element in same project".

Solution 2 - Eclipse

There should be a down arrow in the top-right with several options in it. For the old Eclipse the option you want is Filters... And for the newer Eclipse the option is now Configure Contents. At the top of the Configure Contents dialog is a scope selection with options you want, I think.. If not check preferences and search for tasks, or scope. It should be in there somewhere.

Solution 3 - Eclipse

Close projects that you aren't working on. Tasks show for any part of the workspace, so remove projects that you arent working on by doing a close operation. (right click on the project in the project explorer and then "close project")

Solution 4 - Eclipse

Configure Contents... can be used to filter to things like working sets (if you're not already using working sets, you should), but yet another way is to use Mylyn to filter out any UI elements not relevant for what you're currently working on.

Solution 5 - Eclipse

In Eclipse 2019-06:

1- Open the Tasks window.
2- Click on the arrow pointing down .
3- Click on Filters...
enter image description here


4- In the Configurations panel on the left select TODOs (or any configuration that you have saved).
5- Under Scope select On elements in selected projects
enter image description here

6- Click on Apply and Close

Now the task view will only show the tasks of the project where you are at the moment.

Solution 6 - Eclipse

Simply close the projects you are not working on.
You can leave them in the workspace, too.

Solution 7 - Eclipse

In Eclipse Juno 4.2.1, I found that it's possible to disable specific projects TODO tasks.

In the projects properties open: Java Compiler > Task Tags

From that page check the option "Enable project specific settings" and remove the TODO entry from the list below, after that the TODO comments from that project won't be shown in Tasks. You could also remove other tags from the list.

Solution 8 - Eclipse

Filtering by working sets works fine, but I had to put the packages into a working set, rather than the whole project.

Solution 9 - Eclipse

AFAIK the Eclipse task list is workspace-based and cannot really be filtered by default.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionAnonymousView Question on Stackoverflow
Solution 1 - EclipseTilmanView Answer on Stackoverflow
Solution 2 - EclipseRayOKView Answer on Stackoverflow
Solution 3 - EclipseKarlView Answer on Stackoverflow
Solution 4 - EclipseJesperEView Answer on Stackoverflow
Solution 5 - EclipseRodrigo VaamondeView Answer on Stackoverflow
Solution 6 - EclipsesjasView Answer on Stackoverflow
Solution 7 - EclipsehakovalaView Answer on Stackoverflow
Solution 8 - EclipseDontthinktwiceView Answer on Stackoverflow
Solution 9 - EclipseUriView Answer on Stackoverflow