Translate

Monday, October 15, 2018

Eclipse Templates for Faster Java Development


Source: https://dzone.com/articles/eclipse-templates-for-faster-java-development

Eclipse Templates for Faster Java Development


Want to save time developing your Java applications? Check out this post on some of the helpful Eclipse template shortcuts to learn more!


 
In the fast-paced world of IT, with the pressing need to deliver in tight schedules, shortcuts are a nice way to expedite tasks. Let us check out some Eclipse templates that can act as a shortcut and help with faster development in Java.
All the below screenshots are self-explanatory. What you need to do is to press Ctrl + space keys after typing the word.
For example, if you want to have the main method in your class, then type main and then press Ctrl + space, select main and the template of the main method will be ready for you.
In the last two screenshots, we will see settings for getting these templates to work in Eclipse. Basically, you need to go to Windows ->Preferences->Java->Editor->Templates. There, we will find templates for all these shortcuts, and for a shortcut to work, the checkbox against that particular template needs to be checked. We can add a custom template as well.
Here are some example screenshots:

Thanks for reading! Share this post with someone you think might need this to save time developing!