<?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>EclipseSource Blog</title>
	<atom:link href="http://eclipsesource.com/blogs/category/syndicate/feed/?author_name=mkempka" rel="self" type="application/rss+xml" />
	<link>http://eclipsesource.com/blogs</link>
	<description>Eclipse Equinox OSGi</description>
	<lastBuildDate>Fri, 17 May 2013 13:50:55 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>Focusing on the Problems</title>
		<link>http://eclipsesource.com/blogs/2013/02/08/focus-on-the-problems/</link>
		<comments>http://eclipsesource.com/blogs/2013/02/08/focus-on-the-problems/#comments</comments>
		<pubDate>Fri, 08 Feb 2013 09:11:35 +0000</pubDate>
		<dc:creator>Matthias Kempka</dc:creator>
				<category><![CDATA[EclipseSource News]]></category>
		<category><![CDATA[Planet Eclipse]]></category>
		<category><![CDATA[e4]]></category>
		<category><![CDATA[eclipse]]></category>
		<category><![CDATA[eclipse ui]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://eclipsesource.com/blogs/?p=14115</guid>
		<description><![CDATA[The &#8220;Problems&#8221; view in Eclipse lists errors and warnings in the workspace. In its default settings this view is not entirely helpful, but it is highly customizable. Today I want to show you how you can configure this view to shift the focus to the interesting errors and warnings in your current area of work. <a href="http://eclipsesource.com/blogs/2013/02/08/focus-on-the-problems/" style="text-decoration: none;">[...]</a>]]></description>
			<content:encoded><![CDATA[<p style="text-align: left;">The &#8220;Problems&#8221; view in Eclipse lists errors and warnings in the workspace. In its default settings this view is not entirely helpful, but it is highly customizable. Today I want to show you how you can configure this view to shift the focus to the interesting errors and warnings in your current area of work.</p>
<ul>
<li>Open the &#8220;Problems&#8221; view menu by clicking on the little triangle in the upper right corner of the view. Select &#8220;New Problems View&#8221;.</li>
</ul>
<p style="text-align: center;"><a href="http://eclipsesource.com/blogs/wp-content/uploads/2013/02/VMware-FusionScreenSnapz008.png"><img class="aligncenter  wp-image-14133" alt="VMware FusionScreenSnapz008 Focusing on the Problems" src="http://eclipsesource.com/blogs/wp-content/uploads/2013/02/VMware-FusionScreenSnapz008.png" width="255" height="171" title="Focusing on the Problems" /></a></p>
<ul>
<li>Choose a suitable name. This view only shows the errors in my current editor, so I enter &#8220;Error Outline&#8221;.</li>
</ul>
<p style="text-align: center;"><a href="http://eclipsesource.com/blogs/wp-content/uploads/2013/02/VMware-FusionScreenSnapz016.png"><img class="aligncenter  wp-image-14132" alt="VMware FusionScreenSnapz016 Focusing on the Problems" src="http://eclipsesource.com/blogs/wp-content/uploads/2013/02/VMware-FusionScreenSnapz016.png" width="398" height="196" title="Focusing on the Problems" /></a></p>
<ul>
<li>Place the &#8220;Error Outline&#8221; under the Outline.</li>
<li>In the &#8220;Error Outline&#8221;, open the view menu. Select &#8220;Configure Contents&#8221;.</li>
</ul>
<p style="text-align: center;"><a href="http://eclipsesource.com/blogs/wp-content/uploads/2013/02/VMware-FusionScreenSnapz015.png"><img class="aligncenter  wp-image-14134" alt="VMware FusionScreenSnapz015 Focusing on the Problems" src="http://eclipsesource.com/blogs/wp-content/uploads/2013/02/VMware-FusionScreenSnapz015.png" width="270" height="429" title="Focusing on the Problems" /></a></p>
<ul>
<li>The configuration dialog is fairly straight-forward. Configure it to show Errors/Warnings on Selection and it&#8217;s children as shown here.</li>
</ul>
<p style="text-align: center;"><a href="http://eclipsesource.com/blogs/wp-content/uploads/2013/02/VMware-FusionScreenSnapz011.png"><img class="aligncenter  wp-image-14136" alt="VMware FusionScreenSnapz011 Focusing on the Problems" src="http://eclipsesource.com/blogs/wp-content/uploads/2013/02/VMware-FusionScreenSnapz011.png" width="594" height="398" title="Focusing on the Problems" /></a></p>
<p>Now you have a fully configured Error Outline that shows a list of the current problems in your Editor.</p>
<p>By the way, you can also move through the problems in your editor by keeping your CTRL key pressed and hitting &#8216;.&#8217; and &#8216;,&#8217;.</p>
<p>I find it useful to have 2 Problem views configured, one that focuses on the editor and one that shows me the problems in my project. The workbench layout is then shown in the following picture.</p>
<p style="text-align: center;"><a href="http://eclipsesource.com/blogs/wp-content/uploads/2013/02/VMware-FusionScreenSnapz012.png"><img class="aligncenter size-full wp-image-14137" alt="VMware FusionScreenSnapz012 Focusing on the Problems" src="http://eclipsesource.com/blogs/wp-content/uploads/2013/02/VMware-FusionScreenSnapz012.png" width="400" height="341" title="Focusing on the Problems" /></a></p>
<p><br/><div style="display: inline-block"><a href="https://twitter.com/intent/tweet?source=webclient&amp;text=Focusing+on+the+Problems&amp;via=eclipsesource&amp;url=http://eclipsesource.com/blogs/2013/02/08/focus-on-the-problems/" target="_blank" title="Share on Twitter" style="margin-right: 5px;"><img title="Twitter" src="http://eclipsesource.com/blogs/wp-content/plugins/custom-about-author/images/social_media/twitter.png" alt="Twitter"/></a><a href="https://plus.google.com/share?url=http://eclipsesource.com/blogs/2013/02/08/focus-on-the-problems/" target="_blank" title="+1" style="margin-right: 5px;"><img title="Google+" src="http://eclipsesource.com/blogs/wp-content/plugins/custom-about-author/images/social_media/google_plus.png" alt="Google+"/></a><a href="http://www.linkedin.com/cws/share?url=http://eclipsesource.com/blogs/2013/02/08/focus-on-the-problems/" target="_blank" title="Share on LinkedIn" style="margin-right: 5px;"><img title="LinkedIn" src="http://eclipsesource.com/blogs/wp-content/plugins/custom-about-author/images/social_media/linkedin.png" alt="LinkedIn"/></a><a href="https://www.facebook.com/sharer/sharer.php?u=http://eclipsesource.com/blogs/2013/02/08/focus-on-the-problems/&amp;t=Focusing+on+the+Problems" target="_blank" title="Facebook" style="margin-right: 5px;"><img title="Facebook" src="http://eclipsesource.com/blogs/wp-content/plugins/custom-about-author/images/social_media/facebook.png" alt="Facebook"/></a></div><br/>Comments are off for this post.. Tagged with <a href='http://eclipsesource.com/blogs/tag/e4/' title='e4 Tag'>e4</a>, <a href='http://eclipsesource.com/blogs/tag/eclipse/' title='eclipse Tag'>eclipse</a>, <a href='http://eclipsesource.com/blogs/tag/eclipse-ui/' title='eclipse ui Tag'>eclipse ui</a>, <a href='http://eclipsesource.com/blogs/tag/tips/' title='tips Tag'>tips</a>, <a href='http://eclipsesource.com/blogs/tag/e4/' title='e4 Tag'>e4</a>, <a href='http://eclipsesource.com/blogs/tag/eclipse/' title='eclipse Tag'>eclipse</a>, <a href='http://eclipsesource.com/blogs/tag/eclipse-ui/' title='eclipse ui Tag'>eclipse ui</a>, <a href='http://eclipsesource.com/blogs/tag/tips/' title='tips Tag'>tips</a></p>]]></content:encoded>
			<wfw:commentRss>http://eclipsesource.com/blogs/2013/02/08/focus-on-the-problems/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>RWTBot</title>
		<link>http://eclipsesource.com/blogs/2012/11/15/rwtbot/</link>
		<comments>http://eclipsesource.com/blogs/2012/11/15/rwtbot/#comments</comments>
		<pubDate>Thu, 15 Nov 2012 10:22:22 +0000</pubDate>
		<dc:creator>Matthias Kempka</dc:creator>
				<category><![CDATA[EclipseSource News]]></category>
		<category><![CDATA[Planet Eclipse]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[rap]]></category>
		<category><![CDATA[testing]]></category>

		<guid isPermaLink="false">http://eclipsesource.com/blogs/?p=12539</guid>
		<description><![CDATA[Recently I started working at a headless client for RAP 2.0 with the following aims: Allow functional testing of RAP/RWT applications. Allow stress testing of RAP/RWT applications, working together with a performance test library. A secondary requirement is to: Be similar enough to the SWTBot API so that the effort for testing single-sourced applications is <a href="http://eclipsesource.com/blogs/2012/11/15/rwtbot/" style="text-decoration: none;">[...]</a>]]></description>
			<content:encoded><![CDATA[<p>Recently I started working at a headless client for RAP 2.0 with the following aims:</p>
<ul>
<li>Allow functional testing of RAP/RWT applications.</li>
<li>Allow stress testing of RAP/RWT applications, working together with a performance test library.</li>
</ul>
<p>A secondary requirement is to:</p>
<ul>
<li>Be similar enough to the SWTBot API so that the effort for testing single-sourced applications is minimal</li>
</ul>
<p>which gives this project the name RWTBot.</p>
<p style="text-align: left;"><a href="http://eclipsesource.com/blogs/wp-content/uploads/2012/11/ScreenSnapz051.png"><img class="size-medium wp-image-12540 aligncenter" title="Controls Demo Showcase With RWTBot" src="http://eclipsesource.com/blogs/wp-content/uploads/2012/11/ScreenSnapz051-300x126.png" alt="ScreenSnapz051 300x126 RWTBot" width="300" height="126" /></a>The following example test connects to the <a href="http://rap.eclipsesource.com/controlsdemo/controls">RWT Controls Demo</a> and tests the toggle button functionality:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="java" style="font-family:monospace;">@Test
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> selectToggleButton<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">throws</span> <span style="color: #003399;">Exception</span> <span style="color: #009900;">&#123;</span>
  <span style="color: #003399;">String</span> rwtAppUrl <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;http://rap.eclipsesource.com/controlsdemo/controls&quot;</span><span style="color: #339933;">;</span>
  RWTBot bot <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> RWTBot<span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> RWTBotClientParameters<span style="color: #009900;">&#40;</span>rwtAppUrl<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  RWTBotDisplay session <span style="color: #339933;">=</span> bot.<span style="color: #006633;">startSession</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// 1. handshake</span>
  RWTBotShell shell <span style="color: #339933;">=</span> session.<span style="color: #006633;">shell</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// 2. identify the main window</span>
  RWTBotButton observed <span style="color: #339933;">=</span> shell.<span style="color: #006633;">button</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Toggle&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// 3. Find a button named &quot;Toggle&quot;</span>
  assertFalse<span style="color: #009900;">&#40;</span>observed.<span style="color: #006633;">getSelection</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// 4. check precondition</span>
&nbsp;
  shell.<span style="color: #006633;">button</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Toggle Button&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">click</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// 5. trigger UI change</span>
&nbsp;
  assertTrue<span style="color: #009900;">&#40;</span>observed.<span style="color: #006633;">getSelection</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// 6. check post condition</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>During the test, this happens inside RWTBot:</p>
<ol>
<li>The initial handshake is executed with the RWT Demo. This opens a RAP session and a display is created. All widgets on the main screen are received. RWTBot control handlers for roughly 100 controls are created and configured.</li>
<li>Initially there is just the main window. This is identified and the RWTBot handle is received.</li>
<li>The main window has a button named &#8220;Toggle&#8221;. A handle for the button is received and remembered as a local variable. It will reflect the state change in the UI.</li>
<li>Assert that the precondition is as expected, ie. that the toggle button is deselected.</li>
<li>The &#8220;Toggle Button&#8221; is clicked. This is sent to the server which responds with changes for the UI. These changes include the activation of the observed button.</li>
<li>Assert that the postcondition is as expected, ie. that the toggle button is activated.</li>
</ol>
<p>Did I miss any design criteria for RWTBot? Are you interested in a working RWTBot? Leave a comment or email me to let us know.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><br/><div style="display: inline-block"><a href="https://twitter.com/intent/tweet?source=webclient&amp;text=RWTBot&amp;via=eclipsesource&amp;url=http://eclipsesource.com/blogs/2012/11/15/rwtbot/" target="_blank" title="Share on Twitter" style="margin-right: 5px;"><img title="Twitter" src="http://eclipsesource.com/blogs/wp-content/plugins/custom-about-author/images/social_media/twitter.png" alt="Twitter"/></a><a href="https://plus.google.com/share?url=http://eclipsesource.com/blogs/2012/11/15/rwtbot/" target="_blank" title="+1" style="margin-right: 5px;"><img title="Google+" src="http://eclipsesource.com/blogs/wp-content/plugins/custom-about-author/images/social_media/google_plus.png" alt="Google+"/></a><a href="http://www.linkedin.com/cws/share?url=http://eclipsesource.com/blogs/2012/11/15/rwtbot/" target="_blank" title="Share on LinkedIn" style="margin-right: 5px;"><img title="LinkedIn" src="http://eclipsesource.com/blogs/wp-content/plugins/custom-about-author/images/social_media/linkedin.png" alt="LinkedIn"/></a><a href="https://www.facebook.com/sharer/sharer.php?u=http://eclipsesource.com/blogs/2012/11/15/rwtbot/&amp;t=RWTBot" target="_blank" title="Facebook" style="margin-right: 5px;"><img title="Facebook" src="http://eclipsesource.com/blogs/wp-content/plugins/custom-about-author/images/social_media/facebook.png" alt="Facebook"/></a></div><br/>Comments are off for this post.. Tagged with <a href='http://eclipsesource.com/blogs/tag/performance/' title='performance Tag'>performance</a>, <a href='http://eclipsesource.com/blogs/tag/rap/' title='rap Tag'>rap</a>, <a href='http://eclipsesource.com/blogs/tag/testing/' title='testing Tag'>testing</a>, <a href='http://eclipsesource.com/blogs/tag/performance/' title='performance Tag'>performance</a>, <a href='http://eclipsesource.com/blogs/tag/rap/' title='rap Tag'>rap</a>, <a href='http://eclipsesource.com/blogs/tag/testing/' title='testing Tag'>testing</a></p>]]></content:encoded>
			<wfw:commentRss>http://eclipsesource.com/blogs/2012/11/15/rwtbot/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Does your application have working brakes?</title>
		<link>http://eclipsesource.com/blogs/2012/06/28/does-your-application-have-working-brakes/</link>
		<comments>http://eclipsesource.com/blogs/2012/06/28/does-your-application-have-working-brakes/#comments</comments>
		<pubDate>Thu, 28 Jun 2012 09:30:00 +0000</pubDate>
		<dc:creator>Matthias Kempka</dc:creator>
				<category><![CDATA[Planet Eclipse]]></category>

		<guid isPermaLink="false">http://eclipsesource.com/blogs/?p=7811</guid>
		<description><![CDATA[Suppose your friend got a new motorcycle. The first questions are probably like the following. What horsepower does it have? How fast can it go? How long does it take from 0 to 100km/h? How about 0 to 200km/h? Rarely will you ask how fast it can stop. Does it have brakes at all? Of <a href="http://eclipsesource.com/blogs/2012/06/28/does-your-application-have-working-brakes/" style="text-decoration: none;">[...]</a>]]></description>
			<content:encoded><![CDATA[<p>Suppose your friend got a new motorcycle. The first questions are probably like the following. What horsepower does it have? How fast can it go? How long does it take from 0 to 100km/h? How about 0 to 200km/h?<br />
 Rarely will you ask how fast it can stop. Does it have brakes at all?</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://eclipsesource.com/blogs/wp-content/uploads/2012/06/motorcycle.jpg" alt="motorcycle Does your application have working brakes?" width="300" height="193" title="Does your application have working brakes?" /></p>
<p>Of course every motor vehicle is supposed to have working brakes. In software things are different.</p>
<p>In any application many thoughts are given to the when and how things start up. Not as often are thoughts given to application shutdown. Of course, there are always these <code>stop()</code> methods, i.e. in the <code>IApplication</code> in Eclipse RCP or RAP and in every OSGi bundles activator. But what are you supposed to do with it?&nbsp; You&#8217;re supposed to shut down your connections, release your resources and stop your threads. Wait until this has happened, then exit <code>stop()</code>. Otherwise you risk ugly log entries in the best case, but also memory, UI handle or file handle leakages.</p>
<p>Cleaning up your resources is especially important in environments where the application lifecycle is not bound to a user interaction, i.e. on the server side or in RCP applications that just keep running.</p>
<p>In the following example, I present a small OSGi bundle with an activator and a class <code>TimeIndicator</code>. The Activator has the default <code>start()</code> and <code>stop()</code> methods, and at this moment the <code>stop()</code> method is implemented somewhat carelessly.</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="java" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> start<span style="color: #009900;">&#40;</span>BundleContext bundleContext<span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">throws</span> <span style="color: #003399;">Exception</span> <span style="color: #009900;">&#123;</span>
   <span style="color: #003399;">Activator</span>.<span style="color: #006633;">context</span> <span style="color: #339933;">=</span> bundleContext<span style="color: #339933;">;</span>
   clock <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> TimeIndicator<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
   clock.<span style="color: #006633;">start</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> stop<span style="color: #009900;">&#40;</span>BundleContext bundleContext<span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">throws</span> <span style="color: #003399;">Exception</span> <span style="color: #009900;">&#123;</span>
   <span style="color: #666666; font-style: italic;">// TODO free up resources</span>
   <span style="color: #003399;">Activator</span>.<span style="color: #006633;">context</span> <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">null</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>The <code>TimeIndicator</code> is a Thread that gets the OSGi LogService and logs a message &#8220;Tick&#8221; every second until it is shut down. For the purposes of this example the <code>TimeIndicator</code> assumes that it will always get the <code>LogService</code> via the activators bundle context.</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="java" style="font-family:monospace;">@Override
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> run<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  running <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">true</span><span style="color: #339933;">;</span>
  <span style="color: #000000; font-weight: bold;">while</span> <span style="color: #009900;">&#40;</span>running<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    BundleContext context <span style="color: #339933;">=</span> <span style="color: #003399;">Activator</span>.<span style="color: #006633;">getContext</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    ServiceReference reference <span style="color: #339933;">=</span> context.<span style="color: #006633;">getServiceReference</span><span style="color: #009900;">&#40;</span>LogService.<span style="color: #000000; font-weight: bold;">class</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    LogService logService <span style="color: #339933;">=</span> context.<span style="color: #006633;">getService</span><span style="color: #009900;">&#40;</span>reference<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    logService.<span style="color: #006633;">log</span><span style="color: #009900;">&#40;</span>LogService.<span style="color: #006633;">LOG_ERROR</span>, <span style="color: #0000ff;">&quot;Tick&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    waitASecond<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>Lets start this bundle. I&#8217;m starting this bundle as OSGi application.<br />
 In the OSGi console, I stop my bundle, and then inspect the status:</p>
<pre>osgi&gt; stop com.eclipsesource.examples.cleanup
osgi&gt; ss

Framework is launched.

id State       Bundle
0 ACTIVE      org.eclipse.osgi_3.7.2.v20120110-1415
1 ACTIVE      org.eclipse.core.contenttype_3.4.100.v20110423-0524
<span style="color: red;">2 RESOLVED com.eclipsesource.examples.cleanup_1.0.0.qualifier</span>
3 ACTIVE      org.eclipse.equinox.app_1.3.100.v20110321
4 ACTIVE      org.eclipse.equinox.common_3.6.0.v20110523

!ENTRY com.eclipsesource.examples.cleanup 4 0 2012-06-05 09:25:52.036
!MESSAGE Tick</pre>
<p>This is a dangerous state. The bundle stopped, but the thread is still running. It will soon fail because the context will be <code>null</code> in the next iteration, but in some bigger jobs it is not even sure that required classes would be loaded.</p>
<p>But the solution is straightforward. Here is what should be done in the <code>stop()</code> method:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="java" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> stop<span style="color: #009900;">&#40;</span>BundleContext bundleContext<span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">throws</span> <span style="color: #003399;">Exception</span> <span style="color: #009900;">&#123;</span>
<span style="color: #000000; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span> clock <span style="color: #339933;">!=</span> <span style="color: #000066; font-weight: bold;">null</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
      clock.<span style="color: #006633;">stopTicTac</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      clock.<span style="color: #006633;">join</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
    <span style="color: #003399;">Activator</span>.<span style="color: #006633;">context</span> <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">null</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>Checking your brakes is not hard, but just as a vehicle needs an inspection from time to time you should have a look now and then at cleaning up your resources properly.</p>
<p><span style="font-size: small; color: #999999;">Credit: Motorcycle photo by <a href="http://www.flickr.com/photos/34094515@N00/">Richard Taylor</a> via CC BY 2.0</span></p>
<p><br/><div style="display: inline-block"><a href="https://twitter.com/intent/tweet?source=webclient&amp;text=Does+your+application+have+working+brakes%3F&amp;via=eclipsesource&amp;url=http://eclipsesource.com/blogs/2012/06/28/does-your-application-have-working-brakes/" target="_blank" title="Share on Twitter" style="margin-right: 5px;"><img title="Twitter" src="http://eclipsesource.com/blogs/wp-content/plugins/custom-about-author/images/social_media/twitter.png" alt="Twitter"/></a><a href="https://plus.google.com/share?url=http://eclipsesource.com/blogs/2012/06/28/does-your-application-have-working-brakes/" target="_blank" title="+1" style="margin-right: 5px;"><img title="Google+" src="http://eclipsesource.com/blogs/wp-content/plugins/custom-about-author/images/social_media/google_plus.png" alt="Google+"/></a><a href="http://www.linkedin.com/cws/share?url=http://eclipsesource.com/blogs/2012/06/28/does-your-application-have-working-brakes/" target="_blank" title="Share on LinkedIn" style="margin-right: 5px;"><img title="LinkedIn" src="http://eclipsesource.com/blogs/wp-content/plugins/custom-about-author/images/social_media/linkedin.png" alt="LinkedIn"/></a><a href="https://www.facebook.com/sharer/sharer.php?u=http://eclipsesource.com/blogs/2012/06/28/does-your-application-have-working-brakes/&amp;t=Does+your+application+have+working+brakes%3F" target="_blank" title="Facebook" style="margin-right: 5px;"><img title="Facebook" src="http://eclipsesource.com/blogs/wp-content/plugins/custom-about-author/images/social_media/facebook.png" alt="Facebook"/></a></div><br/>Comments are off for this post.</p>]]></content:encoded>
			<wfw:commentRss>http://eclipsesource.com/blogs/2012/06/28/does-your-application-have-working-brakes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Eclipse Testing Day 2012 Submissions Open</title>
		<link>http://eclipsesource.com/blogs/2012/04/26/eclipse-testing-day-2012-submissions-open/</link>
		<comments>http://eclipsesource.com/blogs/2012/04/26/eclipse-testing-day-2012-submissions-open/#comments</comments>
		<pubDate>Thu, 26 Apr 2012 12:05:02 +0000</pubDate>
		<dc:creator>Matthias Kempka</dc:creator>
				<category><![CDATA[EclipseSource News]]></category>
		<category><![CDATA[Planet Eclipse]]></category>
		<category><![CDATA[Planet OSGi]]></category>
		<category><![CDATA[eclipse]]></category>
		<category><![CDATA[events]]></category>
		<category><![CDATA[jubula]]></category>
		<category><![CDATA[junit]]></category>
		<category><![CDATA[TDD]]></category>
		<category><![CDATA[testing]]></category>

		<guid isPermaLink="false">http://eclipsesource.com/blogs/?p=7573</guid>
		<description><![CDATA[This year marks the third Eclipse Testing Day, where the community gathers for a day focusing on testing with, for and at Eclipse. The event takes place on September 05 in Darmstadt. The general theme for this year&#8217;s testing day is &#8220;Testing and Beyond&#8221;. Topics of interest include: Testing Eclipse applications Testing within the Eclipse <a href="http://eclipsesource.com/blogs/2012/04/26/eclipse-testing-day-2012-submissions-open/" style="text-decoration: none;">[...]</a>]]></description>
			<content:encoded><![CDATA[<p>This year marks the third Eclipse Testing Day, where the community gathers for a day focusing on testing with, for and at Eclipse. The event takes place on September 05 in Darmstadt.</p>
<p>The general theme for this year&#8217;s testing day is &#8220;Testing and Beyond&#8221;. Topics of interest include:</p>
<ol>
<li>Testing Eclipse applications</li>
<li>Testing within the Eclipse Ecosystem</li>
<li>Testing on Eclipse Projects</li>
<li>Design for testability in Eclipse</li>
<li>Case studies of testing projects</li>
<li>Eclipse tooling and technology for the test process</li>
<li>Testing as a part of the application lifecycle</li>
<li>Continuous integration and testing for Eclipse applications</li>
</ol>
<p>The call for papers is open. If you would like give a talk on one of the given topics, or maybe if you have a visionary &#8216;beyond&#8217;, don&#8217;t hesitate to submit a talk.  The deadline for submissions is May 31st.</p>
<p>You&#8217;ll find more information on the wiki at <a href="http://wiki.eclipse.org/Eclipse_Testing_Day_2012">http://wiki.eclipse.org/Eclipse_Testing_Day_2012</a></p>
<p><br/><div style="display: inline-block"><a href="https://twitter.com/intent/tweet?source=webclient&amp;text=Eclipse+Testing+Day+2012+Submissions+Open&amp;via=eclipsesource&amp;url=http://eclipsesource.com/blogs/2012/04/26/eclipse-testing-day-2012-submissions-open/" target="_blank" title="Share on Twitter" style="margin-right: 5px;"><img title="Twitter" src="http://eclipsesource.com/blogs/wp-content/plugins/custom-about-author/images/social_media/twitter.png" alt="Twitter"/></a><a href="https://plus.google.com/share?url=http://eclipsesource.com/blogs/2012/04/26/eclipse-testing-day-2012-submissions-open/" target="_blank" title="+1" style="margin-right: 5px;"><img title="Google+" src="http://eclipsesource.com/blogs/wp-content/plugins/custom-about-author/images/social_media/google_plus.png" alt="Google+"/></a><a href="http://www.linkedin.com/cws/share?url=http://eclipsesource.com/blogs/2012/04/26/eclipse-testing-day-2012-submissions-open/" target="_blank" title="Share on LinkedIn" style="margin-right: 5px;"><img title="LinkedIn" src="http://eclipsesource.com/blogs/wp-content/plugins/custom-about-author/images/social_media/linkedin.png" alt="LinkedIn"/></a><a href="https://www.facebook.com/sharer/sharer.php?u=http://eclipsesource.com/blogs/2012/04/26/eclipse-testing-day-2012-submissions-open/&amp;t=Eclipse+Testing+Day+2012+Submissions+Open" target="_blank" title="Facebook" style="margin-right: 5px;"><img title="Facebook" src="http://eclipsesource.com/blogs/wp-content/plugins/custom-about-author/images/social_media/facebook.png" alt="Facebook"/></a></div><br/>Comments are off for this post.. Tagged with <a href='http://eclipsesource.com/blogs/tag/eclipse/' title='eclipse Tag'>eclipse</a>, <a href='http://eclipsesource.com/blogs/tag/events/' title='events Tag'>events</a>, <a href='http://eclipsesource.com/blogs/tag/jubula/' title='jubula Tag'>jubula</a>, <a href='http://eclipsesource.com/blogs/tag/junit/' title='junit Tag'>junit</a>, <a href='http://eclipsesource.com/blogs/tag/tdd/' title='TDD Tag'>TDD</a>, <a href='http://eclipsesource.com/blogs/tag/testing/' title='testing Tag'>testing</a>, <a href='http://eclipsesource.com/blogs/tag/eclipse/' title='eclipse Tag'>eclipse</a>, <a href='http://eclipsesource.com/blogs/tag/events/' title='events Tag'>events</a>, <a href='http://eclipsesource.com/blogs/tag/jubula/' title='jubula Tag'>jubula</a>, <a href='http://eclipsesource.com/blogs/tag/junit/' title='junit Tag'>junit</a>, <a href='http://eclipsesource.com/blogs/tag/tdd/' title='TDD Tag'>TDD</a>, <a href='http://eclipsesource.com/blogs/tag/testing/' title='testing Tag'>testing</a></p>]]></content:encoded>
			<wfw:commentRss>http://eclipsesource.com/blogs/2012/04/26/eclipse-testing-day-2012-submissions-open/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My Eclipse Testing Day</title>
		<link>http://eclipsesource.com/blogs/2011/09/09/my-eclipse-testing-day/</link>
		<comments>http://eclipsesource.com/blogs/2011/09/09/my-eclipse-testing-day/#comments</comments>
		<pubDate>Fri, 09 Sep 2011 15:03:52 +0000</pubDate>
		<dc:creator>Matthias Kempka</dc:creator>
				<category><![CDATA[EclipseSource News]]></category>
		<category><![CDATA[Planet Eclipse]]></category>

		<guid isPermaLink="false">http://eclipsesource.com/blogs/?p=6453</guid>
		<description><![CDATA[At September 7th I attended the Eclipse Testing Day 2011. In the morning we heard several talks about various testing strategies in different commercial products. Alexander Klein from BeOne held an inspiring talk about testing the users experience for a product. Among other ideas he recommended to watch users while they are confronted with the <a href="http://eclipsesource.com/blogs/2011/09/09/my-eclipse-testing-day/" style="text-decoration: none;">[...]</a>]]></description>
			<content:encoded><![CDATA[<p>At September 7th I attended the Eclipse Testing Day 2011.</p>
<p>In the morning we heard several talks about various testing strategies in different commercial products. Alexander Klein from BeOne held an inspiring talk about testing the users experience for a product. Among other ideas he recommended to watch users while they are confronted with the product to get ideas for the next iteration.</p>
<p>In the afternoon things became more hands-on. Michaela Greiler presented her Eclipse Plug-in Test Suite. This is a test runner that allows static and dynamic analysis to report on executed extension points and OSGi services. By itself it is merely interesting, but imho not interesting enough to be a standalone project. I think this technology should go as additional metrics in something like EclEmma. Maybe JaCoCo will provide a home? Hear me, Marc?</p>
<p>Jubula was a major point of talk. Felix Ziesel from BREDEX showed how he uses the <a href="http://www.eclipse.org/downloads/packages/eclipse-testers/indigor">Eclipse for Testers download</a> to define an automated smoke test suite to test the completeness of the Eclipse for RCP and RAP developers. I hope he will repeat this talk at an EclipseCon where other packagers are present. This just looked as it ought to be, but obviously it wasn&#8217;t feasible before Jubula.</p>
<p>The last talk was mine. I presented an example of <a href="http://eclipsesource.com/blogs/2011/09/08/announcing-a-full-featured-pde-build-example-from-a-git-repository/">a full-featured PDE build from a git repository</a> with test automation. Even though it was the last one of a full day of talks the discussion afterwards was interesting and showed I had hit a sore spot in many projects.</p>
<p>At the side where a few booths from various companies. I was excited to see Xored advertising <a href="http://www.xored.com/q7">Q7</a> there. This is a UI testing tool that only supports Eclipse. Because of this exclusiveness the scripting language gets right to the point. Capture and Replay functionality is also available. Why was I excited about that? &#8211; Coming as complete outsiders, they did a talk at last years Eclipse Testing Day about this side product they developed to make testing their application easier. It was extremely well perceived and for a while they where the focus of attention with this thing that&#8217;s now Q7. I&#8217;d really like to see them more involved with the Eclipse community. Specifically I think their tool might be in a good position to allow UI testing for a RAP workbench.</p>
<p>As a conclusion I have mixed feelings about the Eclipse Testing Day. It shows that things are moving and keeps a handful of people talking. I think it could be a real benefit for the community, if it would show up. But while last year all talks where held in english, now only 3 out of 10 did so, making the Testing Day too much of a german and too less an international event. Many key players where missing. Nobody mentioned SWTBot or JaCoCo. WindowTester didn&#8217;t even seem to exist. Is FrogLogic still in business (Their website says, yes)?<br />
It seemed to me that compared to last year there was almost an entirely new audience. I recognized only a handful people and 2 of them where speakers.<br />
It think that the talks and the audience are a bit too diverse. The name &#8220;Testing Day&#8221; brings together developers people who drive test processes in larger companies, but did&#8217;t lead them to talk to one another. Instead of accepting just mixing them in a single branch of talks, the Testing Day could improve by cutting down the program for the whole audience to maybe half a day. Fill the other half day with special interest topics, i.e. bring together the developers to talk about TDD, JUnit, issues about test automation with their test runners and hard times with AspectJ. Bring the people together who want to discuss test processes in big projects, but separate these two groups for a while at least.</p>
<p>The organizers are aware of this, too, so I&#8217;m looking forward for a strong and interesting Eclipse Testing Day 2012.</p>
<p><br/><div style="display: inline-block"><a href="https://twitter.com/intent/tweet?source=webclient&amp;text=My+Eclipse+Testing+Day&amp;via=eclipsesource&amp;url=http://eclipsesource.com/blogs/2011/09/09/my-eclipse-testing-day/" target="_blank" title="Share on Twitter" style="margin-right: 5px;"><img title="Twitter" src="http://eclipsesource.com/blogs/wp-content/plugins/custom-about-author/images/social_media/twitter.png" alt="Twitter"/></a><a href="https://plus.google.com/share?url=http://eclipsesource.com/blogs/2011/09/09/my-eclipse-testing-day/" target="_blank" title="+1" style="margin-right: 5px;"><img title="Google+" src="http://eclipsesource.com/blogs/wp-content/plugins/custom-about-author/images/social_media/google_plus.png" alt="Google+"/></a><a href="http://www.linkedin.com/cws/share?url=http://eclipsesource.com/blogs/2011/09/09/my-eclipse-testing-day/" target="_blank" title="Share on LinkedIn" style="margin-right: 5px;"><img title="LinkedIn" src="http://eclipsesource.com/blogs/wp-content/plugins/custom-about-author/images/social_media/linkedin.png" alt="LinkedIn"/></a><a href="https://www.facebook.com/sharer/sharer.php?u=http://eclipsesource.com/blogs/2011/09/09/my-eclipse-testing-day/&amp;t=My+Eclipse+Testing+Day" target="_blank" title="Facebook" style="margin-right: 5px;"><img title="Facebook" src="http://eclipsesource.com/blogs/wp-content/plugins/custom-about-author/images/social_media/facebook.png" alt="Facebook"/></a></div><br/>Comments are off for this post.</p>]]></content:encoded>
			<wfw:commentRss>http://eclipsesource.com/blogs/2011/09/09/my-eclipse-testing-day/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Announcing a full featured PDE Build example from a Git repository</title>
		<link>http://eclipsesource.com/blogs/2011/09/08/announcing-a-full-featured-pde-build-example-from-a-git-repository/</link>
		<comments>http://eclipsesource.com/blogs/2011/09/08/announcing-a-full-featured-pde-build-example-from-a-git-repository/#comments</comments>
		<pubDate>Thu, 08 Sep 2011 09:09:18 +0000</pubDate>
		<dc:creator>Matthias Kempka</dc:creator>
				<category><![CDATA[EclipseSource News]]></category>
		<category><![CDATA[Planet Eclipse]]></category>

		<guid isPermaLink="false">http://eclipsesource.com/blogs/?p=6429</guid>
		<description><![CDATA[I set up a githup repository that gives a working example for a PDE product build from a git repository. It is meant to ease the pain of setting up new builds by having a working template that just needs to be adjusted to the new project. I&#8217;m planning a series of blog entries with <a href="http://eclipsesource.com/blogs/2011/09/08/announcing-a-full-featured-pde-build-example-from-a-git-repository/" style="text-decoration: none;">[...]</a>]]></description>
			<content:encoded><![CDATA[<p>I set up a githup repository that gives a working example for a PDE product build from a git repository. It is meant to ease the pain of setting up new builds by having a working template that just needs to be adjusted to the new project.</p>
<p>I&#8217;m planning a series of blog entries with and around that example. Some features are:</p>
<ul>
<li>Works system independent</li>
<li>Executes tests</li>
<li>Builds from map files</li>
<li>Separates compile step and assemble step (Improves build time)</li>
<li>Mostly self-contained (Required: An Eclipse SDK and Git)</li>
</ul>
<p>How to get it running in short:</p>
<ul>
<li>Fetch from <code>git://github.com/mkempka/hyperbola-pde-build-demo.git</code></li>
<li> Adjust values in<code> org.eclipsercp.hyperbola.releng/custom.properties</code></li>
<li>Execute <code>org.eclipsercp.hyperbola.releng/build.xml</code> with ant</li>
</ul>
<p><a href="http://eclipsesource.com/blogs/wp-content/uploads/2011/09/20110907-Escaping-The-WAMM-Badge.pdf">Here</a> are my slides from my talk at the <a href="http://wiki.eclipse.org/Eclipse_Testing_Day_2011">Eclipse Testing Day 2011</a> that include some documentation. I&#8217;ll do more documentation in separate blog entries the next weeks.</p>
<p><br/><div style="display: inline-block"><a href="https://twitter.com/intent/tweet?source=webclient&amp;text=Announcing+a+full+featured+PDE+Build+example+from+a+Git+repository&amp;via=eclipsesource&amp;url=http://eclipsesource.com/blogs/2011/09/08/announcing-a-full-featured-pde-build-example-from-a-git-repository/" target="_blank" title="Share on Twitter" style="margin-right: 5px;"><img title="Twitter" src="http://eclipsesource.com/blogs/wp-content/plugins/custom-about-author/images/social_media/twitter.png" alt="Twitter"/></a><a href="https://plus.google.com/share?url=http://eclipsesource.com/blogs/2011/09/08/announcing-a-full-featured-pde-build-example-from-a-git-repository/" target="_blank" title="+1" style="margin-right: 5px;"><img title="Google+" src="http://eclipsesource.com/blogs/wp-content/plugins/custom-about-author/images/social_media/google_plus.png" alt="Google+"/></a><a href="http://www.linkedin.com/cws/share?url=http://eclipsesource.com/blogs/2011/09/08/announcing-a-full-featured-pde-build-example-from-a-git-repository/" target="_blank" title="Share on LinkedIn" style="margin-right: 5px;"><img title="LinkedIn" src="http://eclipsesource.com/blogs/wp-content/plugins/custom-about-author/images/social_media/linkedin.png" alt="LinkedIn"/></a><a href="https://www.facebook.com/sharer/sharer.php?u=http://eclipsesource.com/blogs/2011/09/08/announcing-a-full-featured-pde-build-example-from-a-git-repository/&amp;t=Announcing+a+full+featured+PDE+Build+example+from+a+Git+repository" target="_blank" title="Facebook" style="margin-right: 5px;"><img title="Facebook" src="http://eclipsesource.com/blogs/wp-content/plugins/custom-about-author/images/social_media/facebook.png" alt="Facebook"/></a></div><br/>Comments are off for this post.</p>]]></content:encoded>
			<wfw:commentRss>http://eclipsesource.com/blogs/2011/09/08/announcing-a-full-featured-pde-build-example-from-a-git-repository/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Capture screenshot on failing SWTBot tests</title>
		<link>http://eclipsesource.com/blogs/2010/09/09/capture-screenshot-on-failing-swtbot-tests/</link>
		<comments>http://eclipsesource.com/blogs/2010/09/09/capture-screenshot-on-failing-swtbot-tests/#comments</comments>
		<pubDate>Thu, 09 Sep 2010 07:51:17 +0000</pubDate>
		<dc:creator>Matthias Kempka</dc:creator>
				<category><![CDATA[EclipseSource News]]></category>
		<category><![CDATA[Planet Eclipse]]></category>

		<guid isPermaLink="false">http://eclipsesource.com/blogs/?p=4756</guid>
		<description><![CDATA[Sometimes functional tests fail. If they do, I not only want to see the test and the error message, I also want a screenshot of the application in the state during the failing test. I was astonished to find nothing in the SWTBot code or documentation that suggests how to automatically capture a screenshot when <a href="http://eclipsesource.com/blogs/2010/09/09/capture-screenshot-on-failing-swtbot-tests/" style="text-decoration: none;">[...]</a>]]></description>
			<content:encoded><![CDATA[<p>Sometimes functional tests fail. If they do, I not only want to see the test and the error message, I also want a screenshot of the application in the state during the failing test.</p>
<p>I was astonished to find nothing in the SWTBot code or documentation that suggests how to automatically capture a screenshot when a SWTBot test fails. This is why I came up with a JUnit4 Rule that does this. </p>
<p>In your SWTBot test class include the field</p>
<pre class="brush: java">
public class MyTest {
  @Rule
  public CaptureScreenshotOnFailure screenshot = new CaptureScreenshotOnFailure();
  
  @Test public void mytestmethod() {
    SWTBot bot = new SWTBot(...);
    // swtbot clicks and types
  }
</pre>
<p>So, if now mytestmethod fails, a screenshot will be put in the current directory with the name mypackage.MyTest.mytestmethod.png</p>
<p>This is the rule, put it somewhere where your test classes can access it:</p>
<pre class="brush: java">

import org.eclipse.swtbot.eclipse.finder.SWTWorkbenchBot;
import org.junit.rules.MethodRule;
import org.junit.runners.model.FrameworkMethod;
import org.junit.runners.model.Statement;

public class CaptureScreenshotOnFailure implements MethodRule {
	public final Statement apply(final Statement base,
			final FrameworkMethod method, Object target) {
		return new Statement() {
			@Override
			public void evaluate() throws Throwable {
				try {
					base.evaluate();
				} catch (Throwable onHold) {
					String fileName = constructFilename(method);
					new SWTWorkbenchBot().captureScreenshot(fileName);
					throw onHold;
				}
			}

			private String constructFilename(final FrameworkMethod method) {
				return &amp;quot;./&amp;quot;
						+ method.getMethod().getDeclaringClass()
								.getCanonicalName() + &amp;quot;.&amp;quot;
						+ method.getName() + &amp;quot;.png&amp;quot;;
			}
		};
	}
}

</pre>
<p>I think this makes writing tests with SWTBot more comfortable. Do you see ways to improve this rule?</p>
<p><br/><div style="display: inline-block"><a href="https://twitter.com/intent/tweet?source=webclient&amp;text=Capture+screenshot+on+failing+SWTBot+tests&amp;via=eclipsesource&amp;url=http://eclipsesource.com/blogs/2010/09/09/capture-screenshot-on-failing-swtbot-tests/" target="_blank" title="Share on Twitter" style="margin-right: 5px;"><img title="Twitter" src="http://eclipsesource.com/blogs/wp-content/plugins/custom-about-author/images/social_media/twitter.png" alt="Twitter"/></a><a href="https://plus.google.com/share?url=http://eclipsesource.com/blogs/2010/09/09/capture-screenshot-on-failing-swtbot-tests/" target="_blank" title="+1" style="margin-right: 5px;"><img title="Google+" src="http://eclipsesource.com/blogs/wp-content/plugins/custom-about-author/images/social_media/google_plus.png" alt="Google+"/></a><a href="http://www.linkedin.com/cws/share?url=http://eclipsesource.com/blogs/2010/09/09/capture-screenshot-on-failing-swtbot-tests/" target="_blank" title="Share on LinkedIn" style="margin-right: 5px;"><img title="LinkedIn" src="http://eclipsesource.com/blogs/wp-content/plugins/custom-about-author/images/social_media/linkedin.png" alt="LinkedIn"/></a><a href="https://www.facebook.com/sharer/sharer.php?u=http://eclipsesource.com/blogs/2010/09/09/capture-screenshot-on-failing-swtbot-tests/&amp;t=Capture+screenshot+on+failing+SWTBot+tests" target="_blank" title="Facebook" style="margin-right: 5px;"><img title="Facebook" src="http://eclipsesource.com/blogs/wp-content/plugins/custom-about-author/images/social_media/facebook.png" alt="Facebook"/></a></div><br/>Comments are off for this post.</p>]]></content:encoded>
			<wfw:commentRss>http://eclipsesource.com/blogs/2010/09/09/capture-screenshot-on-failing-swtbot-tests/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>An almost perfect Test Suite</title>
		<link>http://eclipsesource.com/blogs/2010/09/09/an-almost-perfect-test-suite/</link>
		<comments>http://eclipsesource.com/blogs/2010/09/09/an-almost-perfect-test-suite/#comments</comments>
		<pubDate>Thu, 09 Sep 2010 07:31:27 +0000</pubDate>
		<dc:creator>Matthias Kempka</dc:creator>
				<category><![CDATA[EclipseSource News]]></category>
		<category><![CDATA[Planet Eclipse]]></category>

		<guid isPermaLink="false">http://eclipsesource.com/blogs/?p=4744</guid>
		<description><![CDATA[During RCP application development the creation and maintenance of a Test Suite is a common annoyance. While solutions exist that we can live with, the current state of test suites is ennoyance enough that it was a topic for a talk at the Eclipse Testing day recently. Further down I&#8217;m presenting a way to create <a href="http://eclipsesource.com/blogs/2010/09/09/an-almost-perfect-test-suite/" style="text-decoration: none;">[...]</a>]]></description>
			<content:encoded><![CDATA[<p>During RCP application development the creation and maintenance of a Test Suite is a common annoyance. While solutions exist that we can live with, the current state of test suites is ennoyance enough that it was a topic for a <a href="http://wiki.eclipse.org/EclipseTestingDay2010_Talk_Andrena">talk</a> at the Eclipse Testing day recently. Further down I&#8217;m presenting a way to create Test Suites that overcome most problems of the presented methods. But before that, I&#8217;ll discuss a bit background knowledge.</p>
<h3>Background</h3>
<p>Good test suites</p>
<ul>
<li>are easy to set up</li>
<li>pick up new tests as they are included in the projects (no need to include them manually)</li>
<li>can differentiate between long running tests and fast unit tests</li>
<li>Can be used in both the IDE and the continuous integration</li>
<li>Don&#8217;t add performance</li>
</ul>
<p>One way to create dynamic test suites is the <a href="http://johanneslink.net/projects/cpsuite.jsp">ClassPathSuite</a>. It goes through the classpath and adds all tests it can find to a test suite which is then executed. This approach has two problems that both come from loading all classes before inspecting them:</p>
<ul>
<li>The time to dynamically create the test suite goes up</li>
<li>Static initializers may have wrong assumptions</li>
</ul>
<p>For OSGi applications there is another way to create a test suite dynamically, thats the BundleTestCollector from Patrick Paulin. It is a similar approach in that it goes through specified bundles and adds classes to a test suite, but has neither of the above drawbacks</p>
<ul>
<li>No class is loaded before a test is actually executed</li>
<li>There is no need to scan dependencies: You can narrow down the plug-ins that are scanned for tests</li>
</ul>
<p>Sounds almost perfect, doesn&#8217;t it? Hold your breath, it has some problems, too, but they are small against everything else I stumbled across.</p>
<p>First, Patricks version only works with JUnit 3. I used a modified version for a while now that works with JUnit 4 and has some more assertions than Patricks original version. The remaining problem is, when looking at the test results in the JUnit view, the stack trace is not linked to the workspace. A double-click fails, and I need to open the class and navigate to the line by hand.</p>
<p>The BundleTestCollector requires OSGi Bundles. You can&#8217;t just run it as JUnit test. In your IDE it must be started as PDE Test (or SWTBotTest), and in the continuous integration, you should use the Eclipse Testing Framework or the SWTBot test runners.</p>
<h3>The BundleTestCollector</h3>
<p>Patrick published <a href="http://www.modumind.com/2008/06/12/running-unit-tests-for-rcp-and-osgi-applications/">his version</a> of the BundleTestCollector under the EPL, so my modifications are EPL, too. <a href="http://eclipsesource.com/blogs/wp-content/uploads/2010/09/bundletestcollector.zip">Here</a> is a zip containing the BundleTestCollector and it&#8217;s single dependency, an Activator. You&#8217;ll have to copy them into an actual bundle and adjust the namespace. JUnit4 must be on the bundle dependency path.</p>
<p>The BundleTestCollector picks up the tests by naming conventions. If your test doesn&#8217;t adhere to a naming convention, it won&#8217;t be picked up.</p>
<p>Here is how to define a TestSuite. It&#8217;s still a JUnit 3 test suite, but the actual tests may be both, JUnit 3 or JUnit 4.</p>
<pre class="brush: java">

public class MyTestSuite extends TestSuite {

  public static Test suite() {
    BundleTestCollector testCollector = new BundleTestCollector();
    TestSuite suite = new TestSuite( &quot;All Tests&quot; );
    testCollector.collectTests(suite, &quot;my.bundle.namespace&quot;, &quot;my.package.namespace&quot;, &quot;*Test&quot;);
    // add more lines collectTests(...) calls if necessary
    return suite;
  }
}

</pre>
<p>Hope that eases some of your test suite maintenance pains.</p>
<p><br/><div style="display: inline-block"><a href="https://twitter.com/intent/tweet?source=webclient&amp;text=An+almost+perfect+Test+Suite&amp;via=eclipsesource&amp;url=http://eclipsesource.com/blogs/2010/09/09/an-almost-perfect-test-suite/" target="_blank" title="Share on Twitter" style="margin-right: 5px;"><img title="Twitter" src="http://eclipsesource.com/blogs/wp-content/plugins/custom-about-author/images/social_media/twitter.png" alt="Twitter"/></a><a href="https://plus.google.com/share?url=http://eclipsesource.com/blogs/2010/09/09/an-almost-perfect-test-suite/" target="_blank" title="+1" style="margin-right: 5px;"><img title="Google+" src="http://eclipsesource.com/blogs/wp-content/plugins/custom-about-author/images/social_media/google_plus.png" alt="Google+"/></a><a href="http://www.linkedin.com/cws/share?url=http://eclipsesource.com/blogs/2010/09/09/an-almost-perfect-test-suite/" target="_blank" title="Share on LinkedIn" style="margin-right: 5px;"><img title="LinkedIn" src="http://eclipsesource.com/blogs/wp-content/plugins/custom-about-author/images/social_media/linkedin.png" alt="LinkedIn"/></a><a href="https://www.facebook.com/sharer/sharer.php?u=http://eclipsesource.com/blogs/2010/09/09/an-almost-perfect-test-suite/&amp;t=An+almost+perfect+Test+Suite" target="_blank" title="Facebook" style="margin-right: 5px;"><img title="Facebook" src="http://eclipsesource.com/blogs/wp-content/plugins/custom-about-author/images/social_media/facebook.png" alt="Facebook"/></a></div><br/>Comments are off for this post.</p>]]></content:encoded>
			<wfw:commentRss>http://eclipsesource.com/blogs/2010/09/09/an-almost-perfect-test-suite/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to structure two dozen Eclipse workspaces</title>
		<link>http://eclipsesource.com/blogs/2010/05/21/how-to-structure-two-dozen-eclipse-workspaces/</link>
		<comments>http://eclipsesource.com/blogs/2010/05/21/how-to-structure-two-dozen-eclipse-workspaces/#comments</comments>
		<pubDate>Fri, 21 May 2010 10:36:20 +0000</pubDate>
		<dc:creator>Matthias Kempka</dc:creator>
				<category><![CDATA[Planet Eclipse]]></category>
		<category><![CDATA[yoxos]]></category>

		<guid isPermaLink="false">http://eclipsesource.com/blogs/?p=4255</guid>
		<description><![CDATA[I have tons of Eclipse workspaces. The last time I counted it was around 24, but it actually changes on a daily basis. With some of my workspaces I want to have a similar IDE as with others, but some IDEs require special plug-ins. A while ago, as I still unzipped Eclipse-downloads, this was a <a href="http://eclipsesource.com/blogs/2010/05/21/how-to-structure-two-dozen-eclipse-workspaces/" style="text-decoration: none;">[...]</a>]]></description>
			<content:encoded><![CDATA[<p>I have tons of Eclipse workspaces. The last time I counted it was around 24, but it actually changes on a daily basis.</p>
<p>With some of my workspaces I want to have a similar IDE as with others, but some IDEs require special plug-ins. A while ago, as I still unzipped Eclipse-downloads, this was a huge pain. Every time I wanted to work in a specific workspace I had to remember which IDE I used for what, then find the workspace location on the disk, before I could do anything.</p>
<h4>Permanent workspaces</h4>
<p>Now I double-click a .yoxos file on my Desktop, then start working. Related .yoxos files hang out together on different areas on my desktop. This is possible with the <a href="http://www.eclipsesource.com/yoxos5">Yoxos 5 Launcher</a> which I explained in my <a href="http://eclipsesource.com/blogs/2010/05/11/a-new-era-of-managing-eclipse-installations-has-begun/">last blog post</a>.</p>
<p>I associate the workspace I want to start in terms of &#8220;upper right&#8221; or &#8220;vaguely in the middle, left&#8221; on the screen. No need to remember long directory names.<br />
<a href="http://eclipsesource.com/blogs/2010/05/11/a-new-era-of-managing-eclipse-installations-has-begun/">Remember</a>, a .yoxos file is a definition of both the workspace and the IDE that works on the workspace. The actual workspace is somewhere in my home directory. Since every .yoxos file defines a separate IDE, I always click &#8220;Use this as default&#8221; after defining the first time where the workspace is located.<br />
<a href="http://eclipsesource.com/blogs/wp-content/uploads/2010/05/ScreenSnapz283.png"><img class="aligncenter size-medium wp-image-4261" title="Desktop structure" src="http://eclipsesource.com/blogs/wp-content/uploads/2010/05/ScreenSnapz283-300x207.png" alt="ScreenSnapz283 300x207 How to structure two dozen Eclipse workspaces" width="300" height="207" /></a></p>
<h4>Temporary workspaces</h4>
<p>Throwaway workspaces go to /tmp. Along with everything else in /tmp, they will be deleted the next time I reboot. The .yoxos file that defines a throwaway workspace should be deleted with it, so this belongs to /tmp as well. The IDE definition works this way:</p>
<ul>
<li>Start the Yoxos Launcher</li>
<li>Add &#8220;Project SDK&#8221; and all the other desired plug-ins</li>
<li>Save the .yoxos file to &#8220;/tmp/throwaway-workspace&#8221; (a new empty directory)</li>
<li>Hit &#8220;Launch&#8221;</li>
</ul>
<p><a href="http://eclipsesource.com/blogs/wp-content/uploads/2010/05/ScreenSnapz281.png"><img class="aligncenter size-medium wp-image-4263" title="ScreenSnapz281" src="http://eclipsesource.com/blogs/wp-content/uploads/2010/05/ScreenSnapz281-300x205.png" alt="ScreenSnapz281 300x205 How to structure two dozen Eclipse workspaces" width="300" height="205" /></a><br />
With the bundle pool I don&#8217;t worry about the plug-ins that compose the throwaway IDE. Only rarely something new gets downloaded anyway.</p>
<h4>.yoxos files and workspaces</h4>
<p>A special handling of .yoxos files in otherwise empty directories supports this workflow. If a .yoxos file is is started while residing in an empty directory, the IDE uses this directory as workspace. This provides an easy answer to the question about the &#8220;where&#8221;, and I use this feature at a regular basis.</p>
<p>On Mac OS X, I can append the extension &#8220;.yoxosws&#8221; to a directory that contains a .yoxos file. This defines a workspace that I can start directly with a double-click, without bothering about opening a folder to access the .yoxos file.</p>
<h4>Conclusion</h4>
<p>The <a href="http://www.eclipsesource.com/yoxos5">Yoxos 5 Launcher</a> makes it simple to handle a multitude of workspaces. The best thing is that you can stop wondering about the IDE contents and start thinking about workspaces. The Launcher provides a consistent UI to define new IDEs, including a huge number of 3rd-party plug-ins that are not shipped with the default Eclipse downloads.</p>
<p><br/><div style="display: inline-block"><a href="https://twitter.com/intent/tweet?source=webclient&amp;text=How+to+structure+two+dozen+Eclipse+workspaces&amp;via=eclipsesource&amp;url=http://eclipsesource.com/blogs/2010/05/21/how-to-structure-two-dozen-eclipse-workspaces/" target="_blank" title="Share on Twitter" style="margin-right: 5px;"><img title="Twitter" src="http://eclipsesource.com/blogs/wp-content/plugins/custom-about-author/images/social_media/twitter.png" alt="Twitter"/></a><a href="https://plus.google.com/share?url=http://eclipsesource.com/blogs/2010/05/21/how-to-structure-two-dozen-eclipse-workspaces/" target="_blank" title="+1" style="margin-right: 5px;"><img title="Google+" src="http://eclipsesource.com/blogs/wp-content/plugins/custom-about-author/images/social_media/google_plus.png" alt="Google+"/></a><a href="http://www.linkedin.com/cws/share?url=http://eclipsesource.com/blogs/2010/05/21/how-to-structure-two-dozen-eclipse-workspaces/" target="_blank" title="Share on LinkedIn" style="margin-right: 5px;"><img title="LinkedIn" src="http://eclipsesource.com/blogs/wp-content/plugins/custom-about-author/images/social_media/linkedin.png" alt="LinkedIn"/></a><a href="https://www.facebook.com/sharer/sharer.php?u=http://eclipsesource.com/blogs/2010/05/21/how-to-structure-two-dozen-eclipse-workspaces/&amp;t=How+to+structure+two+dozen+Eclipse+workspaces" target="_blank" title="Facebook" style="margin-right: 5px;"><img title="Facebook" src="http://eclipsesource.com/blogs/wp-content/plugins/custom-about-author/images/social_media/facebook.png" alt="Facebook"/></a></div><br/>Comments are off for this post.. Tagged with <a href='http://eclipsesource.com/blogs/tag/yoxos/' title='yoxos Tag'>yoxos</a>, <a href='http://eclipsesource.com/blogs/tag/yoxos/' title='yoxos Tag'>yoxos</a></p>]]></content:encoded>
			<wfw:commentRss>http://eclipsesource.com/blogs/2010/05/21/how-to-structure-two-dozen-eclipse-workspaces/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>A new era of managing Eclipse installations has begun</title>
		<link>http://eclipsesource.com/blogs/2010/05/11/a-new-era-of-managing-eclipse-installations-has-begun/</link>
		<comments>http://eclipsesource.com/blogs/2010/05/11/a-new-era-of-managing-eclipse-installations-has-begun/#comments</comments>
		<pubDate>Tue, 11 May 2010 13:05:45 +0000</pubDate>
		<dc:creator>Matthias Kempka</dc:creator>
				<category><![CDATA[Planet Eclipse]]></category>
		<category><![CDATA[eclipse]]></category>
		<category><![CDATA[yoxos]]></category>

		<guid isPermaLink="false">http://eclipsesource.com/blogs/?p=4200</guid>
		<description><![CDATA[Back in the old days, maintaining an Eclipse installation was easy. You just downloaded the Eclipse; it included the JDK and you used this Eclipse on all your workspaces. But the number of useful plug-ins increased, and many are not included in the downloads from eclipse.org. Developers use different plug-ins in different workspace. For some developers, <a href="http://eclipsesource.com/blogs/2010/05/11/a-new-era-of-managing-eclipse-installations-has-begun/" style="text-decoration: none;">[...]</a>]]></description>
			<content:encoded><![CDATA[<p>Back in the old days, maintaining an Eclipse installation was easy. You just downloaded the Eclipse; it included the JDK and you used this Eclipse on all your workspaces.</p>
<p>But the number of useful plug-ins increased, and many are not included in the downloads from eclipse.org. Developers use different plug-ins in different workspace. For some developers, this leads to as many Eclipse installations as workspaces. Others capitulated and just don&#8217;t use many plug-ins even though they see their value; but managing the installations is just too hard. Others again have one huge installation that includes about everything for all the workspaces, and they too have pain with plug-in dependencies. They all suffer from plug-in dependencies.</p>
<p>Imagine you had a system where each plug-in you use is downloaded just once and reused whenever you need it for a new Eclipse IDE.</p>
<p>Yoxos 5 provides that.</p>
<p><a href="http://eclipsesource.com/blogs/wp-content/uploads/2010/05/ScreenSnapz276.png"><img class="aligncenter size-medium wp-image-4224" title="ScreenSnapz276" src="http://eclipsesource.com/blogs/wp-content/uploads/2010/05/ScreenSnapz276-300x142.png" alt="ScreenSnapz276 300x142 A new era of managing Eclipse installations has begun" width="300" height="142" /></a></p>
<p style="text-align: center;">
<p style="text-align: left;">
<p style="text-align: left;">
<p style="text-align: left;">Imagine you could just start your workspace and your IDE starts up including all plug-ins you want to work with in that workspace. If it is a new workspace you&#8217;d have automatically adjusted predefined settings, import projects etc.</p>
<p style="text-align: left;">Yoxos 5 excels at that.</p>
<p style="text-align: center;"><a href="http://eclipsesource.com/blogs/wp-content/uploads/2010/05/ScreenSnapz270.png"><img class="aligncenter size-medium wp-image-4210" title="ScreenSnapz270" src="http://eclipsesource.com/blogs/wp-content/uploads/2010/05/ScreenSnapz270-300x272.png" alt="ScreenSnapz270 300x272 A new era of managing Eclipse installations has begun" width="300" height="272" /></a></p>
<p style="text-align: center;">
<p style="text-align: left;">
<p style="text-align: left;">Yoxos 5 unifies the workspace settings and its IDE description in a Yoxos Profile. A Yoxos Profile can be defined in a .yoxos file. The Yoxos Launcher creates Yoxos Profiles and starts them, for example when double-clicking the .yoxos file. Plug-ins are downloaded to the bundle pool and started only if the profile includes them.</p>
<p style="text-align: left;">Yoxos 5 is now in beta phase. You can try it out now:</p>
<ul>
<li><a href="http://eclipsesource.com/en/yoxos/yoxos-5-beta/download-yoxos-5-beta/">Download</a> and install the Yoxos Launcher</li>
<li>Download and start one of the sample profiles (further down at the download page)</li>
</ul>
<p>Get more information at <a href="http://eclipsesource.com/yoxos5">http://eclipsesource.com/yoxos5</a></p>
<p><br/><div style="display: inline-block"><a href="https://twitter.com/intent/tweet?source=webclient&amp;text=A+new+era+of+managing+Eclipse+installations+has+begun&amp;via=eclipsesource&amp;url=http://eclipsesource.com/blogs/2010/05/11/a-new-era-of-managing-eclipse-installations-has-begun/" target="_blank" title="Share on Twitter" style="margin-right: 5px;"><img title="Twitter" src="http://eclipsesource.com/blogs/wp-content/plugins/custom-about-author/images/social_media/twitter.png" alt="Twitter"/></a><a href="https://plus.google.com/share?url=http://eclipsesource.com/blogs/2010/05/11/a-new-era-of-managing-eclipse-installations-has-begun/" target="_blank" title="+1" style="margin-right: 5px;"><img title="Google+" src="http://eclipsesource.com/blogs/wp-content/plugins/custom-about-author/images/social_media/google_plus.png" alt="Google+"/></a><a href="http://www.linkedin.com/cws/share?url=http://eclipsesource.com/blogs/2010/05/11/a-new-era-of-managing-eclipse-installations-has-begun/" target="_blank" title="Share on LinkedIn" style="margin-right: 5px;"><img title="LinkedIn" src="http://eclipsesource.com/blogs/wp-content/plugins/custom-about-author/images/social_media/linkedin.png" alt="LinkedIn"/></a><a href="https://www.facebook.com/sharer/sharer.php?u=http://eclipsesource.com/blogs/2010/05/11/a-new-era-of-managing-eclipse-installations-has-begun/&amp;t=A+new+era+of+managing+Eclipse+installations+has+begun" target="_blank" title="Facebook" style="margin-right: 5px;"><img title="Facebook" src="http://eclipsesource.com/blogs/wp-content/plugins/custom-about-author/images/social_media/facebook.png" alt="Facebook"/></a></div><br/>Comments are off for this post.. Tagged with <a href='http://eclipsesource.com/blogs/tag/eclipse/' title='eclipse Tag'>eclipse</a>, <a href='http://eclipsesource.com/blogs/tag/yoxos/' title='yoxos Tag'>yoxos</a>, <a href='http://eclipsesource.com/blogs/tag/eclipse/' title='eclipse Tag'>eclipse</a>, <a href='http://eclipsesource.com/blogs/tag/yoxos/' title='yoxos Tag'>yoxos</a></p>]]></content:encoded>
			<wfw:commentRss>http://eclipsesource.com/blogs/2010/05/11/a-new-era-of-managing-eclipse-installations-has-begun/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
