Add self-define template into eclipse

Templates are little pieces of code with defined placeholders. Each template has a name, which serves as a shortcut to the template itself. You type the name and press Alt + / and it will be expanded.
like sysout:
System.out.println(${word_selection}${});${cursor}
To define your own template go to windows>Preferences>Java>Editor>Templates.



Change the content assistant key to ALT+/:
1. Go to Preferences>>General>>Keys or by typing keys in the filter box.
2. find Content Assist, change the binding to Alt+/.
3. Get rid of the association of these two keys with "word completion".

No comments:

Post a Comment

Datatable static image not found on the server

When you use ```datatables.min.css``` and ```datatables.min.js``` locally, instead of datatables CDN, you may have encountered that ```sort...