Eclipse Templates
31 December 2007Eclipse Templates are used to make programming easier and simpler. Eclipse IDE provides many templates by default which can be used to save time. Also one can add more templates as required. In this post, I will briefly write about creating and using templates in Eclipse.
Open the preferences window in Eclipse. Under Java > Editor you will find Templates. Click it and you will see the available templates in the right had side window.
Using templates while coding is simple. Write the name of the template and then press Ctrl+Space and then finally Enter. You will get the required code.
For example, you use the template for loop, type for and then press Ctrl+Space, you will get a list of available templates with name “for”.
Making own template is also very simple. For instance you want to create a template to declare an ArrayLype bounded by String:
ArrayList<String> arrayList = new ArrayList<String>();
Simple go to preferences window and add a new template under Java > Editor > Templates.
Play around and explore more.
Related Posts:
Top Of Page | Trackback
If you found this page useful, consider linking to it. Simply copy and paste the code below into your web site.
It will look like this: Eclipse Templates