<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Kristian Lunde &#187; Eclipse</title>
	<atom:link href="http://www.klunde.net/category/applications/eclipse/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.klunde.net</link>
	<description>www.klunde.net</description>
	<lastBuildDate>Sun, 18 Jul 2010 21:00:28 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=abc</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Templating with Eclipse</title>
		<link>http://www.klunde.net/2008/08/20/templating-with-eclipse/</link>
		<comments>http://www.klunde.net/2008/08/20/templating-with-eclipse/#comments</comments>
		<pubDate>Wed, 20 Aug 2008 20:18:39 +0000</pubDate>
		<dc:creator>Kristian Lunde</dc:creator>
				<category><![CDATA[Applications]]></category>
		<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[PHPEclipse]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://www.klunde.net/?p=54</guid>
		<description><![CDATA[
			
				
			
		
Today I came over a a post on dzone.com about Eclipse and templating. It turns out that you can write small templates of code snippets you use a lot and bind them to a keyword. When typing the keyword, press &#8220;ctrl&#8221; and &#8220;space&#8221; and a list of possible templates available will appear, select the prefered [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.klunde.net%2F2008%2F08%2F20%2Ftemplating-with-eclipse%2F" onclick="urchinTracker('/outgoing/api.tweetmeme.com/share?url=http_3A_2F_2Fwww.klunde.net_2F2008_2F08_2F20_2Ftemplating-with-eclipse_2F&amp;referer=');"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.klunde.net%2F2008%2F08%2F20%2Ftemplating-with-eclipse%2F&amp;source=kristianlunde&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
<p>Today I came over a a post on <a href="http://www.dzone.com" onclick="urchinTracker('/outgoing/www.dzone.com?referer=');">dzone.com</a> about Eclipse and templating. It turns out that you can write small templates of code snippets you use a lot and bind them to a keyword. When typing the keyword, press &#8220;ctrl&#8221; and &#8220;space&#8221; and a list of possible templates available will appear, select the prefered template, press &#8220;enter&#8221; and the code snippet is inserted into your working code. I works just the same way code completion. This actually means that you do not have to write the boring &#8220;for&#8221; loops or &#8220;if&#8221; tests anymore, just write a template and become a more efficient developer. </p>
<p>The <a href="http://firstclassthoughts.co.uk/java/eclipse_tip_templates_public_static_final.html" onclick="urchinTracker('/outgoing/firstclassthoughts.co.uk/java/eclipse_tip_templates_public_static_final.html?referer=');">original post</a> explains how to set up templates, so I will not go into that in this post, but since I am primarily a PHP developer and the post describes templating for Java, I&#8217;ll just give a description of where to go if you use the PHPEclipse.<br />
To edit and create templates for PHP, HTML or css, even javascript you have to use this path:</p>
<p><em>window -> preferences -> PHPeclipse Web Development -> PHP -> Templates.</em></p>
<p>To write and edit the templates, just follow the guidelines from <a href="http://firstclassthoughts.co.uk/java/eclipse_tip_templates_public_static_final.html" onclick="urchinTracker('/outgoing/firstclassthoughts.co.uk/java/eclipse_tip_templates_public_static_final.html?referer=');">Mr. Graversen</a>, or have a look at the links below.</p>
<p>For further reading have a look these sites.</p>
<ul>
<li><a href="http://firstclassthoughts.co.uk/java/eclipse_tip_templates_public_static_final.html" onclick="urchinTracker('/outgoing/firstclassthoughts.co.uk/java/eclipse_tip_templates_public_static_final.html?referer=');">http://firstclassthoughts.co.uk/java/eclipse_tip_templates_public_static_final.html</a>
<li>http://www.phpeclipse.de/tiki-index.php?page=Howto+use+the+templates+system</li>
<li><a href="http://help.eclipse.org/help21/index.jsp?topic=/org.eclipse.jdt.doc.user/concepts/ctemplates.htm" onclick="urchinTracker('/outgoing/help.eclipse.org/help21/index.jsp?topic=/org.eclipse.jdt.doc.user/concepts/ctemplates.htm&amp;referer=');">http://help.eclipse.org/help21/index.jsp?topic=/org.eclipse.jdt.doc.user/concepts/ctemplates.htm</a></li>
</ul>
<p>I guess if I had read the PHPEclipse manual when I first started using Eclipse, I would probably been using it from the start <img src='http://www.klunde.net/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>
<p>Good luck with your  Eclipse templates, I know I will be using them extensively.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.klunde.net/2008/08/20/templating-with-eclipse/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
