<?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>My Two Cents &#187; Eclipse</title>
	<atom:link href="http://my-two-cents.info/category/software/java/eclipse/feed/" rel="self" type="application/rss+xml" />
	<link>http://my-two-cents.info</link>
	<description>A deluge of information</description>
	<lastBuildDate>Sat, 01 Aug 2009 03:20:14 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>SWTBot for Eclipse UI Testing</title>
		<link>http://my-two-cents.info/software/swtbot-for-eclipse-ui-testing/</link>
		<comments>http://my-two-cents.info/software/swtbot-for-eclipse-ui-testing/#comments</comments>
		<pubDate>Sat, 01 Aug 2009 03:20:14 +0000</pubDate>
		<dc:creator>zuma</dc:creator>
				<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://my-two-cents.info/?p=14</guid>
		<description><![CDATA[After reviewing several tools for writing UI tests for Eclipse based products, I finally settled down on SWTBot. Testing UI code is not an easy undertaking, in general. What drove me towards SWTBot was the simplicity in writing tests, and also their ongoing effort in providing support for GEF (Graphical Editing Framework). Not to say [...]]]></description>
			<content:encoded><![CDATA[<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">After reviewing several tools for writing UI tests for Eclipse based products, I finally settled down on SWTBot. Testing UI code is not an easy undertaking, in general. What drove me towards SWTBot was the simplicity in writing tests, and also their ongoing effort in providing support for GEF (Graphical Editing Framework). Not to say that other tools do not provide nice features. I have heard that Window Tester from Instantiations is also good and provide good support. But SWTBot provided the quick start I needed to get some tests writting for the UI (ofcourse EPL license helps! <img src='http://my-two-cents.info/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  ).</div>
<p><span id="more-14"></span></p>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">SWTBot was not part of the Galileo release train, but you can still use their plugins with Galileo (and that still qualifies my article for the Eclipse Blogathon (http://www.eclipse.org/galileo/blogathon/guidelines.php), I hope!). SWTBot is still an incubation project, and their support for GEF is currently hosted under Google Code. But even at this early stage, SWTBot is quite functional, and shows promise for becoming a robust test tool for Eclipse plugin and RCP developers.</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">SWTBot is launched similar to how a JUnit Plugin test is launched, except that an SWTBot launch runs in a non-UI thread. SWTBot also provides options to run in a headless mode, and an ant task to integrate for continuous testing. Writing test code with SWTBot is simple enough. The following code snippet opens the Import dialog to import projects into a workspace.</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">workbenchBot.menu(&#8220;File&#8221;).menu(&#8220;Import&#8230;&#8221;).click();</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">workbenchBot.tree().select(&#8220;General&#8221;).expandNode(&#8220;General&#8221;).select(&#8220;Existing Projects into Workspace&#8221;);</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">As you can see, the code is very readable and relatively easy to write. SWTBot lacks a Recorder (apparently there is one, but it is not actively maintained). In my opinion, a Recorder is useful only initially to get the hang of things, but once you start writing reusuable test modules, a Recorder loses much of its value. So I do not see it to be a big disadvantage, though having a recorder wouldn&#8217;t hurt.</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">If you are interested in trying out SWTBot, here are some resources to get you started:</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">SWTBot: http://www.eclipse.org/swtbot/</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">Eclipse UI Test Tools Comparison: http://wiki.eclipse.org/Automated_Testing#UI_tests</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">SWTBot for GEF: http://code.google.com/p/swtbot4gef/</div>
<p>After reviewing several tools for writing UI tests for Eclipse based products, I finally settled down on <a title="SWTBot" href="http://www.eclipse.org/swtbot/" target="_blank">SWTBot</a>. Even after being a long time Eclipse plugin developer, I always found that I lacked a good tool for testing UI. I kept as much business logic code as possible away from UI code and wrote regular JUnit tests for that. But invariably, I ended up in situations where it made a lot of sense to write UI tests. What drove me towards SWTBot was the simplicity in writing tests, and also their ongoing effort in providing support for GEF (Graphical Editing Framework). Not to say that other tools do not provide nice features. I have heard that Window Tester from Instantiations is also good and provide good support. But SWTBot provided the quick start I needed to get some tests writting for the UI (ofcourse being an Eclipse project, and having an EPL license helps! <img src='http://my-two-cents.info/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  ).</p>
<p>SWTBot is not part of the Galileo release train, but you can still use their plugins with Galileo (and that still qualifies my article for <a title="Eclipse Blogathon" href="http://www.eclipse.org/galileo/blogathon/guidelines.php" target="_blank">Eclipse Blogathon</a>, I hope!). SWTBot is still an incubation project, and their support for GEF is currently hosted under Google Code. But even at this early stage, SWTBot is quite functional, and shows promise for becoming a robust test tool for Eclipse plugin and RCP developers.</p>
<p>SWTBot is launched similar to how a JUnit Plugin test is launched, except that an SWTBot launch runs in a non-UI thread. SWTBot also provides options to run in a headless mode, and an ant task to integrate for continuous testing. Writing test code with SWTBot is simple enough. The following code snippet opens the Import dialog to import projects into a workspace.</p>
<blockquote><p>workbenchBot.menu(&#8220;File&#8221;).menu(&#8220;Import&#8230;&#8221;).click();</p>
<p>workbenchBot.tree().select(&#8220;General&#8221;).expandNode(&#8220;General&#8221;).select(&#8220;Existing Projects into Workspace&#8221;);</p></blockquote>
<p>As you can see, the code is very readable and relatively easy to write. SWTBot lacks a Recorder (apparently there is one, but it is not actively maintained). In my opinion, a Recorder is useful only initially to get the hang of things, but once you start writing reusuable test modules, a Recorder loses much of its value. So I do not see it to be a big disadvantage, though having a recorder wouldn&#8217;t hurt.</p>
<p>If you are interested in trying out SWTBot, here are some resources to get you started:</p>
<p>SWTBot: http://www.eclipse.org/swtbot/</p>
<p>Eclipse UI Test Tools Comparison: http://wiki.eclipse.org/Automated_Testing#UI_tests</p>
<p>SWTBot for GEF: http://code.google.com/p/swtbot4gef/</p>
]]></content:encoded>
			<wfw:commentRss>http://my-two-cents.info/software/swtbot-for-eclipse-ui-testing/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Comparison of table implementations for Eclipse SWT &#8211; KTable, Eclipse Nebula CompositeTable, and SWT Table</title>
		<link>http://my-two-cents.info/software/java/eclipse/comparison-of-table-implementations-for-eclipse-swt-ktable-eclipse-nebula-compositetable-and-swt-table/</link>
		<comments>http://my-two-cents.info/software/java/eclipse/comparison-of-table-implementations-for-eclipse-swt-ktable-eclipse-nebula-compositetable-and-swt-table/#comments</comments>
		<pubDate>Fri, 03 Apr 2009 22:58:37 +0000</pubDate>
		<dc:creator>zuma</dc:creator>
				<category><![CDATA[Eclipse]]></category>

		<guid isPermaLink="false">http://my-two-cents.info/software/java/eclipse/comparison-of-table-implementations-for-eclipse-swt-ktable-eclipse-nebula-compositetable-and-swt-table/</guid>
		<description><![CDATA[A comparison of a few table implementations available for Eclipse SWT programming - KTable, Eclipse Nebula CompositeTable and SWT Table.]]></description>
			<content:encoded><![CDATA[<p>The stock table implementation in SWT Table is good enough for the common case; but once your requirements grows complex &#8211; such as the need to resize rows &#8211; it falls short. There are a couple of alternate table implementations worth considering - <a href="http://sourceforge.net/projects/ktable" title="KTable" target="_blank">KTable</a> and <a href="http://www.eclipse.org/nebula/widgets/compositetable/compositetable.php" title="Eclipse Nebula CompositeTable" target="_blank">Eclipse Nebula CompositeTable</a>.<span style="font-weight: bold" class="Apple-style-span"></span><span id="more-13"></span></p>
<h4>KTable</h4>
<p>The main advantage of KTable is that it is custom drawn. In some sense, this is a disadvantage too, since it does not use native SWT drawing techniques. But if you are looking for more control over the table&#8217;s functionality, then KTable might suit your needs. In my case, I needed control over the height of rows, more specifically, adjust the height of rows depending on its content. SWT Table had a Windows-specific issue that prevented individual rows from having different height. Also, once the height of a row is increased in an SWT Table, it can never be decreased. KTable helps overcome all these drawbacks. The latest version of KTable is 2.1.3 released in 2006, but it seems like bugs are still being fixed in CVS and the project is still active.</p>
<h4>Eclipse Nebula CompositeTable</h4>
<p>Nebula is a relatively new entry, but it is an Eclipse subproject, which gives it better visibility, and hopefully, stability. As of this writing, they are clearing out some legal issues; hence the binaries are not available for download, but you can still access the plugins and source code from CVS. Nebula&#8217;s CompositeTable is a custom SWT control which provides the flexibility to add any SWT control inside a cell. It also provides support for JFace Databinding to bind UI with model. The project is still in BETA. There is some discussion on absorbing this into mainstream SWT but it seems unlikely since Nebula does not follow the SWT principals of native drawing.</p>
<p>I have personally selected KTable for my requirements since it provides row resizing options that SWT Table or CompositeTable do not provide. But the jury is out there.</p>
]]></content:encoded>
			<wfw:commentRss>http://my-two-cents.info/software/java/eclipse/comparison-of-table-implementations-for-eclipse-swt-ktable-eclipse-nebula-compositetable-and-swt-table/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
