Is there any keyboard shortcut for placing task tags in eclipse like the TODO / FIXME / XXX ( user-defined)
Have searched on Google and was not able to find a shortcut.
In Eclipse, if the cursor is over a word and you press Ctrl + K you will jump to the next occurrence of that word in the file.
Search – Eclipse Shortcuts CTRL SHIFT G – Search for current cursor positioned word reference in workspace. CTRL H – Java search in workspace.
Open project, file, etc. Ctrl+Shift+R. Open Resource (file, folder or project) Alt+Enter. Show and access file properties.
Ctrl + Shift + F formats the selected line(s) or the whole source code if you haven't selected any line(s) as per the formatter specified in your Eclipse, while Ctrl + I gives proper indent to the selected line(s) or the current line if you haven't selected any line(s).
I did not find any TODO shortcut but a possible solution is to create a template so when you write some string and hit Ctrl + spacebar and Enter your TODO code will be entered.
Window -> Preferences -> Java -> Editor -> Templates -> New
When you type todo and press Ctrl + spacebar and Enter // TODO
will be inserted
Such a trivial todo is useless but you can tweak it by using variables as shown in the picture. Use "Insert Variable" button to insert variables.
When you use the pattern shown in the picture following will be inserted:
// TODO inserted by UserName [21. 1. 2015, 13:07:07]
More about Java Editor Template Variables can be found here
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With