To build this todo shortcut functionality(todo live template) from scratch follow the below steps:
- Go to Settings > Editor > Live Templates
- Click on '+' icon to add new Live Template
- Add Abbreviation:
todo
Description: adds //TODO
Template text: // TODO $date$
- Click on Edit Variables...
- Add Name:
date
Expression: date()
Click OK
- Cline Define to set Application context
I just want to use it in Java, so I selected Java
- Click Apply
- Click OK



This will set up the shortcut.