<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>else then if</title>
	<atom:link href="http://elsethenif.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://elsethenif.wordpress.com</link>
	<description>Just another WordPress.com weblog</description>
	<lastBuildDate>Thu, 29 Dec 2011 21:36:24 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='elsethenif.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>else then if</title>
		<link>http://elsethenif.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://elsethenif.wordpress.com/osd.xml" title="else then if" />
	<atom:link rel='hub' href='http://elsethenif.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Getting Quicksilver show notification to work</title>
		<link>http://elsethenif.wordpress.com/2009/06/17/getting-quicksilver-show-notification-to-work/</link>
		<comments>http://elsethenif.wordpress.com/2009/06/17/getting-quicksilver-show-notification-to-work/#comments</comments>
		<pubDate>Wed, 17 Jun 2009 01:50:11 +0000</pubDate>
		<dc:creator>Samuel Rizzo</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[applescript]]></category>
		<category><![CDATA[mac os x]]></category>
		<category><![CDATA[quicksilver]]></category>

		<guid isPermaLink="false">http://elsethenif.wordpress.com/?p=103</guid>
		<description><![CDATA[Anybody trying to use &#8220;show notification&#8221; Applescript with Quicksilver b54 (3815) may get this error: &#8220;Quicksilver got an error: Some parameter is missing for show notification&#8221; Looks like it is a bug on this version, as more people reported here. &#8230; <a href="http://elsethenif.wordpress.com/2009/06/17/getting-quicksilver-show-notification-to-work/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=elsethenif.wordpress.com&amp;blog=8118253&amp;post=103&amp;subd=elsethenif&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Anybody trying to use &#8220;show notification&#8221; Applescript with Quicksilver b54 (3815) may get this error: &#8220;Quicksilver got an error: Some parameter is missing for show notification&#8221;</p>
<p>Looks like it is a bug on this version, as more people reported <a href="http://groups.google.com/group/blacktree-quicksilver/browse_thread/thread/10ee7b36cb5f4a80">here</a>.</p>
<p>You may try providing all parameters. Here are some examples:</p>
<p><span id="more-103"></span></p>
<pre style="overflow:auto;"><code>
tell application "Quicksilver"
	show notification "QS Notification" text "QS text" image name "Quicksilver.icns" image data read (path to resource "Quicksilver.icns") as picture
	show notification "Yes Notification" text "Yes text" image name "BooleanYES.png" image data read (path to resource "BooleanYES.png") as picture
	show notification "No Notification" text "No text" image name "BooleanNO.png" image data read (path to resource "BooleanNO.png") as picture
	show notification "Toggle Notification" text "Toggle text" image name "BooleanTOGGLE.png" image data read (path to resource "BooleanTOGGLE.png") as picture
	show notification "App icon" text "App icon text" image name "com.apple.safari" image data read (path to resource "Quicksilver.icns") as picture
end tell
</code></pre>
<p>Now it should work. Note that the displayed image will be defined by the image name, not the image data, which seems to be just ignored.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/elsethenif.wordpress.com/103/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/elsethenif.wordpress.com/103/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/elsethenif.wordpress.com/103/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/elsethenif.wordpress.com/103/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/elsethenif.wordpress.com/103/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/elsethenif.wordpress.com/103/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/elsethenif.wordpress.com/103/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/elsethenif.wordpress.com/103/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/elsethenif.wordpress.com/103/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/elsethenif.wordpress.com/103/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/elsethenif.wordpress.com/103/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/elsethenif.wordpress.com/103/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/elsethenif.wordpress.com/103/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/elsethenif.wordpress.com/103/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=elsethenif.wordpress.com&amp;blog=8118253&amp;post=103&amp;subd=elsethenif&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://elsethenif.wordpress.com/2009/06/17/getting-quicksilver-show-notification-to-work/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/326724a759a7f63379e64ddb7f3288b5?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Samuel Rizzo</media:title>
		</media:content>
	</item>
		<item>
		<title>Quickly cruding with code2code plugin and VRaptor2</title>
		<link>http://elsethenif.wordpress.com/2009/06/12/quickly-cruding-with-code2code-plugin-and-vraptor2/</link>
		<comments>http://elsethenif.wordpress.com/2009/06/12/quickly-cruding-with-code2code-plugin-and-vraptor2/#comments</comments>
		<pubDate>Fri, 12 Jun 2009 23:34:20 +0000</pubDate>
		<dc:creator>Samuel Rizzo</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[code generation]]></category>
		<category><![CDATA[code2code]]></category>
		<category><![CDATA[eclipse plugin]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[vraptor2]]></category>

		<guid isPermaLink="false">http://elsethenif.wordpress.com/?p=22</guid>
		<description><![CDATA[In this post I will show how to use the code2code plugin (beta) to quickly generate a crud with the VRaptor2 and Hibernate 3 frameworks. code2code lets you create your own generators using template engines. In this example we&#8217;ll use &#8230; <a href="http://elsethenif.wordpress.com/2009/06/12/quickly-cruding-with-code2code-plugin-and-vraptor2/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=elsethenif.wordpress.com&amp;blog=8118253&amp;post=22&amp;subd=elsethenif&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>In this post I will show how to use the <a href="http://github.com/srizzo/code2code">code2code plugin (beta)</a> to quickly generate a crud with the <a href="http://www.vraptor.org/">VRaptor2</a> and <a href="https://www.hibernate.org/">Hibernate 3</a> frameworks.</p>
<p>code2code lets you create your own generators using template engines. In this example we&#8217;ll use the plugin to generate an entire crud for us, using a generator I&#8217;ve made.</p>
<p>Note that the code was made simple, to show the capabilities of the plugin, and not of the frameworks involved.</p>
<p><span id="more-22"></span></p>
<h2>Creating and setting up the Project</h2>
<p>First, let&#8217;s create a new Dynamic Web Project and call it &#8220;products&#8221;.</p>
<p><a href="http://elsethenif.files.wordpress.com/2009/06/naming-the-project.png"><img class="alignnone size-full wp-image-34" title="naming the project" src="http://elsethenif.files.wordpress.com/2009/06/naming-the-project.png?w=500&#038;h=375" alt="naming the project" width="500" height="375" /></a></p>
<p>Now wee need to install VRaptor2, Hibernate 3, HSQLDB, configure each frameworks and&#8230;<br />
But wait! Let&#8217;s use a generator for all that too! But before, we need to install the plugin and the generators.</p>
<h2>Installing the plugin</h2>
<p>Install the plugin from the update site: http://srizzo.github.com/code2code/updatesite/</p>
<p>Once the plugin is installed, we will have two items added to the project context menu: &#8220;Generate&#8230;&#8221; and &#8220;Create generator from selected files&#8230;&#8221;.</p>
<p><a href="http://elsethenif.files.wordpress.com/2009/06/generate-menu-item1.png"><img class="alignnone size-full wp-image-76" title="generate menu item" src="http://elsethenif.files.wordpress.com/2009/06/generate-menu-item1.png?w=500&#038;h=375" alt="generate menu item" width="500" height="375" /></a></p>
<h2>Installing the VRaptor2 example generators</h2>
<p>Create a &#8220;generators&#8221; folder on the project. <a href="http://github.com/srizzo/code2code-example-generators/downloads">Download</a> and unzip the VRaptor2 generators examples there.</p>
<p><a href="http://elsethenif.files.wordpress.com/2009/06/vraptor-generators-inside-generators-folder1.png"><img class="alignnone size-full wp-image-77" title="vraptor generators inside generators folder" src="http://elsethenif.files.wordpress.com/2009/06/vraptor-generators-inside-generators-folder1.png?w=500&#038;h=375" alt="vraptor generators inside generators folder" width="500" height="375" /></a></p>
<h2>Setting up the project</h2>
<p>Let&#8217;s use a generator to install the frameworks and initial configurations we need.</p>
<p>Run the &#8220;Generate&#8230;&#8221; item from the project context menu. A wizard listing the installed generators will open. Select the Initial structure generator and click Next.</p>
<p><a href="http://elsethenif.files.wordpress.com/2009/06/selecting-a-generator.png"><img class="alignnone size-full wp-image-42" title="selecting a generator" src="http://elsethenif.files.wordpress.com/2009/06/selecting-a-generator.png?w=500&#038;h=375" alt="selecting a generator" width="500" height="375" /></a></p>
<p>Configure the base package for the generated classes, the path the HSQLDB database will be created and click Finish.</p>
<p><a href="http://elsethenif.files.wordpress.com/2009/06/configuring-params.png"><img class="alignnone size-full wp-image-25" title="configuring params" src="http://elsethenif.files.wordpress.com/2009/06/configuring-params.png?w=500&#038;h=375" alt="configuring params" width="500" height="375" /></a></p>
<p>The plugin will generate the necessary files and libs for our project, and log the operation to the console. Note that the plugin can generate little snippets to the console, so you can copy them and paste to the appropriate files.</p>
<p>Copy and paste the VRaptor2 servlet mapping to the project web.xml.</p>
<p><a href="http://elsethenif.files.wordpress.com/2009/06/web-xml-snippet-from-log1.png"><img class="alignnone size-full wp-image-52" title="web.xml snippet from log" src="http://elsethenif.files.wordpress.com/2009/06/web-xml-snippet-from-log1.png?w=500&#038;h=375" alt="web.xml snippet from log" width="500" height="375" /></a></p>
<h2>Running the empty project</h2>
<p>That&#8217;s all. Now, we can run the project and see a working initial project, with a beautiful Welcome screen. You may wish to take a look at the generated files. The Initial project generator has generated all the jars and files we need to start working.</p>
<p><a href="http://elsethenif.files.wordpress.com/2009/06/welcome-page.png"><img class="alignnone size-full wp-image-50" title="welcome page" src="http://elsethenif.files.wordpress.com/2009/06/welcome-page.png?w=500&#038;h=375" alt="welcome page" width="500" height="375" /></a></p>
<h2>Generating the Product crud</h2>
<p>Open again the generator wizard and now select the CRUD generator.</p>
<p><a href="http://elsethenif.files.wordpress.com/2009/06/selecting-the-crud-generator.png"><img class="alignnone size-full wp-image-43" title="selecting the crud generator" src="http://elsethenif.files.wordpress.com/2009/06/selecting-the-crud-generator.png?w=500&#038;h=375" alt="selecting the crud generator" width="500" height="375" /></a></p>
<p>Set the parameters for the Product model.</p>
<p><a href="http://elsethenif.files.wordpress.com/2009/06/configuring-the-crud-params.png"><img class="alignnone size-full wp-image-26" title="configuring the crud params" src="http://elsethenif.files.wordpress.com/2009/06/configuring-the-crud-params.png?w=500&#038;h=375" alt="configuring the crud params" width="500" height="375" /></a></p>
<p>Now, instead of just clicking Finish, you may wish to take a look further at the next step, by clicking Next.</p>
<p>As you will see, in this step you&#8217;re able to unmark templates for generation, change the destination for each one (a blank destination means it will be printed on the console), and preview/change the resulting contents. Just click Finish to generate the files.</p>
<p><a href="http://elsethenif.files.wordpress.com/2009/06/customizing-the-crud-generation.png"><img class="alignnone size-full wp-image-29" title="customizing the crud generation" src="http://elsethenif.files.wordpress.com/2009/06/customizing-the-crud-generation.png?w=500&#038;h=375" alt="customizing the crud generation" width="500" height="375" /></a></p>
<p>Look at the console view for generated snippets. Copy the hibernate mapping to the hibernate.cfg.xml file.</p>
<p><a href="http://elsethenif.files.wordpress.com/2009/06/pasting-the-hibernate-mapping1.png"><img class="alignnone size-full wp-image-78" title="pasting the hibernate mapping" src="http://elsethenif.files.wordpress.com/2009/06/pasting-the-hibernate-mapping1.png?w=500&#038;h=375" alt="pasting the hibernate mapping" width="500" height="375" /></a></p>
<p>Don&#8217;t forget to do the same for the DaoFactory entry <a href="http://elsethenif.files.wordpress.com/2009/06/pasting-the-daofactory-entry.png">(image)</a>, the views.properties mappings <a href="http://elsethenif.files.wordpress.com/2009/06/pasting-the-views-mappings.png">(image)</a> and the product link for the index page <a href="http://elsethenif.files.wordpress.com/2009/06/pasting-the-index-link.png">(image)</a></p>
<h2>The result</h2>
<p>Run the project again. You will see a Product index now on the home page. Click it.</p>
<p>That&#8217;s all. You can now create, edit, view and delete products</p>
<p><a href="http://elsethenif.files.wordpress.com/2009/06/products-index.png"><img class="alignnone size-full wp-image-41" title="products index" src="http://elsethenif.files.wordpress.com/2009/06/products-index.png?w=500&#038;h=375" alt="products index" width="500" height="375" /></a></p>
<p><a href="http://elsethenif.files.wordpress.com/2009/06/creating-a-new-product.png"><img class="alignnone size-full wp-image-27" title="creating a new product" src="http://elsethenif.files.wordpress.com/2009/06/creating-a-new-product.png?w=500&#038;h=375" alt="creating a new product" width="500" height="375" /></a></p>
<p><a href="http://elsethenif.files.wordpress.com/2009/06/viewing-the-product.png"><img class="alignnone size-full wp-image-45" title="viewing the product" src="http://elsethenif.files.wordpress.com/2009/06/viewing-the-product.png?w=500&#038;h=375" alt="viewing the product" width="500" height="375" /></a></p>
<p><a href="http://elsethenif.files.wordpress.com/2009/06/editing-the-product.png"><img class="alignnone size-full wp-image-31" title="editing the product" src="http://elsethenif.files.wordpress.com/2009/06/editing-the-product.png?w=500&#038;h=375" alt="editing the product" width="500" height="375" /></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/elsethenif.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/elsethenif.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/elsethenif.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/elsethenif.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/elsethenif.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/elsethenif.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/elsethenif.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/elsethenif.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/elsethenif.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/elsethenif.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/elsethenif.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/elsethenif.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/elsethenif.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/elsethenif.wordpress.com/22/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=elsethenif.wordpress.com&amp;blog=8118253&amp;post=22&amp;subd=elsethenif&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://elsethenif.wordpress.com/2009/06/12/quickly-cruding-with-code2code-plugin-and-vraptor2/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/326724a759a7f63379e64ddb7f3288b5?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Samuel Rizzo</media:title>
		</media:content>

		<media:content url="http://elsethenif.files.wordpress.com/2009/06/naming-the-project.png" medium="image">
			<media:title type="html">naming the project</media:title>
		</media:content>

		<media:content url="http://elsethenif.files.wordpress.com/2009/06/generate-menu-item1.png" medium="image">
			<media:title type="html">generate menu item</media:title>
		</media:content>

		<media:content url="http://elsethenif.files.wordpress.com/2009/06/vraptor-generators-inside-generators-folder1.png" medium="image">
			<media:title type="html">vraptor generators inside generators folder</media:title>
		</media:content>

		<media:content url="http://elsethenif.files.wordpress.com/2009/06/selecting-a-generator.png" medium="image">
			<media:title type="html">selecting a generator</media:title>
		</media:content>

		<media:content url="http://elsethenif.files.wordpress.com/2009/06/configuring-params.png" medium="image">
			<media:title type="html">configuring params</media:title>
		</media:content>

		<media:content url="http://elsethenif.files.wordpress.com/2009/06/web-xml-snippet-from-log1.png" medium="image">
			<media:title type="html">web.xml snippet from log</media:title>
		</media:content>

		<media:content url="http://elsethenif.files.wordpress.com/2009/06/welcome-page.png" medium="image">
			<media:title type="html">welcome page</media:title>
		</media:content>

		<media:content url="http://elsethenif.files.wordpress.com/2009/06/selecting-the-crud-generator.png" medium="image">
			<media:title type="html">selecting the crud generator</media:title>
		</media:content>

		<media:content url="http://elsethenif.files.wordpress.com/2009/06/configuring-the-crud-params.png" medium="image">
			<media:title type="html">configuring the crud params</media:title>
		</media:content>

		<media:content url="http://elsethenif.files.wordpress.com/2009/06/customizing-the-crud-generation.png" medium="image">
			<media:title type="html">customizing the crud generation</media:title>
		</media:content>

		<media:content url="http://elsethenif.files.wordpress.com/2009/06/pasting-the-hibernate-mapping1.png" medium="image">
			<media:title type="html">pasting the hibernate mapping</media:title>
		</media:content>

		<media:content url="http://elsethenif.files.wordpress.com/2009/06/products-index.png" medium="image">
			<media:title type="html">products index</media:title>
		</media:content>

		<media:content url="http://elsethenif.files.wordpress.com/2009/06/creating-a-new-product.png" medium="image">
			<media:title type="html">creating a new product</media:title>
		</media:content>

		<media:content url="http://elsethenif.files.wordpress.com/2009/06/viewing-the-product.png" medium="image">
			<media:title type="html">viewing the product</media:title>
		</media:content>

		<media:content url="http://elsethenif.files.wordpress.com/2009/06/editing-the-product.png" medium="image">
			<media:title type="html">editing the product</media:title>
		</media:content>
	</item>
		<item>
		<title>Open a new tab on Terminal with the same path (on Mac OS X)</title>
		<link>http://elsethenif.wordpress.com/2009/06/11/open-a-new-tab-on-terminal-with-the-same-path-on-mac-os-x/</link>
		<comments>http://elsethenif.wordpress.com/2009/06/11/open-a-new-tab-on-terminal-with-the-same-path-on-mac-os-x/#comments</comments>
		<pubDate>Thu, 11 Jun 2009 14:38:47 +0000</pubDate>
		<dc:creator>Samuel Rizzo</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[applescript]]></category>
		<category><![CDATA[mac os x]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[terminal]]></category>

		<guid isPermaLink="false">http://elsethenif.wordpress.com/?p=14</guid>
		<description><![CDATA[While working on the command-line, we always find ourselves in situations where we have to open a new tab and cd to the path we were working on. On a Mac, we can use some Applescript to help with that. &#8230; <a href="http://elsethenif.wordpress.com/2009/06/11/open-a-new-tab-on-terminal-with-the-same-path-on-mac-os-x/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=elsethenif.wordpress.com&amp;blog=8118253&amp;post=14&amp;subd=elsethenif&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>While working on the command-line, we always find ourselves in situations where we have to open a new tab and cd to the path we were working on.</p>
<p>On a Mac, we can use some Applescript to help with that.</p>
<p>Paste it to your ~/.profile:</p>
<pre style="overflow:auto;"><code>
# open a new tab on Terminal with the current working dir
function newtab {
	osascript -e "
		tell application \"System Events\" to tell process \"Terminal\" to keystroke \"t\" using command down
		tell application \"Terminal\" to do script \"cd \\\"$(PWD)\\\"\" in selected tab of the front window
	" &gt; /dev/null 2&gt;&amp;1
}
</code></pre>
<p>Now you just need to type &#8220;newtab&#8221;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/elsethenif.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/elsethenif.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/elsethenif.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/elsethenif.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/elsethenif.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/elsethenif.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/elsethenif.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/elsethenif.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/elsethenif.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/elsethenif.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/elsethenif.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/elsethenif.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/elsethenif.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/elsethenif.wordpress.com/14/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=elsethenif.wordpress.com&amp;blog=8118253&amp;post=14&amp;subd=elsethenif&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://elsethenif.wordpress.com/2009/06/11/open-a-new-tab-on-terminal-with-the-same-path-on-mac-os-x/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/326724a759a7f63379e64ddb7f3288b5?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Samuel Rizzo</media:title>
		</media:content>
	</item>
		<item>
		<title>code2code eclipse plugin: generate code using template engines</title>
		<link>http://elsethenif.wordpress.com/2009/06/10/code2code-eclipse-plugin-generate-code-using-template-engines/</link>
		<comments>http://elsethenif.wordpress.com/2009/06/10/code2code-eclipse-plugin-generate-code-using-template-engines/#comments</comments>
		<pubDate>Wed, 10 Jun 2009 14:56:20 +0000</pubDate>
		<dc:creator>Samuel Rizzo</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[code generation]]></category>
		<category><![CDATA[code2code]]></category>
		<category><![CDATA[eclipse plugin]]></category>
		<category><![CDATA[java]]></category>

		<guid isPermaLink="false">http://elsethenif.wordpress.com/?p=5</guid>
		<description><![CDATA[Do you find yourself always creating the same kind of files with very similar content? DAOs, services, actions, models and etc? Don&#8217;t you wish you could generate common sets of files with parameterized content, just like the rails guys do? &#8230; <a href="http://elsethenif.wordpress.com/2009/06/10/code2code-eclipse-plugin-generate-code-using-template-engines/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=elsethenif.wordpress.com&amp;blog=8118253&amp;post=5&amp;subd=elsethenif&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Do you find yourself always creating the same kind of files with very similar content? DAOs, services, actions, models and etc?</p>
<p>Don&#8217;t you wish you could generate common sets of files with parameterized content, just like the rails guys do?</p>
<p>Well, I do. </p>
<p>Why not?</p>
<h3>What I want is:</h3>
<ul>
<li><strong>Simplicity:</strong> No UML, no XML, no new languages to learn</li>
<li><strong>Flexibility:</strong> Edit and create my own generators, on a per project/frameworks basis</li>
<li><strong>Ease of use:</strong> Easily create generators: no tons of files to write, little configuration. Easily configure parameters and generate files.</li>
</ul>
<p>So, I didn&#8217;t like the existing plugins I&#8217;ve found.</p>
<p>Let&#8217;s try one ourselves&#8230;</p>
<p><span id="more-5"></span></p>
<h2>Building a lightweight code generation tool</h2>
<p>As a programmer, code is what I do, and I think is the best way to metaprogramming. So, let&#8217;s use known template engines instead of UML, XML or meta-languages.</p>
<p>I want have custom generators on a per project/framework basis, and be able to easily refine them over time. So, let&#8217;s just put them all on a folder on the project and have the plugin look there. No zips. No jars. No compile.</p>
<p>As for configuration, all I want is to generate files, with parameterized content. We should need no more than tell the parameters needed for our templates, and the destinations for each generated file. </p>
<p>When using a generator, a wizard should ask the values for the parameters and generate the files to the proper destinations.</p>
<h1>code2code plugin for eclipse</h1>
<h3>With code2code you can:</h3>
<ul>
<li>Generate a set of files based on templates, writen in template languages you already know/work: groovy (jsp-like), freemarker or velocity</li>
<li>Easily create your generators, providing only two properties-like configuration files:  one with destinations of the generated files and one telling the parameters your templates uses.
<li>Use a wizard to run a generator, set its parameter values and preview and change the files and contents to be generated.</li>
</ul>
<p>I&#8217;m pretty satisfied now with the result. That&#8217;s more or less what I had in mind, and though the project is still in an early beta stage, it already works very well (thanks to jBehave and SWTBot) and it is already been really useful.</p>
<p>Checkout the <a href="http://github.com/srizzo/code2code">project page</a> if you want to try it out.</p>
<p>I will post more on this soon.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/elsethenif.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/elsethenif.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/elsethenif.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/elsethenif.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/elsethenif.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/elsethenif.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/elsethenif.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/elsethenif.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/elsethenif.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/elsethenif.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/elsethenif.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/elsethenif.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/elsethenif.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/elsethenif.wordpress.com/5/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=elsethenif.wordpress.com&amp;blog=8118253&amp;post=5&amp;subd=elsethenif&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://elsethenif.wordpress.com/2009/06/10/code2code-eclipse-plugin-generate-code-using-template-engines/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/326724a759a7f63379e64ddb7f3288b5?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Samuel Rizzo</media:title>
		</media:content>
	</item>
		<item>
		<title>Hello world!</title>
		<link>http://elsethenif.wordpress.com/2009/06/10/hello-world/</link>
		<comments>http://elsethenif.wordpress.com/2009/06/10/hello-world/#comments</comments>
		<pubDate>Wed, 10 Jun 2009 14:52:27 +0000</pubDate>
		<dc:creator>Samuel Rizzo</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://elsethenif.wordpress.com/2009/06/10/hello-world/</guid>
		<description><![CDATA[Welcome to my technical blog<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=elsethenif.wordpress.com&amp;blog=8118253&amp;post=1&amp;subd=elsethenif&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Welcome to my technical blog</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/elsethenif.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/elsethenif.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/elsethenif.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/elsethenif.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/elsethenif.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/elsethenif.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/elsethenif.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/elsethenif.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/elsethenif.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/elsethenif.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/elsethenif.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/elsethenif.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/elsethenif.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/elsethenif.wordpress.com/1/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=elsethenif.wordpress.com&amp;blog=8118253&amp;post=1&amp;subd=elsethenif&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://elsethenif.wordpress.com/2009/06/10/hello-world/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/326724a759a7f63379e64ddb7f3288b5?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Samuel Rizzo</media:title>
		</media:content>
	</item>
	</channel>
</rss>
