<?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 &#187; Matthias Kempka</title>
	<atom:link href="http://eclipsesource.com/blogs/author/mkempka/feed/" rel="self" type="application/rss+xml" />
	<link>http://eclipsesource.com/blogs</link>
	<description>Eclipse Equinox OSGi</description>
	<lastBuildDate>Fri, 18 May 2012 15:00:41 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<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[news]]></category>
		<category><![CDATA[OSGi]]></category>
		<category><![CDATA[syndicate]]></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 [...]]]></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>
]]></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[eclipse]]></category>
		<category><![CDATA[news]]></category>
		<category><![CDATA[syndicate]]></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 [...]]]></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>
]]></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[eclipse]]></category>
		<category><![CDATA[news]]></category>
		<category><![CDATA[syndicate]]></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 [...]]]></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>
]]></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[eclipse]]></category>
		<category><![CDATA[news]]></category>
		<category><![CDATA[syndicate]]></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 [...]]]></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>
]]></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[eclipse]]></category>
		<category><![CDATA[news]]></category>
		<category><![CDATA[syndicate]]></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 [...]]]></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>
]]></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>Register now for the Eclipse Testing Day</title>
		<link>http://eclipsesource.com/blogs/2010/08/03/register-now-for-the-eclipse-testing-day/</link>
		<comments>http://eclipsesource.com/blogs/2010/08/03/register-now-for-the-eclipse-testing-day/#comments</comments>
		<pubDate>Tue, 03 Aug 2010 08:55:55 +0000</pubDate>
		<dc:creator>Matthias Kempka</dc:creator>
				<category><![CDATA[news]]></category>

		<guid isPermaLink="false">http://eclipsesource.com/blogs/?p=4522</guid>
		<description><![CDATA[On September 8th, the Eclipse Testing Day takes place in Darmstadt. I have the honor of giving the opening talk about what I call finding the scope for a test. A lot of programmers seem to have difficulties with finding the right level for testing existing or new functionality. In general, they include too many [...]]]></description>
			<content:encoded><![CDATA[<p>On September 8th, the <a href="http://wiki.eclipse.org/EclipseTestingDay2010">Eclipse Testing Day</a> takes place in Darmstadt. I have the honor of giving the opening talk about what I call finding the scope for a test.</p>
<p>A lot of programmers seem to have difficulties with finding the right level for testing existing or new functionality. In general, they include too many classes and a too broadly defined system environment in test dependencies. This leads to trouble with reproducibility and stability.</p>
<p>In my talk, I&#8217;ll focus on RCP developers and share a few patterns and best practices that have been helpful in our team for finding the right level for writing a test.</p>
<p>Hope to see you in Darmstadt.</p>
]]></content:encoded>
			<wfw:commentRss>http://eclipsesource.com/blogs/2010/08/03/register-now-for-the-eclipse-testing-day/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[eclipse]]></category>
		<category><![CDATA[syndicate]]></category>
		<category><![CDATA[yoxos5]]></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 [...]]]></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>
]]></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[eclipse]]></category>
		<category><![CDATA[syndicate]]></category>
		<category><![CDATA[yoxos5]]></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, [...]]]></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>
]]></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>
		<item>
		<title>Take actions against sluggish desktop applications</title>
		<link>http://eclipsesource.com/blogs/2009/10/23/take-actions-against-sluggish-desktop-applications/</link>
		<comments>http://eclipsesource.com/blogs/2009/10/23/take-actions-against-sluggish-desktop-applications/#comments</comments>
		<pubDate>Fri, 23 Oct 2009 10:43:47 +0000</pubDate>
		<dc:creator>Matthias Kempka</dc:creator>
				<category><![CDATA[news]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://eclipsesource.com/blogs/?p=3244</guid>
		<description><![CDATA[Let me state two facts: My computer has 2 cores (there will be more in the future). My IDE feels sluggier with every version. Applications feel fast if the time between user action and application reaction is short. Ben Galbraith suggests that this threshold is around 200 ms for web applications, for desktop applications the [...]]]></description>
			<content:encoded><![CDATA[<p>Let me state two facts:</p>
<ol>
<li>My computer has 2 cores (there will be more in the future).</li>
<li>My IDE feels sluggier with every version.</li>
</ol>
<p>Applications feel fast if the time between user action and application reaction is short. Ben Galbraith <a href="http://ajaxian.com/archives/craftmanship-and-ui-latency">suggests</a> that this threshold is around 200 ms for web applications, for desktop applications the boundary is lower. <a href="http://www.useit.com/papers/responsetime.html">A rule of thumb</a> places it around 100 ms, so I there must be a yellow range in between.<br />
<a rel="attachment wp-att-3247" href="http://eclipsesource.com/blogs/2009/10/23/take-actions-against-sluggish-desktop-applications/performance/"></a></p>
<p style="text-align: center;"><img class="alignnone size-full wp-image-3247" title="performance" src="http://eclipsesource.com/blogs/wp-content/uploads/2009/10/performance.png" alt="performance Take actions against sluggish desktop applications" width="230" height="100" /></p>
<p>My IDE crosses this threshold more often than it should, so it&#8217;s sluggish. What&#8217;s the reason and what can be done about it?</p>
<p>It seems like a fundamental law in software engineering that every new version of any program executes more code than the previous version.</p>
<p>Java 5 introduced the java.util.concurrent API that made corse grained parallelism easier. The combination of thread pools, Futures and Barriers covered a wide range of tasks between CPU and I/O bound.</p>
<p>To me as UI programmer this had little consequence. For a while I could <a href="http://www.javaworld.com/javaworld/jw-02-1998/jw-02-jperf.html">still</a> state that Java+<a href="http://www.devx.com/Java/Article/21453">SWT</a> is <a href="http://en.wikipedia.org/wiki/Java_performance">fast</a>, consuming my part of that lunch that <a href="http://www.gotw.ca/publications/concurrency-ddj.htm">is not free any more</a> but was cheap enough anyway in the doses I required.</p>
<p>This is changing. A few years ago we saw a pain barrier reached and solved in startup time of various operating systems. Today my pain barrier is reached in many of the functions that are executed as reaction to user clicks and key presses in my IDE. Undoubtedly it is only a matter of time when this will apply to smaller desktop applications, too. They must react, and using multiple cores is the solution at hand.</p>
<p>Other languages and frameworks already have good support for multicore programming, Java 7 will include the <a href="http://gee.cs.oswego.edu/dl/jsr166/dist/jsr166ydocs/">ForkJoin framework</a> for Java. In the wild, it is a library known as <a href="http://gee.cs.oswego.edu/dl/concurrency-interest/">jsr166y</a> that can also be used with Java 6.</p>
<p>In the following I&#8217;ll discuss a little example that shows how to use the ForkJoin framework.</p>
<p>A simple easily parallelizable example is assigning random values in a large array. It&#8217;s also an example that can not be solved with raw processor power but  accesses memory.</p>
<p>First, care must be taken where the random number comes from. Even a sequential solution using ForkJoins <a href="http://gee.cs.oswego.edu/dl/jsr166/dist/jsr166ydocs/jsr166y/ThreadLocalRandom.html">ThreadLocalRandom</a> was about twice as fast than one with Math.random(). It&#8217;s also more comfortable to use.</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;">    <span style="color: #000066; font-weight: bold;">int</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> result <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #000066; font-weight: bold;">int</span><span style="color: #009900;">&#91;</span>ARR_SIZE<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
    <span style="color: #000000; font-weight: bold;">for</span><span style="color: #009900;">&#40;</span> <span style="color: #000066; font-weight: bold;">int</span> i <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span> i <span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;</span> result.<span style="color: #006633;">length</span><span style="color: #339933;">;</span> i<span style="color: #339933;">++</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
      result<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> ThreadLocalRandom.<span style="color: #006633;">current</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">nextInt</span><span style="color: #009900;">&#40;</span> result.<span style="color: #006633;">length</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span></pre></div></div>

<p>ForkJoin provides a class named <code>ForkJoinPool</code> as executor service for tasks. The constructor can be configured with the parallelism (number of threads) to be used. The default constructor takes the number of available processors as returned by <code>Runtime.availableProcessors()</code>. The pool is then given tasks for execution.</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;">    ForkJoinPool pool <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> ForkJoinPool<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    pool.<span style="color: #006633;">invoke</span><span style="color: #009900;">&#40;</span> <span style="color: #000000; font-weight: bold;">new</span> ArrayGenerator<span style="color: #009900;">&#40;</span> result, <span style="color: #cc66cc;">0</span>, result.<span style="color: #006633;">length</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>The <code>ArrayGenerator</code> is a <a href="http://gee.cs.oswego.edu/dl/jsr166/dist/jsr166ydocs/jsr166y/RecursiveAction.html">RecursiveAction</a>. The RecursiveAction differs from the RecursiveTask mainly in the return value of the <code>compute()</code> method. It&#8217;s implementation is a straightforward recursive algorithm. First, there is an exit condition that solves the remaining problem sequentially. If that is not hit yet, the remaining problem is divided for two other RecursiveActions. Those are given to <code>invokeAll</code>, which blocks execution in this task until all subtasks are executed. In my experiments, the definition of the exit condition didn&#8217;t matter as long as all cores where busy at least once.</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> ArrayGenerator <span style="color: #000000; font-weight: bold;">extends</span> RecursiveAction <span style="color: #009900;">&#123;</span>
&nbsp;
  <span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000066; font-weight: bold;">int</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> nums<span style="color: #339933;">;</span>
  <span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000000; font-weight: bold;">final</span> <span style="color: #000066; font-weight: bold;">int</span> start, end<span style="color: #339933;">;</span>
&nbsp;
  <span style="color: #000000; font-weight: bold;">public</span> ArrayGenerator<span style="color: #009900;">&#40;</span> <span style="color: #000066; font-weight: bold;">int</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> nums, <span style="color: #000066; font-weight: bold;">int</span> start, <span style="color: #000066; font-weight: bold;">int</span> end <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">this</span>.<span style="color: #006633;">nums</span> <span style="color: #339933;">=</span> nums<span style="color: #339933;">;</span>
    <span style="color: #000000; font-weight: bold;">this</span>.<span style="color: #006633;">start</span> <span style="color: #339933;">=</span> start<span style="color: #339933;">;</span>
    <span style="color: #000000; font-weight: bold;">this</span>.<span style="color: #006633;">end</span> <span style="color: #339933;">=</span> end<span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
&nbsp;
  @Override
  <span style="color: #000000; font-weight: bold;">protected</span> <span style="color: #000066; font-weight: bold;">void</span> compute<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span> arrayIsSmallEnough<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
      assignSequential<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;">else</span> <span style="color: #009900;">&#123;</span>
      <span style="color: #000066; font-weight: bold;">int</span> middle <span style="color: #339933;">=</span> start <span style="color: #339933;">+</span> <span style="color: #009900;">&#40;</span>end <span style="color: #339933;">-</span> start<span style="color: #009900;">&#41;</span><span style="color: #339933;">/</span><span style="color: #cc66cc;">2</span><span style="color: #339933;">;</span>
      ArrayGenerator left <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> ArrayGenerator<span style="color: #009900;">&#40;</span>nums, start, middle<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      ArrayGenerator right <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> ArrayGenerator<span style="color: #009900;">&#40;</span>nums, middle, end<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      invokeAll<span style="color: #009900;">&#40;</span> left, right <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
  <span style="color: #009900;">&#125;</span>
 ...
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>On my machine with 2 cores I achieved a speedup of 1.24 over the sequential solution. While that&#8217;s not as good as I hoped it still is a significant improvement that has the chance to move my clicks back down into the green area. I suspect that more cores could achieve a better speedup, so there is free lunch again once I design my program for concurrent execution.</p>
<p>Programming with this framework seems easy enough to me to see it adopted widely. However, we must rethink our problems and search for chances to <a href="http://www.ddj.com/hpc-high-performance-computing/201804248">parallelize</a>.<br />
I implemented the same thing with ThreadPoolExecutors and Futures. While the execution time did not differ there, it took me 3 times as long to implement it.</p>
]]></content:encoded>
			<wfw:commentRss>http://eclipsesource.com/blogs/2009/10/23/take-actions-against-sluggish-desktop-applications/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>OSGi Import Package and Split Package Woes</title>
		<link>http://eclipsesource.com/blogs/2009/07/14/why-i-cant-recommend-using-import-package/</link>
		<comments>http://eclipsesource.com/blogs/2009/07/14/why-i-cant-recommend-using-import-package/#comments</comments>
		<pubDate>Tue, 14 Jul 2009 15:09:44 +0000</pubDate>
		<dc:creator>Matthias Kempka</dc:creator>
				<category><![CDATA[news]]></category>

		<guid isPermaLink="false">http://eclipsesource.com/blogs/?p=2409</guid>
		<description><![CDATA[Since OSGi developers gained influence in the Eclipse development and trainings discussion&#8230; many words have been said in favour of declaring dependencies via Import-Package instead of Require-Bundle. The concept of Import-Package is quite appealing. In today&#8217;s world, Java itself doesn&#8217;t have a concept for modules so we depend on OSGi for modularity. Actual dependencies on [...]]]></description>
			<content:encoded><![CDATA[<p>Since <a href="http://www.osgi.org">OSGi</a> developers gained influence in the Eclipse development and trainings discussion&#8230; many words have been said in favour of declaring dependencies via <code>Import-Package</code> instead of <code>Require-Bundle</code>.</p>
<p>The concept of <code>Import-Package</code> is quite appealing. In today&#8217;s world, Java itself doesn&#8217;t have a concept for modules so we depend on OSGi for modularity. Actual dependencies on the Java side are specified on the class and package level. So it feels more natural to specify what you need via <code>Import-Package</code> instead of where you want something from via <code>Require-Bundle</code>.</p>
<p>As an experienced Eclipse developer dealing with many large projects&#8230; I&#8217;ve lost some enthusiasm for <code>Import-Package</code>. All those different bundles and their dependencies are difficult enough to grasp for newcomers. <code>Require-Bundle</code> has better tooling support in Eclipse and less complexity in general&#8230; so I recommend to use <code>Require-Bundle</code> unless someone needs the improved flexibility of <code>Import-Package</code>.</p>
<p>What&#8217;s the reason for my attitude?</p>
<p>Recently I spent some time with a <a href="http://eclipsesource.com/blogs/2009/07/06/single-sourcing-webinar-rcp-and-rap/">single-sourcing</a> a <a href="http://www.eclipse.org/rap">RAP</a>/<a href="http://www.eclipse.org/rcp">RCP</a> project. Having different target platforms for the same bundles is a perfect example where you need the flexibility of <code>Import-Package</code>. Flexibility is good, right? So I went ahead and declared all dependencies as <code>Import-Package</code>.</p>
<p>Now imagine you have declared an <code>Import-Package</code> to the <code>org.eclipse.ui</code> bundle, being sure that org.eclipse.ui is exported in your target.</p>
<p>Everything is fine, right? So far so good in the typical Eclipse RCP case.</p>
<p>However, it&#8217;s not so fine if you try it with RAP although you&#8217;ll find that bundle <code>org.eclipse.rap.ui.workbench</code> exports the <code>org.eclipse.ui</code> package.</p>
<p>So the situation is:</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;">my.bundle imports org.eclipse.ui
org.eclipse.rap.ui.workbench exports org.eclipse.ui</pre></div></div>

<p>However, your bundle just won’t be resolved due to a missing <code>Import-Package</code> constraint on <code>org.eclipse.ui</code>.</p>
<p>The diagnostics in Equinox don’t help much either&#8230; it just tells you exactly the above imports and exports. I don&#8217;t know if there are better tools out there to diagnose issues.</p>
<p>The reason for this behavior is a concept in Java called <strong>split packages</strong>. It allows the same package to be declared across several bundles&#8230; giving each split a special name. So it’s something like a sub-package concept for packages. Although it is discouraged in the OSGi specification&#8230; it is used by the Eclipse workbench and other areas where there has been a lot of refactoring and <code>Require-Bundle</code> usage.</p>
<p>The correct import declaration in my.bundle would be</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;">Import-Package: org.eclipse.ui; ui.workbench=&quot;split&quot;</pre></div></div>

<p>Why does it work in the RCP target case? </p>
<p>It wouldn’t if your target platform contains RCP only. However, most RCP applications have the bundle <code>org.eclipse.ui.ide</code> in their target platform which exports another split of the <code>org.eclipse.ui package</code>. OSGi only resolves split packages if at least two exported split packages can be found.</p>
<p>Knowing this&#8230; I now can safely use <code>Import-Package</code> for my single-sourced applications. However, I don’t see a way how I possibly could recommend this to students in my training courses or new people to OSGi in general. I’d need to tell them “Look, <code>Require-Bundle</code> is something that has been used in Eclipse for awhile, mostly for legacy reasons. We don’t recommend its use any more. <code>Import-Package</code> is better if you want looser coupling between bundles. However, be aware of the pain split packages can cause.&#8221;</p>
<p>I guess my gripe is that split packages make things complicated and we need better tooling to support them.</p>
<p>How are other people handling split packages in the wild?</p>
]]></content:encoded>
			<wfw:commentRss>http://eclipsesource.com/blogs/2009/07/14/why-i-cant-recommend-using-import-package/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
	</channel>
</rss>

