Find TODO tags in Eclipse
Eclipse has a built-in Tasks panel to effortlessly display and navigate your TODO comments. Simply go to Window > Show View > Tasks.
Imagine you have something to optimize later:
Your Tasks panel will then exhibit something like this:
Description Resource Path Location Type
Hey, let me be faster! MyJavaFile.java /MyProject line 4 TODO
To tweak your tags, use Preferences > Java > Compiler > Tasks.
Eclipse productivity hacks
Eclipse offers numerous ways to personalize, speed up and streamline your task navigation experience.
Customise your TODO explorations
You can define your own task tags like FIXME, TBD, or anything relevant to your workflow:
- Headover to Preferences > Java > Compiler > Task Tags.
- Adjust the tag names and priorities as per your requirements.
Fast-track your access to Tasks
Eclipse provides keyboard shortcuts to Tasks:
- Use
Ctrl + 3
, typeTasks
and hit Enter. - Alternatively, find specific TODOs with
Ctrl + F
.
Find your tasks within the chaos
Using custom filters on the Tasks panel can help you find the required tasks swiftly:
- Navigate to the Filters button in the Tasks view.
- Select a plethora of criteria like task type, priority, or even specific text patterns.
Java search, your rescue for large codebases
In cases where your codebase is large, opt for Java Search, a powerful tool to locate your tasks:
- Use
Ctrl + H
to open search dialogue. - Choose the Task tag under scope options.
Blue-prints to help you navigate
Look out for blue rectangles along the verticle rule (next to scroll bar), as they indicate the presence of your embedded treasure, the TODOs, like a mini-map for your game of code!
Perfecting your task navigation gameplay
Eclipse offers several features to turbo-charge your journey in the kingdom of your code, helping you to locate and complete your tasks more effectively:
Mylyn, your task-master
For collaborative projects, the Mylyn plugin helps you manage tasks and TODOs effectively:
- Mylyn extends a task-focused interface within Eclipse.
- It integrates perfectly with various issue trackers to keep TODOs and other tasks in sync.
Personalise task visibility
To make your tasks more conspicuous:
- Tweak text styles and colours in Preferences for better visualisation.
- Use a unique colour or font for your TODOs for easy identification.
Don't let TODOs escape to production
To prevent unfinished tasks from creeping into your final code:
- Configure pre-commit hooks to scan for TODOs.
- Leverage SCM plugins to alert for TODOs during commits.
Was this article helpful?