<?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>Hot Koehls &#187; ide</title>
	<atom:link href="http://frankkoehl.com/tag/ide/feed/" rel="self" type="application/rss+xml" />
	<link>http://frankkoehl.com</link>
	<description>The more you know, the more you don&#039;t know</description>
	<lastBuildDate>Thu, 10 May 2012 18:34:34 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>Getting Started with Eclipse Part 2</title>
		<link>http://frankkoehl.com/2008/07/getting-started-with-eclipse-part-2/</link>
		<comments>http://frankkoehl.com/2008/07/getting-started-with-eclipse-part-2/#comments</comments>
		<pubDate>Tue, 08 Jul 2008 00:14:43 +0000</pubDate>
		<dc:creator>Frank</dc:creator>
				<category><![CDATA[For techies]]></category>
		<category><![CDATA[eclipse]]></category>
		<category><![CDATA[ide]]></category>
		<category><![CDATA[zen cart]]></category>

		<guid isPermaLink="false">http://frankkoehl.com/?p=26</guid>
		<description><![CDATA[Okay, so it took me WAY longer than a week to get this up, I apologize. However, as promised, here is the second half of Peter Coles&#8217; walkthrough of Eclipse. This portion focuses on the actual installation and configuration of Eclipse. If you don&#8217;t know what Eclipse is, or want to see why Peter loves [...]]]></description>
			<content:encoded><![CDATA[<p><em>Okay, so it took me WAY longer than a week to get this up, I apologize. However, as promised, here is the second half of <a href="http://www.kuroiwebdesign.com/">Peter Coles&#8217;</a> walkthrough of Eclipse.  This portion focuses on the actual installation and configuration of Eclipse. If you don&#8217;t know what Eclipse is, or want to see why Peter loves it, <a href="http://frankkoehl.com/2008/06/07/getting-started-with-eclipse-part-1/">check out the part 1 post</a>. Everyone else, enjoy!</em></p>
<hr />
<p><strong>Step 1</strong><br />
We&#8217;ll start by scooting over to <a href="http://download.eclipse.org/tools/pdt/downloads/index.php">http://download.eclipse.org/tools/pdt/downloads/index.php</a> to pick up a copy of the latest stable release (currently 1.0.3). This wraps up both base Eclipse and the PHP Development Tools.</p>
<p>Once downloaded, unzip it and pop the eclipse folder somewhere appropriate. In Windows, I put it in the &#8220;Program Files&#8221; folder and created a shortcut to the executable file in my quick launch bar. On the Mac I put it in the applications folder and dragged the executable to the dock. In Linux&#8230;well if you&#8217;re using Linux then I doubt that you need my help on this.</p>
<p><strong>Step 2</strong><br />
Launch Eclipse and specify where you would like to store your workspace. This is where all your files and settings will be put.</p>
<p><strong>Step 3</strong><br />
Click on the button to the right to go to the workbench. You can explore the snazzy icons later.</p>
<p><strong>Step 4</strong><br />
On the main menu go to <strong>Help &gt; Software Updates &gt; Find and Install</strong>. Select <em>Search for new features to install</em> and click <em>Next</em>. Click the <em>New Remote Site&#8230;</em> button and create a site called &#8220;Aptana&#8221; with URL &#8220;<a href="http://update.aptana.com/update/studio/">http://update.aptana.com/update/studio/</a>&#8220;. Click on <em>Finish</em> and it will do a search for what&#8217;s available and should find Aptana. Tick the box next to it and then click <em>Next</em>. Accept the license agreement, click <em>Next</em> and then <em>Finish</em>. Go make a cup of tea or take some other refreshment, this will take a while.</p>
<p>Once the download is complete you&#8217;ll probably be asked to install unsigned items part. Be brave, click <em>Install All</em>. Once completed you be asked to agree to configure your firewall to allow Aptana through (it likes to update you on new features). There&#8217;s no need to restart Eclipse yet. You have now installed the community version of Aptana Studio, but not its PHP tools (which we don&#8217;t want &mdash; they interfere with the better PDT tools) into Eclipse. You can learn more about Aptana Studio at <a href="http://www.aptana.com/studio">http://www.aptana.com/studio</a>.</p>
<p><strong>Step 5</strong><br />
Now we&#8217;re going to add a couple of optional plug-ins from an independent source: <a href="http://andrei.gmxhome.de/eclipse.html">Andrei Loskutov</a>. Two of his plug-ins are of particular interest: <a href="http://andrei.gmxhome.de/filesync/index.html">FileSync</a> and <a href="http://andrei.gmxhome.de/anyedit/index.html">AnyEdit</a>. FileSync allows a link to be created between a file in a project and an external location. For Kuroi this is useful to maintain the link between the development fileset and the test environment files, but I can imagine many other possible uses depending upon your workflow. AnyEdit is the plug-in that I am using to automatically replace tabs with spaces and strip whitespace from the end of lines.</p>
<p>The install process is similar to Step 4. <strong>Help &gt; Software Updates &gt; Find and Install</strong>; select <em>Search for new features to install</em> and click on <em>Next</em>. Click the <em>New Remote Site&#8230;</em> button and create a site called &#8220;Andrei  Loskutov&#8221; with URL &#8220;http://andrei.gmxhome.de/eclipse/&#8221;. If the Aptana box is still checked, uncheck it and click <em>Finish</em>. Expand the list of features until you can see all five. Select those you want (FileSync and AnyEdit Tools recommended). Click on <em>Next</em>, accept the licenses, <em>Next</em> again, <em>Finish</em> and then <em>Install All</em>. Still no need to restart Eclipse.</p>
<p><strong>Step 6</strong><br />
Finally we&#8217;re going to install <a href="http://www.eclipse.org/subversive/index.php">Subversive</a>. This is the most complex installation, and it&#8217;s only marginally more complex than those we did in the previous two steps as we will need to interrogate two remote sites and exclude some options. Let&#8217;s first go to <strong>Help &gt; Software Updates &gt; Find and Install</strong>; select <em>Search for new features to install</em> and click on <em>Next</em>. Click the <em>New Remote Site&#8230;</em> button and create a site called &#8220;Subversive&#8221; with URL &#8220;<a href="http://download.eclipse.org/technology/subversive/0.7/update-site/">http://download.eclipse.org/technology/subversive/0.7/update-site/</a>&#8221; (and while you&#8217;re there, uncheck Andrei). Repeat the process yet again to create another remote site called &#8220;Subversive SVN Connections&#8221; with URL &#8220;<a href="http://www.polarion.org/projects/subversive/download/eclipse/2.0/update-site/">http://www.polarion.org/projects/subversive/download/eclipse/2.0/update-site/</a>&#8221; and hit finish.</p>
<p>I recommend ticking the <em>Automatically select mirrors</em> box on the popup that appears, then <em>OK</em>. Check the first box and you&#8217;ll probably get a message about the &#8220;Mylyn Project.&#8221; Drilling down will show you where it&#8217;s coming from and allow you to uncheck this option. Clicking on the <em>Connections</em> box may result in errors (for the Mac I had to remove Win32 specific options &mdash; seems reasonable). Then carry on as for the previous options, but this time opt to restart Eclipse at the end of the process. Don&#8217;t worry if it starts up once and then restarts itself a second time, it won&#8217;t do this normally.</p>
<p><strong>Step 7</strong><br />
Close down the welcome screen &mdash; I&#8217;ll leave you to decide whether to install the further updates from Aptana at this time. You&#8217;ll probably want to get rid of that Aptana Welcome page too for the moment.</p>
<p><strong>Step 8</strong><br />
Let&#8217;s get in the mood for PHP. in the menu bar, go to <strong>Window &gt; Open Perspective &gt; PHP</strong>.</p>
<p><strong>Step 9</strong><br />
Now we&#8217;ll set a few configs. First find the preferences menu. In Windows it&#8217;s at the bottom of the window menu. On a Mac it&#8217;s near the top of the Eclipse menu. Wherever it is, open it and go to <strong>PHP &gt; Formatter</strong> and change the tabs to 2 spaces. Then, still in the preferences popup, back up to <strong>General &gt; Editors &gt; AnyEdit Tools</strong> and under the <em>Auto Convert</em> tab, check <em>convert tabs &lt;-&gt; spaces</em>. You want to uncheck the warning immediately below too. Then Click on <em>OK</em>.</p>
<p><strong>Step 10</strong><br />
To create a new project, click on the top left icon and select <em>New PHP Project</em>.</p>
<p><strong>Step 11</strong><br />
To set up a subversive link to a repository we&#8217;ll first open up a new view: <strong>Window &gt; Show View &gt; Other&#8230; &gt; SVN &gt; SVN repositories</strong>. Click on the icon with the green plus, and the rest should be obvious (if you are familiar with SVN already).</p>
<hr />
<p><em>If it feels like an abrupt ending, I apologize. Peter&#8217;s walkthrough ends here, however things continue to get more interesting. The entire concept of an <a href="http://www.google.com/search?q=eclipse+project">Eclipse project</a> deserves a walkthrough in its own right, along with <a href="http://www.google.com/search?q=eclipse+workspaces">workspaces</a> and <a href="http://www.google.com/search?q=eclipse+perspectives">perspectives</a> (these Google search results will get you started, though). I strongly recommend you hit up the <a href="http://wiki.eclipse.org/Main_Page">Eclipse Wiki</a> and the <a href="http://www.eclipse.org/documentation/">official documentation</a> for more information.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://frankkoehl.com/2008/07/getting-started-with-eclipse-part-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting Started with Eclipse Part 1</title>
		<link>http://frankkoehl.com/2008/06/getting-started-with-eclipse-part-1/</link>
		<comments>http://frankkoehl.com/2008/06/getting-started-with-eclipse-part-1/#comments</comments>
		<pubDate>Sun, 08 Jun 2008 00:37:48 +0000</pubDate>
		<dc:creator>Frank</dc:creator>
				<category><![CDATA[For techies]]></category>
		<category><![CDATA[eclipse]]></category>
		<category><![CDATA[ide]]></category>
		<category><![CDATA[zen cart]]></category>

		<guid isPermaLink="false">http://frankkoehl.com/?p=23</guid>
		<description><![CDATA[When I went to the Zen Cart Conference in Toronto in April, I had the great pleasure of meeting Peter Coles, owner and operator of Kuroi, a web design firm based in the UK. Peter is definitely one of the best developers I&#8217;ve seen bubble up from the Zen Cart community (along with team member [...]]]></description>
			<content:encoded><![CDATA[<p><em>When I went to the Zen Cart Conference in Toronto in April, I had the great pleasure of meeting Peter Coles, owner and operator of <a href="http://www.kuroiwebdesign.com/">Kuroi</a>, a web design firm based in the UK. Peter is definitely one of the best developers I&#8217;ve seen bubble up from the <a href="http://www.zen-cart.com/forum">Zen Cart community</a> (along with team member <a href="http://www.zen-cart.com/forum/member.php?u=6">Chris Brown</a>).</em></p>
<p><em>For the meeting, Peter put together a fantastic tutorial on <a href="http://www.eclipse.org/">Eclipse</a>, the premier integrated development environment (IDE). I played with Eclipse in the past, but it&#8217;s so overwhelming </em><em>initially </em><em>that I never got the hang of it; <a href="http://notepad-plus.sourceforge.net">Notepad++</a> always suited me just fine. Peter did a great job making the system approachable, including a step-by-step guide specifically targetting PHP developers. Needless to say, I saw the shortcomings of my simple text editor, and am currently tackling this beast.<br />
</em></p>
<p><em>With Peter&#8217;s permission I am happy to share his tutorial from the Toronto conference here with you (minor edits made for consistency). Today&#8217;s segment covers why Eclipse was a good choice for Peter and Kuroi (and why it&#8217;s a good choice for you!). Later this week I&#8217;ll post the actual steps for setting up Eclipse. Enjoy!</em></p>
<hr />
<p>At Kuroi, we have been considering for a while a move away from Dreamweaver, to a tool that is better able to support the type of work that we are do. We both have developer backgrounds and do the vast majority of our work, development and styling, by hand coding rather than by use of the WYSIWYG interface that is one of DW’s main strengths.</p>
<p>Our search was motivated by growing awareness that DW simply isn’t designed for our way of working. In effect it was a glorified editor with a few nice features. We were sure that there would be an IDE (or IDE&#8217;s) that would more closely match our preferences and offer additional features that would streamline our workflow. The ideal IDE would therefore give us everything we actually use in Dreamweaver and some nice goodies to make the transition worthwhile.</p>
<p>This all comes with the huge caveat that I’m still at an early stage of learning how to use Eclipse, but even at this early point, I’m seeing more than enough benefits to recommend that Kuroi makes the switch.</p>
<p><strong>Why Eclipse?</strong></p>
<p>I looked (briefly) at a number of IDEs and one in particular in depth. <a href="http://www.aptana.com/">Aptana</a> is gaining in popularity amongst designers, largely because of its support for AJAX development. It has a PHP add-in and also one for AIR, which made it particularly interesting. However, I was unimpressed with its PHP editor and PHP support generally, and the discovery that it didn’t support the deployment of files across a network (i.e. to our test server). However, <a href="http://www.aptana.com/studio">Aptana Studio</a> is built on Eclipse, thus drawing my attention back in that direction.</p>
<p>Eclipse comes from the non-profit Eclipse Foundation which includes representatives from (amongst others) IBM, HP, Red Hat, SuSE, Ericsson, Intel, SAP, and more recently (and significantly for PHP development) Zend. The current version of <a href="http://www.zend.com/en/products/studio/">Zend Studio</a> is being sold in two forms: a stand-alone version and one built on Eclipse, which in my view is the first step in a Zend strategy to move all of its customers to the Eclipse-based version. One license fee gets you both versions.</p>
<p>Another factor that drew our attention here at Kuroi was that Adobe (owners of Dreamweaver and the Flash IDE) are now basing the <a href="http://www.adobe.com/products/flex/features/flex_builder/">Flex IDE</a> (that’s the one used to Flash movies using a programming language) on Eclipse. Now that’s a vote of confidence!</p>
<p>So Eclipse is stable, well-supported, and building up some serious momentum, as well as providing a consistent approach to tackling an unprecedentedly wide variety of development types that previously would have required very different development tools.</p>
<p>Oh, and it’s free!</p>
<p>For us cost isn’t the primary concern, and I have also evaluated Zend Studio on Eclipse against <a href="http://www.eclipse.org/pdt/">Eclipse PDT </a>(PHP Development Tools). But I struggled at first to find differences. They are there. The debugging is reputedly better integrated, code deployment is easier and there will surely be differences in the integration of other Zend services. But most of the basic stuff we do in DW is covered by the base functionality in Eclipse so there didn’t seem a need to splash out $399 per workstation (and we have several) at this point. However, if those extras were needed in the future, it would be possible could upgrade to Zend and benefit from the knowledge and working practises derived from use of the underlying package as the icons, look &amp; feel and underlying paradigms are that similar, and Zend is structured as an increment to the base package.</p>
<p>This would be true of other tools too. The problem that I had with Aptana not supporting a network server arose in Eclipse too. I solved it by using an Eclipse plug-in and since Aptana is based on Eclipse, I had to try…and yes, it worked there too, and have a growing belief that it would work in any Eclipse-based application. And as you will see there proved to be another major benefit to this inter-operability.</p>
<p>Anyway, enough raving…</p>
<p><strong>What do we want from it to match our Dreamweaver workflow?</strong></p>
<p>We rely upon (in no particular order):</p>
<ul>
<li>Syntax Colouring</li>
<li>Snippets</li>
<li>Code folding</li>
<li>File Manager</li>
<li>Working File Segregation with local and remote deployment</li>
<li>Code Search (current project and whole Zen Cart distro)</li>
<li>File Compare</li>
<li>Parenthesis Matching</li>
</ul>
<p>So can Eclipse offer these?</p>
<p><strong>Syntax Colouring</strong><br />
This is available by default and can be configured through Window &gt; Preferences &gt; PHP &gt; Editor &gt; Syntax Coloring</p>
<p><strong>Snippets</strong><br />
There is a snippets view allowing common code blocks to be saved and quickly re-used. Snippets can also be exported and imported (useful for sharing). However, code completion and code templates offer even faster way of inserting blocks of code or functions in may situations.</p>
<p><strong>Code Folding</strong><br />
Code folding is available but unlike Dreamweaver files are opened with comment blocks and functions already foldered. This is bliss (though if you don’t like it, it can be turned off too). It is so much quicker to locate specific bits of code in large files (and this is just one of the tools that helps in this.</p>
<p><strong>File Manager</strong><br />
Eclipe’s PHP Explorer view offers a file tree similar to the file manager in Dreamweaver, but goes wider. At the top end it includes projects (rather than them being separate entitles that you must switch between à la DW). At the bottom end it allows you to drill down into some files. For example, it is possible to drill down into classes or other files containing ph functions and select a specific function or method. The relevant file will be opened with all functions closed (see above) except for the specific one selected (more bliss).</p>
<p><strong>Working File Segregation and Deployment</strong><br />
At Kuroi we typically work with <a href="http://www.zen-cart.com">Zen Cart</a> and Drupal, both of which are large file sets. So we segregate the files which we have changed or created from the full code set for the underlying application, and use DW to deploy our files to environments with a full installation for testing or delivery. DW allows us to define a local, test and remote file set and switch between them.</p>
<p>Eclipse is focused differently. It appears to be good at supporting projects based around code repositories but weak at simply transferring files to another server across a network or by FTP (or similar). However this can be dealt with.</p>
<p>The top ranked plug-in for Eclipse is <a href="http://andrei.gmxhome.de/filesync/">FileSync</a>. Installation is a breeze (and will be covered), and once in place it allows the files in a project to be linked to an external file set, such as those on our test server. Editing and saving a file in the project, automatically updates the equivalent external file. Precisely which files get updated can be set at folder or file level (as opposed to DW’s cloaking facility, which only allows folders to be excluded from updates).</p>
<p>Although there is an FTP facility originally developed by IBM, it appears to have a poor reputation and wasn’t easy to install (i.e. I didn’t manage it). However, Aptana’s FTP has a good reputation, and I was able (easily) to add it to Eclipse (details below). Like DW it allows bi-directional synchronization, but in place of upload and download there is a unidirectional synchronization, and no drag and drop.</p>
<p><strong>Code Search (current project and whole Zen Cart distro)</strong><br />
Search is easily accessed by a keyboard short cut or a button on the navigation bar. The modular nature of Eclipse, and the way I have built my install, means that I have ended up a choice of four slightly different search facilities! I suspect that I could trim that down if I wished, but it’s not inconvenient. Searching brings up a results window, as in DW, but rather than showing the searched for term in context, it shows a file tree. Clicking on a result will open the file and take you to the first result in the file, or you can use the search result navigation buttons to navigate through the results, weed them or re-run a previous search. Oh, and you can do replacement too.</p>
<p><strong>File Compare</strong><br />
DW allows the integration of third-party file comparison tools (one of us uses <a href="http://winmerge.org/">WinMerge</a>, the other <a href="http://www.scootersoftware.com/">Beyond Compare</a>). Eclipse has file comparison built in and when I say file comparison, I mean file compare on steroids. It will compare folders and their contents or individual files. The options available depend on the context; but contain at least &#8220;base from working copy&#8221;, &#8220;latest from repository&#8221;, &#8220;URL&#8221;, &#8220;branch&#8221;, &#8220;tag&#8221;, &#8220;each other&#8221; and &#8220;local history.&#8221; That last one means that a file can be compared with its own history, nice! There is also &#8220;help&#8221; available for three way comparisons though my poor, exploding brain isn’t ready for that yet.</p>
<p><strong>Parenthesis Matching</strong><br />
Only joking. DW doesn’t do this. So we both switch regularly into Notepad++ which does, just for this. Happily it’s built in to Eclipse.</p>
<p><strong>What Extra Goodies can Eclipse give us?</strong></p>
<p>Well, that’s all the boxes ticked for what we do now. Is there anything new? Well, yes. Heaps. I can only scratch the surface here.</p>
<p><strong>Subversive SVN</strong><br />
One of the modules that can be added into Eclipse is <a href="http://www.eclipse.org/subversive/">Subversive</a>. An official Eclipse project, this add-in claims to use an extended API allowing it to offer features for working with SVN repositories that aren’t available in other packages. I don’t have enough experience of SVN to gauge the validity or benefits of this. But I do like being able to update SVN repositories from within my IDE with a single click.</p>
<p>I haven’t yet attempted to upload to a repository from Eclipse, but suspect that it would prove very simple to do.</p>
<p><strong>Code Assist</strong><br />
Start to type a function and then press ctrl-space and up will pop a tool tip with all functions matching what has been typed so far and all functions that match what has been typed so far are made available in the a hover window for selection. Also available are details of the parameters taken by the function. The same can be done for defined constants, for which information about where they have been declared and their value is also displayed.</p>
<p>But it gets better. The functions and constants available via code assist don’t have to be restricted to those in the current project or built into PHP. It is possible to include a reference to another project, including a project linked to an SVN repository, and have all functions in that project also included in code assist.</p>
<p>And it gets even better still! If I instantiate a new class, and then type the name which I have assigned to it plus -&gt; (e.g. $newOrder-&gt;) up pops a list of the methods available to this instance. Amazing.</p>
<p><strong>Code Formatting</strong><br />
There’s a neat little add-in that can be applied to most editors to do things like convert all tabs to two spaces and any strip whitespace from the end of lines automatically whenever a file is saved, so you never need to worry about this again.</p>
<p><strong>Multiple Editors</strong><br />
The extent to which this is a benefit or not is arguable, but an Eclipse installation will typically have several specialist editors, rather than DW’s jack-of-all-trades. Happily they work rather well together so, for example, I have been able to construct a template file with the Aptana HTML editor, taking advantage of its HTML code assist and completion facilities, and then switch to the PHP editor to insert the dynamic content. This is much less clunky than it sounds, since you can have the same file open in two editors at the same time and any changes made in one are immediately visible in the other.</p>
<p><strong>PHP Project Outline</strong><br />
This offers a tree view of all constants, classes and functions in a project and the ability to jump straight to where each is declared.</p>
<p><strong>Outline View</strong><br />
By default this is set to show the outline of a PHP file and is very useful for providing a quick overview of php scripts with classes and functions, which can be displayed in several different ways. Go to a template file and switch the view over to HTML and it displays an equally useful overview of the tag structure.</p>
<p><strong>Real-time Syntax Validation</strong><br />
Eclipse checks your syntax as you type. If it detects a problem, it puts a little white cross on a red background next to the file and relevant line. There is a setting in the preferences that allows you to hover over the indicator in the file to see why it has been flagged.</p>
<p><strong>Auto Insertion of phpDoc Comment Blocks</strong><br />
Write a function or method and go back to insert a comment block and Eclipse can scan what you’ve written and insert a part completed comment block, which will also contribute automatically to your project’s code assist.</p>
<hr />
<p><em>Check back later this week for the follow-up, where Peter will go in depth on just how to get Eclipse going on your system, with all the features he has described above! You can save yourself the effort by simply <a href="http://feeds.feedburner.com/HotKoehl">joining the RSS feed</a>.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://frankkoehl.com/2008/06/getting-started-with-eclipse-part-1/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

