<?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"
	>

<channel>
	<title>unitstep.net &#187; eclipse</title>
	<atom:link href="http://unitstep.net/blog/category/eclipse/feed/" rel="self" type="application/rss+xml" />
	<link>http://unitstep.net</link>
	<description>the home of peter chng</description>
	<pubDate>Tue, 18 Nov 2008 02:09:57 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.3</generator>
	<language>en</language>
			<item>
		<title>Eclipse: The best and only IDE you&#8217;ll ever need*</title>
		<link>http://unitstep.net/blog/2008/02/10/eclipse-the-best-and-only-ide-youll-ever-need/</link>
		<comments>http://unitstep.net/blog/2008/02/10/eclipse-the-best-and-only-ide-youll-ever-need/#comments</comments>
		<pubDate>Mon, 11 Feb 2008 00:39:16 +0000</pubDate>
		<dc:creator>Peter Chng</dc:creator>
		
		<category><![CDATA[JavaScript]]></category>

		<category><![CDATA[PHP]]></category>

		<category><![CDATA[development]]></category>

		<category><![CDATA[eclipse]]></category>

		<category><![CDATA[java]]></category>

		<category><![CDATA[programming]]></category>

		<category><![CDATA[software]]></category>

		<guid isPermaLink="false">http://unitstep.net/blog/2008/02/10/eclipse-the-best-and-only-ide-youll-ever-need/</guid>
		<description><![CDATA[
* Sensationalist headline inspired by previous posts
Eclipse is my IDE of choice, as you&#8217;l probably have noticed from some of my previous articles.  I had been wanting to write an article about why I use it (and why I switched to it), but kept putting it off.  Recently, Matt Mullenweg wrote about his [...]]]></description>
			<content:encoded><![CDATA[<p class="img align-right"><img src='http://unitstep.net/wordpress/wp-content/uploads/2008/02/eclipse-ide.thumbnail.jpg' alt='Copyright The Eclipse Foundation' /></p>
<p class="note less">* Sensationalist headline inspired by <a href="/blog/2007/10/16/sirreals-g15-plugin-the-best-and-only-logitech-g15-sdk-applet-youll-ever-need/">previous posts</a></p>
<p>Eclipse is my IDE of choice, as you&#8217;l probably have noticed from some of my <a href="/blog/2008/01/19/using-assemblas-trac-with-eclipse-mylyn-xml-rpc-access/">previous articles</a>.  I had been wanting to write an article about why I use it (and why I switched to it), but kept putting it off.  Recently, Matt Mullenweg <a href="http://ma.tt/2008/02/wither-dreamweaver/">wrote about his problems with Dreamweaver</a>, and this perhaps prompted me to organize my notes on why I&#8217;ve chosen to use Eclipse.  Don&#8217;t get me wrong - I&#8217;m not advocating that you immediately switch and throw out your current editing tool (the headline above, as noted, is purely for sensationalism) - but rather I&#8217;m just urging you to consider Eclipse for your next project.</p>
<h3>Changing Gears</h3>
<p>Like many, before switching to Eclipse I had been using a pure text editor, Ultraedit, for most of my web-development activities.  Ultraedit seemed fine for <a href="/blog/2007/06/10/ultraedit-php-5-and-the-function-list/">most things</a>, offering basic features like code highlight and autocompletion.  However, it lacked a certain finesse when it came to dealing with larger projects.  For example, if you&#8217;d defined a class, its members wouldn&#8217;t be available for autocompletion.  Something else was needed.  I finally decided to take the plunge, and switch over to Eclipse for all my development towards the end of the summer last year.</p>
<p>Some might wonder why I was even using a text-editor in the first place for development.  For those coming from a traditional programming/development background, the idea of not using an IDE (Integrated Development Environment) is silly.  This is because a lot of programming languages are compiled, and in this case, it just makes sense to use an IDE since it&#8217;s easier to write code, compile and debug using one tool instead of multiple ones. </p>
<p>However, for scripting languages, especially those meant to run on a web server, one can &#8220;get away&#8221; with not using an IDE quite easily.  This is because the scripts are not run standalone but are almost always executed in the context of a web server; thus you&#8217;re usually editing code that you then run on a development web server, without the need for a special tool like a compiler.  Additionally, it&#8217;s easy to view the output using any web browser.  These reasons are what allowed me to persist in using a text-editor for so long.</p>
<h3>No turning back</h3>
<p>However, once I started using Eclipse, I was hooked.  I downloaded Eclipse PDT (<acronym class="uttInitialism" title="PHP: Hypertext Preprocessor">PHP</acronym> Development Tools), which is basically a version of Eclipse bundled with the tools/plugins necessary for setting up a <acronym class="uttInitialism" title="PHP: Hypertext Preprocessor">PHP</acronym> development environment.  Besides offering everything Ultraedit did, it also offered nice features like easy &#8216;Todo&#8217; lists, (just type &#8216;todo&#8217; anywhere in a comment and it&#8217;s automatically indexed by Eclipse into a list), code completion for built-in <acronym class="uttInitialism" title="PHP: Hypertext Preprocessor">PHP</acronym> functions and your own as well as a multitude of other advanced features that IDEs have.  Oh, and it&#8217;s also FOSS. (Free and Open Source Software)</p>
<p>However, perhaps the best part about Eclipse is its robust and well-supported plugin system.  This allows Eclipse to pretty much assume any feature that someone is willing to write a plugin for.  This is what really sold me on Eclipse, because this almost makes its abilities endless.  Some of the plugins I use are <a href="http://subclipse.tigris.org/">Subclipse</a> for SVN integration, <a href="http://www.eclipse.org/mylyn/">Mylyn for Trac integration</a> and <a href="http://labs.adobe.com/technologies/jseclipse/">JSEclipse</a> for JavaScript editing.  This is part of the reason why Eclipse is the <a href="http://en.wikipedia.org/wiki/List_of_Eclipse-based_software">basis for many other IDEs</a> out there.</p>
<p>Some other nice features are the ability to link the IDE in with the <a href="http://www.zend.com/en/community/pdt#debugger">Zend Debugger</a>, thus allowing for proper debugging sessions with <acronym class="uttInitialism" title="PHP: Hypertext Preprocessor">PHP</acronym>.</p>
<h3>Spoiled</h3>
<p>However, I&#8217;ve been pampered somewhat and have found a few things to complain about, at least when it comes to Eclipse PDT.  I use Eclipse JDT (Java) a work and its advanced <a href="http://en.wikipedia.org/wiki/Refactoring">refactoring abilities</a> are a feature I find myself wanting in the PDT version.  Have you ever found yourself wanting to rename a variable to something more descriptive but putting it off because you&#8217;re afraid you&#8217;ll mess something up by forgetting to change the name somewhere?</p>
<p>With some IDEs, you&#8217;re left having to just do a search-and-replace in order to accomplish what should be a trivial name refactor.  Even if your editor supports regex searches, things can still be tricky - what if you&#8217;ve used the same name, but in a different context, and thus shouldn&#8217;t change the variable there?  The point is, the process still has to be human-supervised and is tedious.  With Eclipse JDT&#8217;s advanced refactoring, you can rename the variable once - and the IDE is smart enough to know where else to change it to keep the code consistent - <strong>very</strong> neat, and I was amazed when I first used it.  Other refactoring abilities include extracting methods out of blocks of code in order to clean up lengthy methods.  All of this makes your life 10 times easier and allows you focus on real programming rather than annoying tasks.</p>
<p>However, Eclipse PDT doesn&#8217;t support this for <acronym class="uttInitialism" title="PHP: Hypertext Preprocessor">PHP</acronym> code, yet.  I hear that it may be supported in a <a href="http://wiki.eclipse.org/PDT/1.5_Features_Proposal">later release</a>, so I have my fingers crossed.  Perhaps accomplishing these refactoring tasks is easier in Java because of its compiled nature or because the JDT project has received more attention.  It&#8217;s definitely possible in <acronym class="uttInitialism" title="PHP: Hypertext Preprocessor">PHP</acronym>, as some IDEs, such as the <a href="http://www.zend.com/en/products/studio/">Zend Studio</a> (which is based on Eclipse) support this ability.  Zend Studio, however, is a commercial solution and I haven&#8217;t tried it out yet.</p>
<h3>Nothing&#8217;s perfect</h3>
<p>Eclipse does have its downsides as compared to a traditional text editor.  First of all, it&#8217;s a memory hog - though most IDEs are.  I have regularly seen Eclipse eat up 300-400 MB of RAM if I&#8217;ve been using it for a long time.  However, it should be noted that I have not had it crash once, so it&#8217;s been rock-solid as far as stability goes.  Nonetheless, I recommend you to have at least 2 GB of memory if you really want to use it properly, since you&#8217;re likely to have other programs open.  This is especially important if you&#8217;re running Windows Vista.  RAM is quiet cheap nowadays, and you can easily pick up 2 GB for $50 or less and upgrading is a painless process, so there&#8217;s no reason not to.</p>
<h3>Finishing up</h3>
<p>Eclipse has changed my life.  Okay, so perhaps I&#8217;m exaggerating a bit.  But, I can say that development, at least for me, would be much harder without Eclipse.  If you&#8217;re still using a text editor for development, I urge you to give Eclipse a try - just for 30 days, and see how you like it.  I don&#8217;t guarantee results as good as mine, but you may be pleasantly surprised.</p>
<hr/>Copyright &copy; 2008 <strong><a href="http://unitstep.net">unitstep.net</a></strong>. This Feed is for personal non-commercial use only. If you are not reading this material in your news aggregator, the site you are looking at is guilty of copyright infringement. Please contact <strong><a href="mailto:webmaster@unitstep.net">webmaster@unitstep.net</a></strong> for more information.<br/><span style="float: right;font-size: 7pt"><a href="http://blog.taragana.com/index.php/archive/wordpress-plugins-provided-by-taraganacom/">Plugin</a> by <a href="http://www.taragana.com/">Taragana</a></span>]]></content:encoded>
			<wfw:commentRss>http://unitstep.net/blog/2008/02/10/eclipse-the-best-and-only-ide-youll-ever-need/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Using Assembla&#8217;s Trac with Eclipse Mylyn XML-RPC access</title>
		<link>http://unitstep.net/blog/2008/01/19/using-assemblas-trac-with-eclipse-mylyn-xml-rpc-access/</link>
		<comments>http://unitstep.net/blog/2008/01/19/using-assemblas-trac-with-eclipse-mylyn-xml-rpc-access/#comments</comments>
		<pubDate>Sun, 20 Jan 2008 02:16:42 +0000</pubDate>
		<dc:creator>Peter Chng</dc:creator>
		
		<category><![CDATA[assembla]]></category>

		<category><![CDATA[eclipse]]></category>

		<category><![CDATA[guides]]></category>

		<category><![CDATA[mylyn]]></category>

		<category><![CDATA[programming]]></category>

		<category><![CDATA[trac]]></category>

		<guid isPermaLink="false">http://unitstep.net/blog/2008/01/19/using-assemblas-trac-with-eclipse-mylyn-xml-rpc-access/</guid>
		<description><![CDATA[I recently found out about Assembla, an awesome service for managing software development projects.  It provides free SVN hosting (like other sites such as SourceForge and Google Code) but also provides tools like Trac, a Wiki, Scrum reporting, public or private access and up to 500 MB of disk space. (Additional features/space are available [...]]]></description>
			<content:encoded><![CDATA[<p>I recently found out about <a href="http://www.assembla.com/">Assembla</a>, an awesome service for managing software development projects.  It provides free SVN hosting (like other sites such as <a href="http://sourceforge.net/">SourceForge</a> and <a href="http://code.google.com/">Google Code</a>) but also provides tools like <a href="http://trac.edgewall.org">Trac</a>, a Wiki, Scrum reporting, public or private access and up to 500 MB of disk space. (Additional features/space are available for a cost)  For many, setting up services like Trac can be <a href="http://natmaster.com/articles/installing_trac.php">notoriously difficult</a>, so with <em>free</em> services like this, it&#8217;s hard to find any nits to pick.  </p>
<p>I won&#8217;t go into too much detail about the <a href="http://www.assembla.com/tour">features</a> since I wanted to talk about integrating the Eclipse plugin Mylyn with a Trac setup on Assembla.  There can be some issues getting things to work so I&#8217;ve outlined what I did to get everything running nicely.</p>
<h3>Background: Mylyn</h3>
<p><a href="http://www.eclipse.org/mylyn/">Mylyn</a> is an excellent task-management plugin for the ultimate IDE, Eclipse.  I have been trying it out for a variety of things, since I was trying to find something better than just text files for managing various tasks lists.  However, Mylyn does much <a href="http://www.ibm.com/developerworks/java/library/j-mylyn1/?ca=dgr-eclipse-1">more than just task management</a> as it helps to streamline your work environment with &#8220;context&#8221;.  I haven&#8217;t started using these advanced features though, but what really caught my eye was the integration Mylyn offers with various issue-tracking services such as Bugzilla and the aforementioned Trac.  This is accomplished by various &#8220;connectors&#8221;, with each connector being specific to one of the issue-tracking systems. </p>
<h3>The Problem: <a href="http://www.w3.org/XML/" class="ubernym uttInitialism"><acronym class="uttInitialism" title="eXtensible Markup Language">XML</acronym></a>-RPC Integration</h3>
<p>Integration of Mylyn with Trac allows you to view, create and edit tickets in a Trac repository from within Eclipse.  To accomplish this, there are two levels of integration, the first being simple web-based access.  This is the more primitive of the two and has been around for longer.  Basically, items are still edited from a web browser; the only difference is the web browser is spawned within Eclipse.  This isn&#8217;t really ideal and doesn&#8217;t offer a real integration.</p>
<p>The second uses an <a href="http://www.w3.org/XML/" class="ubernym uttInitialism"><acronym class="uttInitialism" title="eXtensible Markup Language">XML</acronym></a>-RPC interface to send/receive data and thus offers proper integration with the Eclipse environment.  However, when trying to connect to my Trac setup on Assembla with this choice, I ran into a lot of intermittent 404 (not found) errors.  Basically, synchronization was very flaky and by no means usable.  </p>
<h3>The Fix</h3>
<p>I did some searching and found <a href="http://www.assembla.com/flows/show_comment/cm_YtanJqr3lL8abIlDkbG?parent_id=cm_YtanJqr3lL8abIlDkbG&#038;space_id=c8A2BGQEWr2RUvaaeP0Qfc">this page</a> on the Assembla site where other users had experienced the same problem.  Scrolling through the comments brought me to <a href="http://vitaliel.blogspot.com/2007/08/mylyn-with-assembla-trac-hosting.html">this nice fellow&#8217;s explanation</a> of the problem, where a screencast was provided showing how it had been fixed.</p>
<p>Basically, these are the steps I did to get Mylyn <a href="http://www.w3.org/XML/" class="ubernym uttInitialism"><acronym class="uttInitialism" title="eXtensible Markup Language">XML</acronym></a>-RPC integration with Trac working.</p>
<ol>
<li>
<h4>Enable the <a href="http://www.w3.org/XML/" class="ubernym uttInitialism"><acronym class="uttInitialism" title="eXtensible Markup Language">XML</acronym></a>-RPC plugin</h4>
<p>Go to your Trac site, then click on Admin.  On the left sidebar go to <strong>General > Plugins</strong>.  There should be a section called <strong>TracXMLRPC</strong>; click to expand it.  You might as well enable RPC access for all of the options provided, though I&#8217;m not sure if this is necessary.  Here&#8217;s a screenshot.</p>
<p class="image">
<a rel="lightbox" href='http://unitstep.net/wordpress/wp-content/uploads/2008/01/assembla-mylyn-trac-01.png' title='Enable the XML-RPC plugin'><img src='http://unitstep.net/wordpress/wp-content/uploads/2008/01/assembla-mylyn-trac-01.png' alt='Enable the XML-RPC plugin' /></a></p>
</li>
<li>
<h4>Enable <a href="http://www.w3.org/XML/" class="ubernym uttInitialism"><acronym class="uttInitialism" title="eXtensible Markup Language">XML</acronym></a>-RPC permissions</h4>
<p>After that, you need to enable permissions for <a href="http://www.w3.org/XML/" class="ubernym uttInitialism"><acronym class="uttInitialism" title="eXtensible Markup Language">XML</acronym></a>-RPC access.  Go to <strong>General > Permissions</strong> on the sidebar.  In the &#8220;<strong>Grant Permissions</strong>&#8221; area, add a permission for &#8220;<strong>XML_RPC</strong>&#8221; for &#8220;<strong>@editors</strong>&#8220;.  Using &#8220;@managers&#8221; for the subject might also work/be needed if you&#8217;ve setup access for those users.  This is the basically what it should be:</p>
<p class="image">
<a rel="lightbox" href='http://unitstep.net/wordpress/wp-content/uploads/2008/01/assembla-mylyn-trac-02.png' title='Enable XML-RPC permissions'><img src='http://unitstep.net/wordpress/wp-content/uploads/2008/01/assembla-mylyn-trac-02.png' alt='Enable XML-RPC permissions' /></a></p>
</li>
<li>
<h4>Ensure there is at least one ticket in the system</h4>
<p>For some reason, I had weird errors when trying to synchronize/connect to a Trac repository with no tickets.  This was corroborated by <a href="http://vitaliel.blogspot.com/2007/08/mylyn-with-assembla-trac-hosting.html">the fellow who originally found the solution</a> to this problem.  It&#8217;s a minor issue though, just click &#8220;New Ticket&#8221; and create a placeholder.
</li>
<li>
<h4>Add Trac to Mylyn</h4>
<p>This step&#8217;s simply enough; though some suggestions recommended using <code>http://&lt;domain_name_to_assembla_trac&gt;/&lt;space_url_name&gt;/login/xmlrpc</code> as the <acronym class="uttInitialism" title="Uniform Resource Locator">URL</acronym>, I simply used <strong><code>http://&lt;domain_name_to_assembla_trac&gt;/&lt;space_url_name&gt;</code></strong> and it worked fine.  Remember to use <a href="http://www.w3.org/XML/" class="ubernym uttInitialism"><acronym class="uttInitialism" title="eXtensible Markup Language">XML</acronym></a>-RPC as your access type or you won&#8217;t get proper integration.</p>
<p class="image">
<a rel="lightbox" href='http://unitstep.net/wordpress/wp-content/uploads/2008/01/assembla-mylyn-trac-03.png' title='Setting up Mylyn to work with Trac'><img src='http://unitstep.net/wordpress/wp-content/uploads/2008/01/assembla-mylyn-trac-03.png' alt='Setting up Mylyn to work with Trac' /></a>
</p>
</li>
</ol>
<p>After that, you should be able to properly connect to your Trac repository using the <a href="http://www.w3.org/XML/" class="ubernym uttInitialism"><acronym class="uttInitialism" title="eXtensible Markup Language">XML</acronym></a>-RPC option of Mylyn.  Then, you can finally enjoy proper Trac integration in Eclipse!</p>
<hr/>Copyright &copy; 2008 <strong><a href="http://unitstep.net">unitstep.net</a></strong>. This Feed is for personal non-commercial use only. If you are not reading this material in your news aggregator, the site you are looking at is guilty of copyright infringement. Please contact <strong><a href="mailto:webmaster@unitstep.net">webmaster@unitstep.net</a></strong> for more information.<br/><span style="float: right;font-size: 7pt"><a href="http://blog.taragana.com/index.php/archive/wordpress-plugins-provided-by-taraganacom/">Plugin</a> by <a href="http://www.taragana.com/">Taragana</a></span>]]></content:encoded>
			<wfw:commentRss>http://unitstep.net/blog/2008/01/19/using-assemblas-trac-with-eclipse-mylyn-xml-rpc-access/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
