{"id":351,"date":"2007-10-21T00:00:00","date_gmt":"2007-10-21T00:00:00","guid":{"rendered":"http:\/\/www.strongd.net\/?p=351"},"modified":"2007-10-21T00:00:00","modified_gmt":"2007-10-21T00:00:00","slug":"Generating Code Automatically Using Custom code Template In Eclipse","status":"publish","type":"post","link":"https:\/\/www.strongd.net\/?p=351","title":{"rendered":"Generating Code Automatically Using Custom code Template In Eclipse"},"content":{"rendered":"<p><P>One of the good features of Eclipse is its auto fill property. This can be further enhanced using its code template feature. Creation of code templates is necessary to improve development productivity. Templates add consistency and uniformity to your code. Eclipse has so many ready-to-use templates. And you can create your own code templates according to your requirements. To use these templates just type the starting characters of the template and then press \u201cCTRL+SPACE\u201d. For example in Ecipse&nbsp;IDE type \u201ctr\u201d and then press \u201cCTRL+SPACE\u201d, It will add \u201ctry-catch\u201d block to the code.<\/P><br \/>\n<P><A id=more-27><\/A><BR>This article will guide you to create your own code template. Let us take an example to generate a \u201cif-else\u201d template with one \u201celse if\u201d condition.<\/P><br \/>\n<OL><br \/>\n<LI>Go to the Templates ( Window \u2013&gt; Preference \u2013&gt; java\u2013&gt; Editor \u2013&gt; Templates) .<\/LI><br \/>\n<LI>Click \u201cNew\u201d. A window similiar to below appears.<\/LI><br \/>\n<P><A title=1.JPG href=\"http:\/\/www.eclipse-blog.org\/wp-content\/uploads\/2007\/03\/1.JPG\"><IMG alt=1.JPG src=\"http:\/\/www.eclipse-blog.org\/wp-content\/uploads\/2007\/03\/1.JPG\"><\/A><\/P><br \/>\n<LI>Fill the details as shown above.<\/LI><br \/>\n<LI>Click \u201cOK\u201d.<\/LI><br \/>\n<LI>Now you can use your custom template in the program like any other template by pressing \u201cCTRL+SPACE\u201d as shown in the below given screenshots.<\/LI><\/OL><br \/>\n<P><A title=2.JPG href=\"http:\/\/www.eclipse-blog.org\/wp-content\/uploads\/2007\/03\/2.JPG\"><IMG alt=2.JPG src=\"http:\/\/www.eclipse-blog.org\/wp-content\/uploads\/2007\/03\/2.JPG\"><\/A><\/P><br \/>\n<P><A title=3.JPG href=\"http:\/\/www.eclipse-blog.org\/wp-content\/uploads\/2007\/03\/3.JPG\"><IMG alt=3.JPG src=\"http:\/\/www.eclipse-blog.org\/wp-content\/uploads\/2007\/03\/3.JPG\"><\/A><\/P><br \/>\n<DIV><\/DIV><\/p>\n","protected":false},"excerpt":{"rendered":"<p>One of the good features of Eclipse is its auto fill property. This can be further enhanced using its code template feature. Creation of code templates is necessary to improve development productivity. Templates add consistency and uniformity to your code. Eclipse has so many ready-to-use templates. And you can create your own code templates according &hellip; <a href=\"https:\/\/www.strongd.net\/?p=351\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Generating Code Automatically Using Custom code Template In Eclipse<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-351","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/www.strongd.net\/index.php?rest_route=\/wp\/v2\/posts\/351","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.strongd.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.strongd.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.strongd.net\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.strongd.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=351"}],"version-history":[{"count":0,"href":"https:\/\/www.strongd.net\/index.php?rest_route=\/wp\/v2\/posts\/351\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.strongd.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=351"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.strongd.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=351"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.strongd.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=351"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}