tag:blogger.com,1999:blog-88783601872922052362024-03-05T08:22:53.881+01:00@eclipsophyWhat I find out about eclipse while developing and maintaining specialist RCP applications and contributing to Mylyn.Maarten Meijerhttp://www.blogger.com/profile/05900699818398561644noreply@blogger.comBlogger44125tag:blogger.com,1999:blog-8878360187292205236.post-87316623341509716122015-07-15T11:40:00.001+02:002015-07-15T11:52:38.770+02:00Customizing Eclipse name on Mac OSX<img style="display:block; margin-left:auto; margin-right:auto;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj2mY3UkzacLaBDWep9bEFX9o2YzgibgvyzkJgAewIVrAccclSC7417_10A0N8muhrkqtmfaelWhNgZWLFHUM2TTcKBnxiulY_6hTEb3PTQp8vAcVs7jm_SXtdX-Qeamt9Zd0AlP0U_Gxo/?imgmax=800" alt="Eclipse Force Quit 1" title="Eclipse Force Quit 1.png" border="0" width="100%" height="auto" />
<p>How many times when you have multiple instances of Eclipse open and you want to Force Quit one, you don't know which one it is after pressing <strong>CMD-ALT-ESC</strong>? You can change the name in the task switcher by renaming the Eclipse application in the Applications folder, but the menu name comes from somewhere else. Below I will explain how to change the menu name.</p>
<h2>Step 1: Locate the eclipse.ini file</h2>
<img style="display:block; margin-left:auto; margin-right:auto;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJ1VAD9dsy5HTUX5Jk0ZUtGfMqukFJDyghU49TIEC5E13ArRM3W5PxVCy_Pv0oPYxUdaEmys1hkljV5YJSzcexN76tNKLIbcYIMRVZ1VBANgcr6DPEgvm5Zr-Vp9uLUt1cQQEcJUJ8LrY/?imgmax=800" alt="Eclipse ini location" title="Eclipse.ini location.png" border="0" width="100%" height="auto" />
<p>Find the Eclipse application int he Applications folder and do a right-click or ctrl-click and choose <strong>Show Package Contents</strong>.
Then move into the <strong>Contents/Eclipse</strong> folder and find <strong>eclipse.ini and open it using a text editor such as BBEdit.</strong></p>
<h2>Step 2: Adding the desired name</h2>
<img style="display:block; margin-left:auto; margin-right:auto;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-PranlIaVJg1NFRE5BQKptYyc_cur9BVwa96LpAQJi2zZ7XqETi2mN32gKwaL4L0hWU3BmiL4Fh49lrJJbkDO6dZbDwLRCmFTq9czAAKd9tw0XNc049hTiaES5CZWQ-suT5ym0qAW8x8/?imgmax=800" alt="Eclipse ini 1" title="Eclipse.ini 1.png" border="0" width="100%" height="auto" />
<p>Oops, there appear to be many duplicate lines here resulting from an automated build process. No worry, I opened <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=472698" target="_blank">Bug 472698</a> for this. Using the BBEdit <strong>Text / Process Duplicate Lines...</strong> command I removed all leaving one.</p>
<img style="display:block; margin-left:auto; margin-right:auto;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhA2ut-fHA1UCOosPAjfH5Zhyphenhyphend9K9ezfXP1gLY1jrkCBbqiUPp9Y301CX2QlD7b6zt0NQMhdR8dW7FHjNDNedwq8_8nOcu0o7G9nE1-Fhb73pPf2qfVM68EXCaKCZS2_oi3ESVtl0qOlL4/?imgmax=800" alt="Eclipse ini 2" title="Eclipse.ini 2.png" border="0" width="100%" height="auto" />
<p>Now we add a line in the <code>-vmargs</code> section with <code>-Xdock:name=Eclipse 45 RCP</code> and save the file.</p>
<h2>Step 3 Verify</h2>
<img style="display:block; margin-left:auto; margin-right:auto;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_RTOBglUXJt3xqN4mClKMrtH0lKYn7d9SX64GWmJzZO5uuSHA5vz0SfKQMEWtfq5RB5TO_VtpWd-YNjD1jvXNAO4Va64YLdME8NpLsRrkLfZ-KykPIG2INiLVNeocB6MlYet2pb9qUfo/?imgmax=800" alt="Eclipse Menu Bar" title="Eclipse Menu Bar.png" border="0" width="100%" height="auto" />
<p>Restarting Eclipse will show the new name in the Menu bar, very handy when <strong>ALT-TAB</strong>-ing through open applications.</p>
<img style="display:block; margin-left:auto; margin-right:auto;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZvhRzr8I9hMlexmws3ALZyBjsXP3nL_UJ45rPYMvV9PWMNKh5g-A6Zoytq3OvL-D3G0Ggndn2Gl79h58cBDamag1dZCayppArLCNwrh9iML6M55RyO4qXNfyb5wIMnWEHILa3l5x-TvQ/?imgmax=800" alt="Eclipse Force Quit 2" title="Eclipse Force Quit 2.png" border="0" width="100%" height="auto" />
<p>When using <strong>CMD-ALT-ESC</strong> the new name now appears in the list.</p>Maarten Meijerhttp://www.blogger.com/profile/05900699818398561644noreply@blogger.com0tag:blogger.com,1999:blog-8878360187292205236.post-69559382121319559042015-05-08T12:47:00.000+02:002015-06-03T09:10:39.161+02:00Using JYZ3D (and JOGL) in Eclipse RCP<p>As part of evaluating several 3D charting packages for use in Eclipse RCP Applications I needed to get JYZ3D (<a href="http://www.jyz3d.org" target="_blank">http://www.jyz3d.org</a>) working on OSX.</p>
<blockquote>Jzy3d is an open source java library that allows to easily draw 3d scientific data: surfaces, scatter plots, bar charts, and lot of other 3d primitives. The API provides support for rich interactive charts, with colorbars, tooltips and overlays. Axis and chart layout can be fully customized and enhanced.
Relying on JOGL 2, you can easily deploy native OpenGL charts on Windows, Unix, MacOs (...) and integrate into Swing, AWT, or SWT. Various contributions have also made Jzy3d available for other languages/platforms such as Scala, Groovy, and Matlab.
</blockquote>
<p>JYZ3D is described as suitable for RCP but it requires some setup. I describe the process below in order to help others get results quicker.</p>
<h2>First attempt</h2>
<p>
Using libraries in RCP requires packaging them in bundles and adding an OSGi MANIFEST so that they can be properly located as dependencies.
As JYZ3D requires JOGL (<a href="http://jogamp.org/jogl/www/" target="_blank">http://jogamp.org/jogl/www/</a>) I looked for ways to install JOGL easily on RCP, by converting it to a bundle.
I found the <a href="https://wadeawalker.wordpress.com/2010/10/09/tutorial-a-cross-platform-workbench-program-using-java-opengl-and-eclipse/" target="_blank">tutorial by Wade Walker from 2010</a> that can easily be adapted to the latest version of JOGL meaning 2.3.1.
</p><p>The first attempt resulted in a Exception:
<code>java.lang.UnsatisfiedLinkError: Can't load library: /System/Library/Frameworks/gluegen-rt.Framework/gluegen-rt</code>
</p>
<img style="display:block; margin-left:auto; margin-right:auto;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiPn6GTZy2NUPEUh-3iWaOqKYQmmA_LjiW3EJrmEmrBWAxuck0tXbB5V1kKqIh939YoqJWVAV3-bTIz7cyztJIyL4ByHnLD2Mbr2x9oBP7RXBOFr66Fq_H8bWkCVPX3wCXlb_gmVtHg7E0/?imgmax=800" alt="UnsatisfiedLinkError" title="UnsatisfiedLinkError.png" border="0" width="100%" /><p>As JOGL uses some interesting class loader tricks, the main library requires an Activator to insert some extra logic on start up using <code>JarUtil.setResolver()</code>.</p>
<p>The resulting <code>Activator.java</code> is as follows:
</p><pre class="brush: java;">
package jogamp.osgi;
import java.io.IOException;
import java.net.URL;
import jogamp.nativewindow.Debug;
import org.eclipse.core.runtime.FileLocator;
import org.eclipse.swt.awt.SWT_AWT;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;
import com.jogamp.common.util.JarUtil;
/**
* The activator class controls the plug-in life cycle
*/
public class Activator extends AbstractUIPlugin {
// The shared instance
private static Activator plugin;
/**
* Returns the shared instance
*
* @return the shared instance
*/
public static Activator getDefault() {
return plugin;
}
/**
* The constructor
*/
public Activator() {
}
@Override
public void start(BundleContext context) throws Exception {
super.start(context);
JarUtil.setResolver(new JarUtil.Resolver() {
@Override
public URL resolve(URL url) {
try {
// System.out.println("before resolution: " + url.toString());
URL after = FileLocator.resolve(url);
// System.out.println("after resolution: " + after.toString());
return (after);
} catch (IOException ioexception) {
return (url);
}
}
});
plugin = this;
}
@Override
public void stop(BundleContext context) throws Exception {
plugin = null;
super.stop(context);
}
}
</pre>
<p>There was a change in the native code library naming conventions from Java 6 to Java 7 so you must unpack the *macosx-universal jars (jogl and gluegen), duplicate al *.jnilib files to *.dylib files and repack into the jars.
</p>
<p>Once you have done this you can run Wade Walker's example view code.
</p>
<img style="display:block; margin-left:auto; margin-right:auto;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlE97TGY3O7drP8Ba53FOA5DjO2V8diSmKwbrRxJfzNH_gtXLbcTFHwwynwfxzKQ8-88hyphenhyphenBREgLJQ17tUlLppEcLW8bOBY3Amm3_UNaCDeMvI1uSSNKnmnamrKenKSZRtG-6umM5jP4-U/?imgmax=800" alt="JOGL Demo Wade Walker" title="JOGL-demo.png" border="0" width="100%" />
I then downloaded jars for JZY3D 0.9.1 from Maven and created a bundle using Create Bundle from jar.
<p>The result was a lot of errors about package <code>javax.media.opengl</code> not being found. JXY3D relies on a much older version of JOGL and despite it being a 2.x.x. version there is definitely a compatibility break here. So much for the adoption of proper <a href="http://semver.org" target="_blank">semantic versioning</a>.
</p>
<h2>Second attempt</h2>
<p>I downloaded the source for JXY3D from GitHub from <a href="https://github.com/jzy3d/jzy3d-api" target="_blank">https://github.com/jzy3d/jzy3d-api</a> importing them as Maven projects (important step) and built the jars as Maven projects.
</p>
<p>These depend on a newer version of JOGL (2.1.5-01) but having learned my lesson about version compatibility I created new JOGL Library plugin using the jars for version 2.1.5-01. I downloaded these from Maven Central. Again fix the native library naming issue for macosx-universal versions.
</p>
<p>The mechanism for finding the natives changes between JOGL versions, so here the solution is to put all native jars into the same bundle as the main library.
Again add the above bundle activator, and, as this is a bundle with native jars in the root, add the bin/ folder with the Activator to the class path.</p>
<p>Another problem (noted by Alexis Drogoul) is a bug in <code>FileLocator</code> that occurs when the path contains spaces. This was also fixed on 2015-06-03</p>
<img style="display:block; margin-left:auto; margin-right:auto;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgs3igbeQhphJ_nofcxjPnd8LMA-dfX1ZQ2-1rfQJ1LhnZTu_ifL1vJ8bJZLS2PVDcoSs8hiHBmc3EDGhId1-QlTg83QzdOfS8Lm4nS6vaKDRM8foNbMzOYYM1zbNOfYVa_G9rXDntulF4/?imgmax=800" alt="classpath" title="classpath.png" border="0" width="100%" /><p>The final error purely on OSX was <code>org.eclipse.swt.SWTError: Not implemented
java.lang.ClassNotFoundException: apple.awt.CEmbeddedFrame</code>>
This can be solved using the magic found on stackoverflow:
<code>SWT_AWT.embeddedFrameClass = "sun.lwawt.macosx.CViewEmbeddedFrame";</code>
</p>
<p>The final <code>Activator.java</code> is as follows:
</p><pre class="brush: java;">
package jogamp.osgi;
import java.io.IOException;
import java.net.URL;
import jogamp.nativewindow.Debug;
import org.eclipse.core.runtime.FileLocator;
import org.eclipse.swt.awt.SWT_AWT;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;
import com.jogamp.common.util.JarUtil;
/**
* The activator class controls the plug-in life cycle
*/
public class Activator extends AbstractUIPlugin {
// The shared instance
private static Activator plugin;
/**
* Returns the shared instance
*
* @return the shared instance
*/
public static Activator getDefault() {
return plugin;
}
/**
* The constructor
*/
public Activator() {
}
@Override
public void start(BundleContext context) throws Exception {
super.start(context);
if ("Mac OS X".equals(System.getProperty("os.name"))) {
System.out.println("Set SWT_AWT.embeddedFrameClass");
SWT_AWT.embeddedFrameClass = "sun.lwawt.macosx.CViewEmbeddedFrame";
}
JarUtil.setResolver(new JarUtil.Resolver() {
@Override
public URL resolve(URL url) {
try {
// System.out.println("before resolution: " + url.toString());
URL urlUnresolved = FileLocator.resolve(url);
URL urlResolved = new URI(urlUnresolved.getProtocol(), urlUnresolved.getPath(), null)
.toURL();
// System.out.println("after resolution: " + urlResolved.toString());
return (urlResolved);
} catch (IOException ioexception) {
return (url);
} catch (URISyntaxException e) {
return (url);
}
}
});
plugin = this;
}
@Override
public void stop(BundleContext context) throws Exception {
plugin = null;
super.stop(context);
}
}
</pre>
<p>And then I can also run the example code for JYZ3D.
</p>
<img style="display:block; margin-left:auto; margin-right:auto;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj5XbZOezWo3qTZV4vSwL9lOxRQeXI2HRYAo5YBK1V7wV0M2qS_VIiWY5RVgvHauPi8dyaBKfx51kyYV76q7oQWcRULA1Aojm42REnl20-Wg5p_OrAa718Q3lL7T6T651-JwTpeJn8uPPs/?imgmax=800" alt="JYZ3D demo" title="jyz3d.png" border="0" width="100%" />
<h2>Lessons</h2>
<ul>
<li>Don't assume that everybody uses semantic versioning.</li>
<li>Be grateful for the people who take the time to answer questions on StackOverflow.</li>
</ul>Maarten Meijerhttp://www.blogger.com/profile/05900699818398561644noreply@blogger.com0tag:blogger.com,1999:blog-8878360187292205236.post-53148042513491151102014-06-10T21:21:00.001+02:002014-06-10T21:23:10.369+02:00Workspace Mechanic and Eclipse Arduino PluginAfter reading Wim Jongmans blog post about <a href="http://industrial-tsi-wim.blogspot.nl/2013/12/manage-your-eclipse-preferences-with.html">Managing Eclipse Preferences with Workspace Mechanic</a> I decided to give it a go for the <a href="http://www.baeyens.it/eclipse/">Arduino Eclipse Plug-in</a> by Jantje.
The settings for this plug-in are managed as instance settings, so they exist once for the Eclipse install. Now that we have regular upgrades to prepare for the Eclipse Luna release, this means reconfiguring for each new download.
I use a Mac so it has to look like this:<img style="display:block; margin-left:auto; margin-right:auto;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhpQDqpuEig_M__c7pYsdOqC-iCudPdsgP-dD-KbCJTG5BF0x4u23AdXjhl2kmXAz5iZXjkSvNeQm18IHGgHTn2qRDel8_nVRUP8dlB3lQ8vWU1B16TibnxrGBR2K-QqNOe4HyWyO2Dxs8/?imgmax=800" alt="Screen Shot 2014 06 10 at 21 14 48" title="Screen Shot 2014-06-10 at 21.14.48.png" border="0" width="100%" />
To make this happen with Workspace Mechanic install this file in your <code>user_home/.eclipse/mechanic/</code> folder.
<pre>
# @title Arduino Mac
# @description Standard Arduino Settings
# @task_type RECONCILE
#
# Copyright 2014 Maarten Meijer
# License EPL: http://www.eclipse.org/legal/epl-v10.html
#
file_export_version=3.0
/instance/it.bayens.arduino/Arduino Path=/Applications/Arduino.app/
/instance/it.bayens.arduino/Private Library Path=/Users/your_name/Documents/Arduino/libraries
/instance/it.bayens.arduino/Private hardware Path=/Users/your_name/Arduino/hardware
/instance/it.bayens.arduino/Arduino DisAbleRXTX=false
</pre>
Every new release you will; get a nice Workspace Mechanic warning and you can fix all! Maarten Meijerhttp://www.blogger.com/profile/05900699818398561644noreply@blogger.com0tag:blogger.com,1999:blog-8878360187292205236.post-69320098834104745492014-01-21T12:36:00.001+01:002014-02-12T22:56:38.469+01:00Tycho/JUnit/Jacoco for the Industrial SQL Connector for Mylyn<img style="display:block; margin-left:auto; margin-right:auto;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhbs8bihJZpB__HleqI1QZruC85tf7c43AOncKAWEXapklGPJbovCL5VptjlvlyWCMJP7Nuz3wwFpfOwQmo3HltlPcHvLJJXifHRkMqfYkjbyxNV2BflgHkWqF2JP2MWg-58LSkLijNAHA/?imgmax=800" alt="Technicaldebt" title="technicaldebt.png" border="0" width="100%" />
In the previous installments I created a repeatable Maven build from Hudson, and I set up static code analysis using SonarQube. It was revealed that there is considerable technical debt, and half of that is caused by 0% Coverage.
Getting Test Coverage in place has to be done before tackling any of the other issues like duplication, complexity and violations.
<h4>Project Setup</h4>
<img style="display:block; margin-left:auto; margin-right:auto;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJesB2E3LcFd6TGpgJjpYdu_Wr7_9d3EyVL9GbMD41IWMCMLQldV4xyuPouFEVy1oOEK3XOg5YpkuYl1inPOqrpILPa8UA5f9PkRvYSJrbGPkNWaMcgGPFbww01S0a8fACC5nXrJD8Wcc/?imgmax=800" alt="Industrial projects" title="industrial-projects.png" border="0" width="100%" />
The Project setup for the Industrial SQL Connector for Mylyn is slightly different from other examples found on the internet.
The main abstract functionality is handled in the main two plugins:
<ul><li><code>com.industrialtsi.mylyn.core</code> for headless stuff and connection handling, and</li><li><code>com.industrialtsi.mylyn.ui</code> for the UI part.</li></ul>
Functionality for a specific kind of database is then "injected" using a fragment project. Three example projects are included:
<ul>
<li><code>com.industrialtsi.mylyn.demo.memory</code> is a very simple in memory task list for demonstration and testing purposes.</li>
<li><code>com.industrialtsi.mylyn.demo.jpa</code> accesses a simple Derby database but using EclipseLink JPA annotations</li>
<li><code>com.industrialtsi.mylyn.demo.derby</code> contains a link to a Derby database using the apache ibatis xml based SQL access language, that will allow quite complicated JOIN and UNION statements in its queries.</li>
<li><code>org.apache.ibatis</code> finally contains the ibatis stuff packaged in a separate plugin.</li>
</ul>
All the test code for all these projects finally is placed in a single plugin:
<ul><li><code>com.industrialtsi.mylyn.tests</code> contains al test code.</li>
</ul>
<h4>Getting the test code to compile under Tycho</h4>
<img style="display:block; margin-left:auto; margin-right:auto;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg6MPh9k85dcUnRwEjFNF_HisTStoy-qARg8ZIKaXh-g1EBcx5LhiDZia50k2gY2X4388gTMgPWb-0KIinAkt-SeHzUdtomBGPFNd62C-VkJUDK_mfK4qi5Y1oRoxjVjnZ0qElmFJ-DeKQ/?imgmax=800" alt="Industrial test in pom" title="industrial-test-in-pom.png" border="0" width="100%" />
The first step is to add the test project to the main POM in <code>industrialtsi.mylyn.maven</code>.
When we run a simple maven build compilation fails:
<pre class="brush:plain;">
[ERROR] Failed to execute goal org.eclipse.tycho:tycho-compiler-plugin:0.19.0:compile (default-compile) on project com.industrialtsi.mylyn.tests: Compilation failure: Compilation failure:
[ERROR] /Users/maarten/Workspaces/workspace-industrial-google/com.industrialtsi.mylyn.tests/src/com/industrialtsi/mylyn/demo/derby/test/DerbyIbatisPersistorTest.java:[18]
[ERROR] import com.industrialtsi.mylyn.core.persistence.DerbyIbatisPersistor;
[ERROR] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[ERROR] The import com.industrialtsi.mylyn.core.persistence.DerbyIbatisPersistor cannot be resolved
[ERROR] /Users/maarten/Workspaces/workspace-industrial-google/com.industrialtsi.mylyn.tests/src/com/industrialtsi/mylyn/demo/derby/test/DerbyIbatisPersistorTest.java:[43]
[ERROR] return new DerbyIbatisPersistor();
[ERROR] ^^^^^^^^^^^^^^^^^^^^
[ERROR] DerbyIbatisPersistor cannot be resolved to a type
[ERROR] 2 problems (2 errors)
</pre>
When compiling in the workspace, eclipse is very helpful in finding all the needed dependencies.
As the missing import is located in a fragment of another plugin, normal dependency tricks via the MANIFEST.MF of <code>com.industrialtsi.mylyn.tests</code> or as dependency in the POM file don't work.
<img style="display:block; margin-left:auto; margin-right:auto;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgCmKdY8pPbEsQTXsrUV-6p_7nWKqQLta9jWZ7F4VU4bXS16xqSeBiMjREw-4IQdCxg0yB10_1jCzuqh6rKC1xiMWSh9kg353nA7EC8E11sFoc4X1zX_HZDoK25Exjrjcf4v2p7v9FjhP4/?imgmax=800" alt="Add to build properties" title="add-to-build.properties.png" border="0" width="100%" />
The quick solution was to include the missing jar as <em>Extra Classpath Entry</em> in the <code>build.properties</code> of <code>com.industrialtsi.mylyn.tests</code>. If anybody knows a better way, please let me know!
<h4>Adding <code>tycho-surefire</code> to <code>pom.xml</code></h4>
Next we need to configure the tycho surefire plugin to run the tests and process the results.
I'm can rely on the <code>tycho-surefire</code> plugin to load my tests plugin and its direct dependencies.
But I want to run a full workbench which I define with the <code><application></code> and <code><product></code> tags. I also want the <code>com.industrialtsi.mylyn.demo.memory</code> and <code>com.industrialtsi.mylyn.demo.derby</code> fragments to be loaded, which I do with the <code><dependencies></code> section. Then I disable the more complicated test till later.
<pre class="brush:xml">
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-surefire-plugin</artifactId>
<version>${tycho-version}</version>
<configuration>
<argLine>${ui.test.vmargs}</argLine>
<useUIHarness>true</useUIHarness>
<useUIThread>true</useUIThread>
<product>org.eclipse.platform.ide</product>
<application>org.eclipse.ui.ide.workbench</application>
<dependencies>
<dependency>
<type>eclipse-plugin</type>
<artifactId>com.industrialtsi.mylyn.demo.memory</artifactId>
<version>0.9.10</version>
</dependency>
<dependency>
<type>eclipse-plugin</type>
<artifactId>com.industrialtsi.mylyn.demo.derby</artifactId>
<version>0.9.10</version>
</dependency>
</dependencies>
<includes>
<include>**/*Test.java</include>
</includes>
<excludes>
<exclude>**/IbatisPersistorTest.*</exclude>
<exclude>**/PersistorsManagerTest.*</exclude>
<exclude>**/DemoDerbyTest.*</exclude>
<exclude>**/DerbyIbatisPersistorTest.*</exclude>
<exclude>**/IbatisCorePluginTest.*</exclude>
<exclude>**/TaskCreationTest.*</exclude>
</excludes>
<!-- Kill test JVM if tests take more than 10 minutes (600 seconds)
to finish -->
<forkedProcessTimeoutInSeconds>600</forkedProcessTimeoutInSeconds>
</configuration>
</plugin>
</pre>
<h4>Controlling memory and start Thread on Mac</h4>
Running on a Mac requires different startup parameters passed with the <code><argLine></code> tag.
This is handeld best in the profiles section of the POM:
<pre class="brush:xml">
<profiles>
<profile>
<id>macosx</id>
<activation>
<os>
<family>mac</family>
</os>
</activation>
<properties>
<ui.test.vmargs>-Xmx512m -XX:MaxPermSize=256m -XstartOnFirstThread</ui.test.vmargs>
</properties>
</profile>
<profile>
<id>other-os</id>
<activation>
<os>
<family>!mac</family>
</os>
</activation>
<properties>
<ui.test.vmargs>-Xmx512m -XX:MaxPermSize=256m</ui.test.vmargs>
</properties>
</profile>
</profiles>
</pre>
<h4>ready to run the tests in the workspace</h4>
<img style="display:block; margin-left:auto; margin-right:auto;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmKOiAO3Ybbl6EuUUYfaZNUWTaipqdL_l3Ia86E34FbGJFo0eaekde1xnycn3YmXyZrj5gLq8PT6y_0byvQG9SshoqP3ojEJrryNCkyHbOtYWsiKmsJfldgRlDRMa2FqYj_PhGfO1l0Eo/?imgmax=800" alt="Industrial maven" title="industrial-maven.png" border="0" width="100%" />
Then we need to run a Tycho build using the m2e tools. It is important to realize that Plug-in Unit Tests are run in the integration test phase, so we need to specify that as a target.
<pre class="brush:plain;">
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running com.industrialtsi.mylyn.core.dto.IndustrialQueryParamsTest
Tests run: 16, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.039 sec
Running com.industrialtsi.mylyn.test.db.core.GenericQueryParamsTest
Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.01 sec
Results :
Tests run: 23, Failures: 0, Errors: 0, Skipped: 0
[INFO] All tests passed!
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] com.industrialtsi.mylyn.maven ..................... SUCCESS [0.073s]
[INFO] org.apache.ibatis ................................. SUCCESS [1.477s]
[INFO] com.industrialtsi.mylyn.core ...................... SUCCESS [1.605s]
[INFO] com.industrialtsi.mylyn.demo.memory ............... SUCCESS [0.386s]
[INFO] com.industrialtsi.mylyn.ui ........................ SUCCESS [0.997s]
[INFO] com.industrialtsi.mylyn.feature ................... SUCCESS [2.616s]
[INFO] com.industrialtsi.mylyn.demo.derby ................ SUCCESS [0.685s]
[INFO] org.apache.ibatis.feature ......................... SUCCESS [2.321s]
[INFO] com.industrialtsi.mylyn.demo.derby.feature ........ SUCCESS [2.329s]
[INFO] com.industrialtsi.mylyn.demo.jpa .................. SUCCESS [1.254s]
[INFO] com.industrialtsi.mylyn.demo.jpa.feature .......... SUCCESS [2.399s]
[INFO] com.industrialtsi.mylyn.site ...................... SUCCESS [3.129s]
[INFO] com.industrialtsi.mylyn.tests ..................... SUCCESS [7.804s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 57.488s
[INFO] Finished at: Tue Jan 21 11:33:31 CET 2014
[INFO] Final Memory: 59M/554M
[INFO] ------------------------------------------------------------------------
</pre>
<h4>Adding Jacoco coverage to the <code>pom.xml</code></h4>
Lets start with adding the Jacoco plugin to the POM file.
<pre class="brush: xml">
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.6.4.201312101107</version>
<executions>
<execution>
<id>prepare-integration-tests</id>
<phase>pre-integration-test</phase>
<goals>
<goal>prepare-agent</goal>
</goals>
<configuration>
<include>com.industrialtsi.*</include>
<include>org.junit.*</include>
<!-- Where to put jacoco coverage report -->
<destFile>${sonar.jacoco.reportPath}</destFile>
<append>true</append>
</configuration>
</execution>
</executions>
</plugin>
</pre>
Configuring a multi-module plugin project for coverage with Jacoco has some special hurdles which easily lead to frustration.
All coverage code must be placed in a single <code>*.exec</code> file to analyzed later, this is handled by the <code><destFile>${sonar.jacoco.reportPath}</destFile></code> line. This property is defined in the properties section:
<pre class="brush: xml">
<sonar.jacoco.reportPath>${project.build.directory}/../../com.industrialtsi.mylyn.tests/target/jacoco.exec</sonar.jacoco.reportPath>
</pre>
Tycho has a special <code>argline</code> variable to pass to the tycho-surefire plugin named <code>tycho.testArgLine</code> that we must pass on in the tycho-surefire plugin:
<pre class="brush: xml;hilite:4">
<artifactId>tycho-surefire-plugin</artifactId>
<version>${tycho-version}</version>
<configuration>
<argLine>${ui.test.vmargs} ${tycho.testArgLine}</argLine>
</pre>
<img style="display:block; margin-left:auto; margin-right:auto;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgLor2E-xpqs9G_udM4GEFRWf-foFl-ODgVZ3tPY-imKV_RL4Qd6bM5jTAE5ucklhEOWdgGA3hV_g9-3Vi1k95yF1Lbgl51sqVVj3S_awh_lkouXI86KWExxvjxcmcB6wzgsedwpfZxYck/?imgmax=800" alt="Jacoco exec generated" title="jacoco.exec-generated.png" border="0" width="100%" />
Now we can run again and get to see that <code>jacoco.exec</code> is actually generated in the workspace.
We can now run the unit tests from the test plugin and measure code coverage with jacoco from a maven build.
<h4>not to be forgotten: SonarQube setup</h4>
We are running SonarQube from Hudson using the <em>Run Standalone Sonar Analysis</em> build step.
We want that analysis to reuse the <code>jacoco.exec</code> file generated during the maven integration-test step.
The standalone step uses sonar-project.properties for configuration. So we add:
<pre class="style:plain;">
sonar.dynamicAnalysis=reuseReports
sonar.jacoco.reportPath=../com.industrialtsi.mylyn.tests/target/jacoco.exec
</pre>
If we had run SonarQube from maven using the sonar:sonar or verify targets, we should configure sonar in the pom.xml.
<pre class="brush: xml">
<properties>
...
<sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>
<sonar.dynamicAnalysis>reuseReports</sonar.dynamicAnalysis>
...
</properties>
</pre>
I do both know that I'm working on it so I have flexibility later.
<h4>Now commit to SCM and start a Hudson build</h4>
Start a Hudson build manually or wait for SCM polling to kick in, but the result looks promising:
<img style="display:block; margin-left:auto; margin-right:auto;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgK54zoBlN74hpIq1k-_2CEOxgACYX65IplLnMOIomWkwGCJMj01h1iD5khRJYTTtNLqGOHEevyl-UWbB0x-TuSly71b6zqeTn5ycqyVa9aS6gV8V9ZsRbb76wVLa6XvI96v0cLsT4nQkY/?imgmax=800" alt="Hudson build w coverage" title="hudson-build-w-coverage.png" border="0" width="600" height="27" />
3.63% Coverage is not much, but easy to expand now that this works.
<h4>Finally: results in SonarQube</h4>
<img style="display:block; margin-left:auto; margin-right:auto;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNnqFgfHxZORwdu42bLAi8PqaTSUAVi6tNFFgwKUhyZ8EuHCOXX5qZdIXBPwj9iz5OL8sfirjSbCKgI6QlDmmJP5GU7l8VV-KM7rrNR8iJkW4WZLrFV8u78a9P1iDCZbApRU7sNV5Akv0/?imgmax=800" alt="Technical debt improved" title="technical-debt-improved.png" border="0" width="100%" />
I managed to reduce Technical Debt with $ 390 and one man day compared to the start of this blog post. Seems like a low yield for a half day work, but I guess the calculations do not allow for the ramp up cost: running the first coverage is hardest. Progress should be easier now that the build and static analysis infrastructure is in place.
<img style="display:block; margin-left:auto; margin-right:auto;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEggTsQT86GXfMyfihbExaL2cBYhGmn2pkcGNeLDQq8A83hvdxeHFNtmmfueOjyGU9Z1vuoAnawlaSEZVxLxqNVKXSHEGCMTOAgf39mtOnmaHfMNUUhAwsIgGPAm-uzI-6ykPhsYoLRXoog/?imgmax=800" alt="Code coverage up" title="code-coverage-up.png" border="0" width="100%" />
Unit Test Coverage is up from 0% with only the two simplest tests executing.
Next steps are activating the tests disabled earlier and adding more test.
To be continued...
Maarten Meijerhttp://www.blogger.com/profile/05900699818398561644noreply@blogger.com0tag:blogger.com,1999:blog-8878360187292205236.post-76712872929774870852014-01-20T13:04:00.000+01:002014-02-12T22:54:18.576+01:00Analyzing the Industrial SQL Connector for Mylyn with SonarQubeLast year we set up Hudson to build the Industrial SQL Connector for Mylyn, a DIY connector project to connect Mylyn to a local SQL database for which I'm a committer. This blog post I will explain how I set up static code analysis on the same project using SonarQube. Installing and setting up SonarQube is better explained elsewhere, like http://www.sonarqube.org, but then setting up a set op eclipse plugin projects to be analyzed is more specific.
<h4>Preparation:</h4>
<ul><li>Install SonarQube following instructions <a href="http://docs.codehaus.org/x/yoHEBg">here</a>.</li>
<li>Then install the Sonar plugin into Hudson using Update Center and configure it following <a href="http://docs.codehaus.org/x/5qC7DQ">these instructions</a></li>
<li>Lookup how to build the Industrial SQL Connector for Mylyn with Hudson <a href="http://bit.ly/16gLCmi">here</a></li>
</ul>
<h4>Configuring the Industrial SQL Connector for Mylyn for analysis</h4>
Whether you want to analyze projects with the Maven <code>sonar:sonar</code> target or use the Hudson <em>Invoke Standalone Sonar Analysis</em> build step in both cases you need to create a <code>sonar-project.properties</code> file.
As a matter of common sense I always put this file in the same project as the project with the maven master POM, in this case <code>com.industrialtsi.mylyn.maven</code>.
<pre class="brush : shell">
# required metadata
sonar.projectKey=com.industrialtsi.mylyn
sonar.projectName=Industrial SQL Connector for Mylyn
sonar.projectVersion=0.9.10-SNAPSHOT
# optional description
sonar.projectDescription=Industrial SQL Connector for Mylyn
# path to source directories (required)
#sonar.sources=src THIS IS SPECIFIED PER MODULE
# path to project binaries (optional), for example directory of Java bytecode
#sonar.binaries=target/classes THIS IS SPECIFIED PER MODULE
# optional comma-separated list of paths to libraries. Only path to JAR file is supported.
#sonar.libraries=lib/*.jar THIS IS SPECIFIED PER MODULE
# The value of the property must be the key of the language.
sonar.language=java
# modules one for each area of functionality, only plugin and fragment projects
sonar.modules=core,derby,jpa,memory,ui
# setup project base dir
core.sonar.projectBaseDir=com.industrialtsi.mylyn.core
derby.sonar.projectBaseDir=com.industrialtsi.mylyn.demo.derby
jpa.sonar.projectBaseDir=com.industrialtsi.mylyn.demo.jpa
memory.sonar.projectBaseDir=com.industrialtsi.mylyn.demo.memory
ui.sonar.projectBaseDir=com.industrialtsi.mylyn.ui
#set up source folders
core.sonar.sources=src
derby.sonar.sources=src
jpa.sonar.sources=src
memory.sonar.sources=src
ui.sonar.sources=src
# set up binary folders
core.sonar.binaries=target/classes
derby.sonar.binaries=target/classes
jpa.sonar.binaries=target/classes
memory.sonar.binaries=target/classes
ui.sonar.binaries=target/classes
# set up libraries folders, where jars reside
core.sonar.libraries=
derby.sonar.libraries=lib/*.jar
jpa.sonar.libraries=lib/*.jar
memory.sonar.libraries=
ui.sonar.libraries=
</pre>
Then we commit this file to the repository so Hudson can retrieve it.
<h4>Configuring Hudson to analyze the project</h4>
We go to the Hudson Job tab and press configure. Under <em>Build</em> we add a step <em>Invoke Standalone Sonar Analysis</em> and configure it as follows:
<img style="display:block; margin-left:auto; margin-right:auto;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhF3m4U7LhuJv6TMJO7BZksjTA4iaf1LnqcpYez72WFF3KAY1XA8y1lsedP8We2h1YdYssM17WdlqZPeU5mw__NegR5gtF2bsgK2Hf2i2_kSjHWTOVptFAcxAgG5WWchbNjBDlLdJd1w2Q/?imgmax=800" alt="Sonar hudson config" title="sonar-hudson-config.png" border="0" width="100%" />
<h4>Building and examining the results</h4>
We make Hudson build the project and then go over to the SonarQube pages for the results, note that I have created a custom set of my favorite widgets for this:
<img style="display:block; margin-left:auto; margin-right:auto;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg9QJAAtR4SG5H2_v-Mn6yjJIJfJc8I19pgGQ-nkwAMNFGv4ODZQAZO9QYOxJ3B3hdLOgA3TExZDzxO-yUZ3JwSSe1hUiTIpU_4tiEe42eHQhNs7zcI4uzQ-6x9sM_UpRTEY4zbAbtNPE0/?imgmax=800" alt="Sonarqube 1" title="sonarqube-1.png" border="0" width="100%" />
The Technical Debt widget tell us the technical debt in days, and also a percentage split of the main problems.
Lack of coverage explains half the debt, with design, comments and complexity as other issues. There are very few violations and duplications, the happy result of running with Checkstyle, Findbugs and PMD inside Eclipse during the development.
I always add a <em>Most Violated Rules</em> widget to the project dashboard. Exposing internal representation is the most common here as the very bad package cycles.
<img style="display:block; margin-left:auto; margin-right:auto;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgabVnUGJcUBiaRELPvHeX0Yieut5c205hf9UFlej4C4W_u8C2Uby6XqrTieTsDWPAj2H-CUkByChKoCIdl3YFXZLTVJPdSepOvEW7GO6eKMohvvYAACVYw54L5JzvKlW6fn0GIULKHAYs/?imgmax=800" alt="Sonarqube 2" title="sonarqube-2.png" border="0" width="100%" />
The "Most Violated Resources" widget instantly tells me that the objects used to ferry query parameters around are the main problem area. I have a tagged sonar-project.properties file so I will be able to see progress in the future on lines of code, technical debt and documented API.
<img style="display:block; margin-left:auto; margin-right:auto;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhToyKai5ZMTucrsb-VBzYxcgGcx897Zds5-QPruisMp-CUsN_17IlP_QZTttfTpMd_h5-jtFGTLC2IlNRbVrN54M8i2AkTuaowx6p04MG2CTaXaoUFWrrwFiSBYI4FPwYaw4aUaX1-o9I/?imgmax=800" alt="Sonarqube 3" title="sonarqube-3.png" border="0" width="100%" />
Issues are mostly Critical and Major, so need to be fixed urgently. 1% duplications is not that serious, even though 0% is best of course. Test coverage is more serious as we've seen above that lack of Test Coverage accounts for half of technical debt. This maybe because the build is not yet configured to execute tests.
<img style="display:block; margin-left:auto; margin-right:auto;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEitEnaQ_qwx_Zy52IhFhlmEEH5VrpcmxOjICAtYGcPJAaefta3AKzj28hj7KktQlNROIYp0ZFubdzLkZdY9oNILOCHJ-ImBSEm1RRgfi9lB8KEJnTqArOMW62TcRf7t5sjAJ9yldirDuIo/?imgmax=800" alt="Sonarqube 4" title="sonarqube-4.png" border="0" width="100%" />
The complexity stats show mainly whether design is good, a method should do one thing, a class should have one responsibility. The LCOM4 measure of 1.0/class is quite positive.
<img style="display:block; margin-left:auto; margin-right:auto;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4O-sAlyB_AixybDjtEszOG-0at62sSRNQLt3wRP6F7RZ2-8fjbww9xwppwjYuWmn7OdUyEQ9q_8OaO00P_eFVKS91ce8DvafTwH6AjgDsoqm3dPP88ivRJ_Iwf6hbdqxRxyocObnoLqc/?imgmax=800" alt="Sonarqube 5" title="sonarqube-5.png" border="0" width="100%" />
The main problem in these is the startling 40.5% of package tangle index and more than 10 cycles!
This needs to be looked at with highest priority.
<h4>Action Plan</h4>
So this short exercise (total time to setup 1,5 hours) revealed quite a lot of <em>potential</em> problems in the code base! How then to tackle and resolve these problems?
<ol>
<li>Ensure that the unit tests are executed and measured! Without unit tests we cannot begin to refactor safely.</li>
<li>Fix the Critical Issues in the code, but only when adequately covered by unit tests</li>
<li>Investigate and fix the Package Cycles problems, but again only when adequately covered by unit tests</li>
<li>Fix the Major Issues in the code, but only when adequately covered by unit tests</li>
<li>Fix the Code Duplications problems</li>
</ol>
I will report on my findings here.
For unit test coverage I'm going to use <a href="http://bit.ly/KqcP3f">Jacoco</a>, which works well inside Eclipse using the Eclemma plugin, is preferred by SonarQube and can also be integrated with Tycho/Maven.Maarten Meijerhttp://www.blogger.com/profile/05900699818398561644noreply@blogger.com0tag:blogger.com,1999:blog-8878360187292205236.post-67577829658566859742013-08-22T11:53:00.001+02:002014-01-20T12:38:01.848+01:00Building the Industrial SQL Connector for Mylyn with Hudson<p>To get early warning when changes in Eclipse, Mylyn or EclipseLink break the build of Industrial SQL Connector for Mylyn, I have set up a build on my home Hudson CI server. When you want to use this connector you can do the same following the steps below.
</p>
<h4>Prerequisites</h4>
<p>You will need a Hudson CI server set up, follow instructions <a href="http://hudson-ci.org">here</a>.
You will also need maven installed from <a href="http://maven.apache.org">here</a> or use the integrated version.
</p>
<h4>Create a new Hudson Job</h4>
<p><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiy7GaV62SqMKdlIL4aoiOD4eIZlVsPDlZfiZ488IfWWUdJVB9kVcszXhaBeLc-RPiy4R6BTcMAVdWGXZJn-ul4oz5D3FGTmbXmhnlKL2aSq6L6KdpCGhiSHetn63WoHIodG8Ad6GhiUxw/?imgmax=800" alt="01 createjob" title="01-createjob.png" border="0" style="width: 100%;" />
</p>
<p>After pressing OK you will see:
</p>
<p><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhrP9v17IbWOVyH_zZ6qLVa7SjKTdzfO62gKTj1AuXPVXijK8irx2IeZnyKHq1Fv_7bwofrwrvaO1Afn4JG0TW5fZz4l83nb7pcMfdLx11MOcB_Fh2DgMTLDl666Qu4YIfmUw4lYHVinr0/?imgmax=800" alt="02 jobcreated" title="02-jobcreated.png" border="0" style="width: 100%;" /></p>
<h4>Configure and test SVN checkout</h4>
<p>Enter the anonymous SVN checkout url from <a href="http://code.google.com/a/eclipselabs.org/p/industrial-mylyn/source/checkout">EclipseLabs</a> : <a href="http://svn.codespot.com/a/eclipselabs.org/industrial-mylyn/trunk/"><code>http://svn.codespot.com/a/eclipselabs.org/industrial-mylyn/trunk/</code></a>. Also configure the build triggers, now set for 30 minutes past hour on weekdays. Can probably be less, but CI is supposed to be well <em>continuous</em>…
</p>
<p><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgE22xDTPcdE19d-Td1bFgYq_AnLKmZPSt3QgrhJF3xcfhpjfkWQ56yAQuGtrFXt2sjL851FJv39Vz6c2HnaIMtK1fczjKzfCNhXGBBiiv2HEVTZm8AS-T-_A1vlf7gGAc5Czesq9EWsB4/?imgmax=800" alt="03 configuresvn" title="03-configuresvn.png" border="0" style="width: 100%;" /></p>
<p>After saving this configuration, press <em>Build Now</em></p>
<p><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDvXzYBtisNJ0bOaolhvmRTI_bbFu6r7TtGfcCjd3ultWM590Gp-UowSU_KT1QGSXXdEPXY9BvaMsYAXIQzYtFIdYdop0BlEs9mEiVS4K4ujET9PzkbOFWxK49nT6JRilVIRjKI78vn4U/?imgmax=800" alt="04 testbuild" title="04-testbuild.png" border="0" style="width: 100%;" />
</p>
<p><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj0rdi0ikyzXnaOo5tufFvO7Li4pMbUnIadR58cx329_URi0Sn8VIWM8K8KKvp5I4pk1PsOmdRNOg_dtxziNm0VoxqBagdrRfgbGEWuJBlIo2s_cBLcf9w0gVuTERqYRMcT6dqcT4BH6-I/?imgmax=800" alt="05 allcheckedout" title="05-allcheckedout.png" border="0" style="width: 100%;" />
</p>
<p>When it's done, check the <em>Workspace</em>. It should look like this:</p>
<p><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4Qh_ARbWAdQm6FnhkBf8-GdCVUO0kW6_2tv1mJoeT4kdhVfFZUyll0a2IR_OkocfKz8mri-GJYTI8BN04G3avaqromR0MFxG07OTDtqA3cokwGvTlleYozUPGaqOL-3banK9Unf6lbHI/?imgmax=800" alt="06 workspaceview" title="06-workspaceview.png" border="0" style="width: 100%;" />
</p>
<h4>Configure the Maven/Tycho build and test it.</h4>
<p>Next step is to add building the checked out code. Industrial SQL Connector for Mylyn comes preconfigured for a Maven/Tycho build so that is easy. Add the <em>Build Step</em> named <em>Invoke Maven 3</em></p>
<p><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZLBjkoWPSqjtk7oorNlQL3gutG_RlmaGE3LTbhQ2-BZYbsmE_RMLHDNjxojze93wa97AANZul6PHlqdLJmSCfChuA9uKfUwG-5bvnXFSaKMig2yhISdclirP0KrtHHZx7D9kE3FuR9-c/?imgmax=800" alt="07 addmaven3build" title="07-addmaven3build.png" border="0" style="width: 100%;" />
</p><p>We need some advanced options so click the <em>Advanced</em> button. Most important is that the root pom file is not in the root directory but in <code>com.industrialtsi.mylyn.maven/</code></p>
<p><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgkbnjOYJRQ4zflgzHgHlVC8s628h5uA6P2Zow6zizF7jrb8FF8_vB5fmnt49-8fWYhLU_pyJ_K7tKo6kTWQNYT64kzNZ98okB7_R8qRXOyizsgkHXihlHa_HStTfPBkibzKOeybjYUJ8o/?imgmax=800" alt="08 configuremaven3build" title="08-configuremaven3build.png" border="0" style="width: 100%;" /></p>
<p>Press <em>Build Now</em> again.</p>
<p><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTIWI1iaurW9jq_-JXlIJXViqzmIhSPRgedPO5vb6HR3ltfn_hyphenhyphene9TDj0f-1bH4HloaUdnZts6D22KWs30x_DMzIo6_4Z0PbWNN7QgHFj3tXpO4KyW2YtZoXqyh7GbEHF9hbbReh9FmsM/?imgmax=800" alt="09 testbuildagain" title="09-testbuildagain.png" border="0" style="width: 100%;" /></p>
<h4>Build success</h4>
<p>When all is well you should see this, <code>Finished: SUCCESS</code></p>
<p><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjujgf6d3uR2PTtnIMIlDN0LnRiaSRJNB2541hlK0Mrq-vD55ji8gNjqXpJFovEOXMK4W9LyTQ3tcb2eP-c20L37IXkdQJeAi6St-CWUjgT-jqNgFsqEnw_RjyEXBW1N_VEtK2QzjIEl08/?imgmax=800" alt="10 testbuildsuccess" title="10-testbuildsuccess.png" border="0" style="width: 100%;" /></p>
<p>Results are all in the Workspace, so a bit hard to find:</p>
<p><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZDjZqLz17t-JIsI2Pki5H6WAeaO0XnkJvUPxBM6sKelfwO0hgs0edbh6OMLS9if9ZUQb6_1jHUzm10HTRSol6eTiq6PQnFrIm6qeoqM0M6RSkwNDIPbBGNR-QkQgcD4oYMS6oKYZPTvY/?imgmax=800" alt="11 testbuildresults" title="11-testbuildresults.png" border="0" style="width: 100%;" /></p>
<h4>Publishing artifacts</h4>
<p>You can archive and publish the artifacts produced by Maven by configuring the build.</p><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjuJgCu8SG1-T4phCR6zHMC3AoFP-NGTNL8JFa-FHcjTq8YCKK9Qg5eEStlTUcZ16g1K85BwU5ttgXd_krAJdgBpJm-0idBT5TPkqG1dPVYhy61PdmPdmLxJ5ViyKoHvV78OMXeNyFto3c/?imgmax=800" alt="12 archiveresults" title="12-archiveresults.png" border="0" style="width: 100%;" />
<p>This produces the following Job display:</p>
<p><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHCZem8MKWuLrgICIiIrVTLefA2Y11f2f3DEg-F5OdE5-B52zNvmpYjHGFLR7nM8uoSKcdLERQYAas_4Gg55UA5fD9MuqVWPMfxDbw3Aw26yPI_5VkKrSkiR6DBcGtdJQPc70QCxzXM3s/?imgmax=800" alt="13 resultspublished" title="13-resultspublished.png" border="0" style="width: 100%;" /></p>
<h4>Sunshine!</h4>
<p><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEioslcCTdcJkBkwW9gIKUep7yDHPWnA1n9llsuYNBCkV8H8EvYFG7YbnolMLMUYeJsbLipu0Q5MRdnk9xtDtjUgDO3b0yT-YSEQwT9vAfqdKP-DqyMq_m2H40dCK9TeKWMOszmeUaYntyo/?imgmax=800" alt="14 sunshine" title="14-sunshine.png" border="0" style="width: 100%;" /></p>Maarten Meijerhttp://www.blogger.com/profile/05900699818398561644noreply@blogger.com0tag:blogger.com,1999:blog-8878360187292205236.post-87452211303203832202013-08-20T10:20:00.001+02:002013-08-20T10:24:02.923+02:00Industrial SQL Connector for Mylyn updated for Eclipse 4.3 and Mylyn 3.9.0 (now version 0.9.10)New activity at <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=184532">Bug 184532: [connector] Generic SQL connector</a> meant it was time for a fresh look at the Industrial SQL connector for Mylyn.
<h4>New Kepler Platform Target</h4>
I have added a Kepler target platform with latest Mylyn and EclipseLink 2.4.2 for easy configuration
<img style="display:block; margin-left:auto; margin-right:auto;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiiMCn2ZV_zmR9XIo7yrlst50h5cWpY7s2Gx1O3dVtepQABerZMcKhWgDpIo7dnjBRGsJwUEYQqIcXh_LpLxeRowxOsrNZRvotVvby8nCZM9SwWtIjrE2Fy2LG_vRcQF2EXLjWLOU1t-k0/?imgmax=800" alt="Kepler Target" title="Screen Shot 2013-08-20 at 10.04.55.png" border="0" width="366" height="50" />
I have updated the references In the MANIFEST.MF to point to Mylyn 3.9.0
<h4>Connector build with Maven/Tycho</h4>
I fixed the Tycho/Maven build so you can quickly get up to speed
<img style="display:block; margin-left:auto; margin-right:auto;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhaF7rIMtuxDCKbru-qIhi13yH6XvAF7nDlYPOvgD309WA-tywA0Ykd0kDiKwYffPg0yz3r7_rT_lBN9E4rU0mv3rfcf-e5rrVAGEPrRhVXI_z3q3C4WTxZjipHnhyphenhyphennTwX79nRlnkm_cRk/?imgmax=800" alt="Tycho/Maven build" title="tycho.png" border="0" width="400" />
<h4>Fragment build with Maven/Tycho</h4>
In the process I made an interesting discovery about Tycho dependency resolution when compiling fragments.
An Eclipse code fragment depends on a host plug-in.
The PDE allows the fragment to use all dependencies of the host, even the ones marked optional.
When building with Maven/Tycho these dependencies are not resolved.
The fix was to add the required JAR to the Extra Classpath Entries of build.properties of the fragment.
<img style="display:block; margin-left:auto; margin-right:auto;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiMAYISPH8hDXXiHAMdGjXCvoyqVPCiQSFHE4fu9RpTFZLCixmtxucaYn-jDc5WVeudUnGno9tNhxI-zpSZKINrJL8nxXaqoEpZ-8ar5ZDQZxPIIYEqak1fLGMuRciWxIf4hADKuV0SaGU/?imgmax=800" alt="Extra Classpath Entries" title="extraclasspathentries.png" border="0" width="400" />
<h4>Resources</h4>
Code for the Industrial SQL connector for Mylyn is hosted at <a href="http://code.google.com/a/eclipselabs.org/p/industrial-mylyn/">EclipseLabs</a>.Maarten Meijerhttp://www.blogger.com/profile/05900699818398561644noreply@blogger.com0tag:blogger.com,1999:blog-8878360187292205236.post-9007355945313964462013-01-24T11:55:00.001+01:002013-01-24T12:10:26.432+01:00Starting Hudson automatically on Mac OSX.With yesterdays release of <a href="http://bit.ly/14cmVsV">Hudson 3.0.0</a> by the Eclipse Foundation a step forward was taken again in creating an open source toolchain under proper governance.
Hudson is an extensible continuous integration platform allowing you to build, inspect and test code whenever you commit changes to your repository. The new release brings a reduction in footprint of 50% so you can also set it up to run on your local machine.
After downloading and installing Hudson following the instructions on <a href="http://www.eclipse.org/hudson/">www.eclipse.org/hudson</a> you that it is easy to start from the terminal using
<pre>> java -jar hudson.war</pre>
<h4>First try: launchd script</h4>
But this quickly becomes tiresome, so there must be a better way. On Mac OSX this is launchd, the launch service.
Another important thing is that I don't want all the builds to clutter up my home directory so I want to have the <code>HUDSON_HOME</code> direct to somewhere else.
Create a directory <code>/usr/local/hudson</code> and move hudson.war into it.
<pre>> sudo mkdir /usr/local/hudson
> mv hudson-3.0.0.war /usr/local/hudson/
> cd /usr/local/hudson/
> sudo chgrp admin hudson-3.0.0.war
> ln -s hudson-3.0.0.war hudson.war
</pre>
I then created a file in <code>/Library/LaunchDaemons</code> named <code>org.hudson-ci.agent.plist</code> with the following contents (skip this step if you're in a hurry):
<pre><?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<!-- Move HUDSON_HOME to /Volumes/yourdisk/hudson_home/ -->
<key>EnvironmentVariables</key>
<dict>
<key>HUDSON_HOME</key>
<string>/Volumes/yourdisk/hudson_home/</string>
</dict>
<key>Label</key>
<string>org.hudson-ci.agent</string>
<key>RunAtLoad</key>
<true/>
<key>KeepAlive</key>
<key>ProgramArguments</key>
<array>
<string>java</string>
<string>-jar</string>
<string>/usr/local/hudson/hudson.war</string>
<!-- prevent Hudson from becoming visible in the Finder & Dock -->
<string>-Djava.awt.headless=true</string>
</array>
<key>StandardErrorPath</key>
<string>/Library/Logs/hudson-err.log</string>
<key>StandardOutPath</key>
<string>/Library/Logs/hudson-out.log</string>
</dict>
</plist>
</pre>
<h4>Trouble!</h4>
When I had used this for a couple of days I noticed something strange. All Jobs would suddenly disappear. The reason turned out to be that sometimes during startup the Volume where <code>HUDSON_HOME</code> was now located wasn't available yet. The result is that another directory is created inside <code>/Volumes/</code> where a new path to <code>HUDSON_HOME</code> is created. Launchd allows for some very clever extra checks like <code>PathState</code> but in the end I settled for something simpler.
<h4>Solution
</h4>Just delay startup of Hudson for a few seconds.
<pre><?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<!-- Move HUDSON_HOME to /Volumes/yourdisk/hudson_home/ -->
<key>EnvironmentVariables</key>
<dict>
<key>HUDSON_HOME</key>
<string>/Volumes/yourdisk/hudson_home/</string>
</dict>
<key>Label</key>
<string>org.hudson-ci.agent</string>
<key>RunAtLoad</key>
<true/>
<key>KeepAlive</key>
<dict>
<key>PathState</key>
<dict>
<key>/Volumes/yourdisk/hudson_home/</key>
<true/>
</dict>
</dict>
<key>ProgramArguments</key>
<array>
<string>/Library/Java/Hudson/start_hudson.sh</string>
</array>
<key>StandardErrorPath</key>
<string>/Library/Logs/hudson-err.log</string>
<key>StandardOutPath</key>
<string>/Library/Logs/hudson-out.log</string>
</dict>
</plist>
</pre>
and the following in the <code>start_hudson.sh</code> script:
<pre>#!/bin/tcsh
set hudsonVolume = "/Volumes/yourdisk"
# introduce delay of 120 secs
sleep 120
if (! -e $hudsonVolume ) then
exit 0
endif
growlnotify -n Hudson -m "Hudson starting..."
# start it
/usr/bin/java \
-jar /usr/local/hudson/hudson.war \
-Djava.awt.headless=true \
--httpPort=9090
</pre>
This has been running now for a couple of weeks and now my builds and inspections run automatically.
Maarten Meijerhttp://www.blogger.com/profile/05900699818398561644noreply@blogger.com0tag:blogger.com,1999:blog-8878360187292205236.post-75851131608023993772012-07-25T22:39:00.001+02:002014-01-21T15:03:48.035+01:00Industrial SQL Connector for Mylyn updated for Eclipse 3.8/4.2 and Mylyn 3.8.0 (now version 0.9.9)The most recent Mylyn update to version 3.8.0 broke the Industrial SQL Connecor for Mylyn, but no longer.
The change was minor but illustrative: we "borrowed" the <code>DatePicker</code> from <code>org.eclipse.mylyn.internal.provisional.commons.ui</code> and as this is clearly marked internal, it was bound to break at some point. Luckily the Mylyn developers moved this <code>DatePicker</code> out of internal API so everybody can use it.
It is now part of the <code>org.eclipse.mylyn.commons.workbench</code> Bundle.
If you want to use for Mylyn before 3.8.0 you should check out code from SVN tag /tags/mylyn-3.7.0
The updated code is in /trunk/
I also update the info at <a href="http://bit.ly/OFcpAj">Eclipse Marketplace</a> and the code at <a href="http://bit.ly/OFcHqW">EclipseLabs</a>.
The Industrial SQL Connector for Mylyn allows you to set up a Mylyn connection to any accessible database with Task related information. A default Query UI for some very basic task settings is also provided. You define a set of SQL queries, and package these with some configuration in a <em>fragment</em>, the connector does the rest.
You can use either EclipseLink/JPA technology with annotations or Ibatis 2.3.0 with configuration in XML files.
<img style="display:block; margin-left:auto; margin-right:auto;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZawgr7vLct-oLaXXeC-kAghI4Zmy2St210jDNpO_KndM5dSCqBHT2Fu26A3Lf9llX0EFVTMLbInnKYSRURQBY0XiLgq9OOeOdmK-VCZf9Kgv8w2953Lf_Sq0rlFc2tklF5o8PTl7wpYo/?imgmax=800" alt="Screen Shot 2012 07 25 at 22 30 56" title="Screen Shot 2012-07-25 at 22.30.56.png" border="0" width="100%" />
Example projects are included and described elsewhere on this blog.
The compiled code can also be installed from <a href="http://bit.ly/OFlyJh">the update site</a>Maarten Meijerhttp://www.blogger.com/profile/05900699818398561644noreply@blogger.com0tag:blogger.com,1999:blog-8878360187292205236.post-75627669624999731902011-06-29T08:53:00.003+02:002011-06-29T18:43:55.278+02:00Eclipse Indigo Democamp at Microsoft!<p>World peace may be next! Today the <a href="http://wiki.eclipse.org/Eclipse_DemoCamps_Indigo_2011/Amsterdam">Eclipse Indigo Democamp</a> in the Netherlands, was held at the Schiphol/Amsterdam office of <a href="http://www.microsoft.com/nl/nl/">Microsoft Nederland</a>. This unexpected mix of topic and venue raised many eyebrows (and tweets) in the Dutch developer communities on both sides. It turned out to be a very a very informative and enjoyable evening, with seven presentations in all.</p><p><img style="display:block; margin-left:auto; margin-right:auto;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQ4zL2Vz7dcuPhSdWqxy1rWgQdtaGP7bOt8DmtXbN2DWk_d7Shcpw_YTNDe6bunowxGFISaRDMv0vdCFCxDRoWT3tHiqYyumqU0rIw5wfHcZQPW3b_gy2vda1Jok07EJFCwhUwGGszhAo/?imgmax=800" alt="D7K 2905" title="D7K_2905.jpg" border="0" width="300" height="200" /> Wim Hoek of <a href="http://www.microsoft.com/nl/nl/">Microsoft Nederland</a> welcomes all visitors to this democamp and refers to various tweets about the meeting of these two camps. The reason is simple: Microsoft is about developers, developers, developers. And that includes developers using Eclipse.</p><p><img style="display:block; margin-left:auto; margin-right:auto;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhH1cU9g4Y5oktihAkWw_ojY5hzxP5ofEWkeGRHIrNvgDjDCRkG4daeQFow1uN5X5Szo8sm_5MHBX_g_sZHBMEatDSfUYa3eGygFrtgjzxgSddJorwEfJ3YSS-sSXadrWQxqrBWeS-1azc/?imgmax=800" alt="D7K 2907" title="D7K_2907.jpg" border="0" width="300" height="200" /> Yuri Kok of <a href="http://www.industrial-tsi.com/">Industrial TSI</a> welcomes and explains the program.</p><p><img style="display:block; margin-left:auto; margin-right:auto;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiXiNfG4cUQJ06GkBhh6wDA4XtJXuSnXNh-ERcZI3yyRPnnfF6dHz55hN9mZ_xO9o-lnC8qiFtOolC6v1g_DMHf-zEOV5c-d1gfDVWyKPZKFJ_0ghVyKQGwkJoO28vHtykcO5VdBMLoitU/?imgmax=800" alt="D7K 2910" title="D7K_2910.jpg" border="0" width="300" height="200" />Wim Jongman, eclipse committer on ECF and with <a href="http://www.industrial-tsi.com/">Industrial TSI</a>, introduces Orion with some quiz questions, but he does not get to give away many prizes.</p><p><img style="display:block; margin-left:auto; margin-right:auto;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhi6H87lPU38miW_zlkV9LbQzhbXtQffqXhiVyVpvm9hX2XIFBk28WeP_FEVSr4O1cpVu51D5RGMsoDQMc73m7t6chJtRV4M8hZbClBm6XB22Fmg5LonkfKAwA-7kOLUMR6AhFqg7MCmGo/?imgmax=800" alt="D7K 2913" title="D7K_2913.jpg" border="0" width="300" height="200" />Next he talksed about how to run OSGi with plugins et all inside an web or application server, allowing Eclipse developers to leverage their RCP/plugin skills on the server.</p><img style="display:block; margin-left:auto; margin-right:auto;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTLoK79rnHZ_E2Ihrt3gtfe09Cco5lb1YlzeKHIsiSvOhCVZIszx0JPlg-5V0mdv78IZJ5bFVaChAzVDMxCUPISnSs7IeWVjehyphenhyphen3aFhTafQBcPNd6NzklvKJYGMlMbH_LVwvg-ZYeS5QM/?imgmax=800" alt="D7K 2914" title="D7K_2914.jpg" border="0" width="300" height="199" />About 30 people attended, I suspect mostly from the Dutch Eclipse world.<p></p><img style="display:block; margin-left:auto; margin-right:auto;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjmGQBUIXT1ooZqrggUVPB2bJ1dQIzDINukqrDGG8KRtAXNpsMTCJHO3Fk1Agb3IwbhQABUX9983xbIRrHGOUQhVrMQEU_KPI2YGa0MBPWp97sPn-SnQawCuptBHKVHerBWTXk7TZAwuXo/?imgmax=800" alt="D7K 2917" title="D7K_2917.jpg" border="0" width="300" height="200" />Jos Warmer presented a case about using modelling in the insurance industry with an RCP client with a graphical policy design editor, based on <a href="http://www.eclipse.org/graphiti/">Graphiti</a> and created with <a href="http://code.google.com/a/eclipselabs.org/p/spray/">Spray</a>, a DSL to generate Graphiti shapes. Note that Spray will become OSS at sometime in the future! Currently the link leads to an empty project.<p></p><p><img style="display:block; margin-left:auto; margin-right:auto;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhu3Pd0R7LctIZsPoau4MwJoCrcwJ_fhWeHbyEPnYCu3EdE08aGjUpH2yyzDKfyX368DnmV8LpsXIUBC8Apv95aTL3Q9cWfZ62Eq6AOl0Uc_F0aCfgrotGBRXLSuy2gaZWP5KN_sckg5OE/?imgmax=800" alt="D7K 2919" title="D7K_2919.jpg" border="0" width="300" height="199" />Next was a break with very nice hospitality in the very impressive Microsoft building, thank you Microsoft!<p></p><img style="display:block; margin-left:auto; margin-right:auto;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDU6ejQlzsoxFliPB_So_UomVwpZEzJ5L8caYm2LnIhMBEaFuDhI_8EO0DUwANS6lVu4MIZjMuTC5h9SLu0BoHYiJe0tMadkdvytV-Qj7fZPSHBiZDWubzcT_YxTtht3P5FZ42_3hXkEo/?imgmax=800" alt="D7K 2923" title="D7K_2923.jpg" border="0" width="300" height="200" />Roald Hopman explained the use of <a href="http://www.talend.com/">Talend Open Studio</a> for data clean up and migration</p><p><img style="display:block; margin-left:auto; margin-right:auto;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjbQV_h3PbVoct6qX9e5iBBvK9_tJVvvVhi3mMU1Z-RwiTtFguv2ULvk_dtysysmSGZhvRdBiKMyd6OhVBVUzPoQOSpa_2jUiFoOv8Gf7cAPU0zHUjccAo-eTe5Zbz0MrjXupRcyIm6l8/?imgmax=800" alt="D7K 2927" title="D7K_2927.jpg" border="0" width="300" height="200" />It's obvious that Dutch meeting rooms are best suited to native Dutchmen, the tallest people in the world after the Masai. But that didn't prevent Martin Woodward to give a very fast and extensive presentation on <a href="http://www.microsoft.com/netherlands/visualstudio/products/2010-editions/team-foundation-server">Microsoft Team Foundation Server</a> and demonstrating the Team Foundation Eclipse (TFE) plugin. TFE is truly a first class citizen on Team Foundation Server, running fast and well integrated on an Eclipse instance running on a MacBook pro. </p><p><img style="display:block; margin-left:auto; margin-right:auto;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiW_DmIPXJhRYy43XGM5GM3YwsxAAYxRFbNwmu01CFrhsD0muyOr-YhKo2UsMd7LogKFZ7G64wdTh2PPCp5WsVX93kiBJ4oY5NeXfFhOnFpQ2OHRYyZ62CjeWuVReu6cOt4tm6pJMa5vlg/?imgmax=800" alt="D7K 2929" title="D7K_2929.jpg" border="0" width="300" height="200" />This may be a very good solution for developer shops running windows and other platforms (Mac/Linux/Mobile) and integrates access from Visual Studio and Eclipse into one ALM solution. I like the concept of <em>gated commits</em>: requiring successful CI tests before actual committing.</p><p><img style="display:block; margin-left:auto; margin-right:auto;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjCOgWQbRAPJDK-bcSL7wJUkzKFkP_DW-sce4ZxhgU3OoQq2WYZhyphenhyphenLe1vH5aF3L-HWYCGym52rTbGHbt-sH7hFtbHWxql7-9NM2bEYOPgD7nDxblmtIzumvQr140COPkqeu0SYFGJKzFU/?imgmax=800" alt="D7K 2934" title="D7K_2934.jpg" border="0" width="300" height="200" />Other found it interesting as well as many people wanted more info afterwards instead of going out for the break.</p><p><img style="display:block; margin-left:auto; margin-right:auto;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgMs9M7j8Pp9xMQkGZ_Erzbjvjo82ipIn8kYRxCYSJbjZsF_CTtPomdPX5C4J4e9qORW3DSKHf1XUcFLlkgmlmCVgr7SMlMtD3_kIvZHbjhQfL7TVV0RQG-x2hJNecS0qZk4JgmwTzYpJE/?imgmax=800" alt="D7K 2939" title="D7K_2939.jpg" border="0" width="300" height="198" />Teun Hakvoort talked about his experiences using the Windows Azure cloud platform for running a Java Enterprise container. Possible but not ready for prime time.</p><p><img style="display:block; margin-left:auto; margin-right:auto;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUJbRWdjLQn_gU-Nx0yCv1273c0EQb4IiDHkpw9osvwZcDDP4VrFZ2_fi1lsRNp2LejFMhNDV53ND19NxzLFbCyZNbcq1OGcUESY5ExVq1osDH5ChbkPIzwsVhq48CkrjQjgd6BtN1rTI/?imgmax=800" alt="D7K 2943" title="D7K_2943.jpg" border="0" width="300" height="200" />Finally Manuel Polling of <a href="http://www.edmond.nl/">Edmond Document Solutions</a> talked about the use of an RCP based workbench for professional document workflow solutions and their switch to and experience developing a graphical workflow editor.</p><p><img style="display:block; margin-left:auto; margin-right:auto;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiMEu4mQGhwfGx2pSevosNPRPBfV8zPNGXwP_ycGYwKLjPWladYg5BBxTp2VN-iCpAotac3bve0ML6tpltidQtkcuQJ-Jp0hGPrWZBIiDVPXWjr8nG9U3rc0jRKe8xbO8PBx1Kct65ai7Q/?imgmax=800" alt="D7K 2944" title="D7K_2944.jpg" border="0" width="400" height="160" />The evening concluded with lively discussions over drinks.</p><h2>Thank you to Microsoft and Industrial TSI!</h2>Maarten Meijerhttp://www.blogger.com/profile/05900699818398561644noreply@blogger.com0tag:blogger.com,1999:blog-8878360187292205236.post-75378354801689361222011-02-22T13:49:00.002+01:002011-02-22T13:58:46.717+01:00The sorry state of Mylyn connectors for Google Code/EclipseLabsThe Eclipse Wiki says there are two connectors to use Mylyn with GoogleCode and/or Eclipse Labs. Unfortunately both are in alpha state and have seen little action lately. That is the reason for the deliberately provocative title of this post.<br />
<h4>Googlecode Mylyn Connector</h4><a href="http://code.google.com/p/googlecode-mylyn-connector/">Googlecode Mylyn Connector</a> is licensed under Eclipse Public License 1.0.<br />
This is the more extensive project, but is has a few open issues that depend on issues with GoogleCode's API itself. So the GoogleCode API must first expose more functionality for this connector to move past alpha.<br />
Most notable are:<ul><li><a href="http://code.google.com/p/googlecode-mylyn-connector/issues/detail?id=7">Issue 7</a> Need way to get label values, this depends on <a href="http://code.google.com/p/support/issues/detail?id=3203">Google Code Issue 3203</a></li>
<li><a href="http://code.google.com/p/googlecode-mylyn-connector/issues/detail?id=18">Issue 18</a> Support Attachments (for Mylyn this includes shared Task Contexts!), this depends on <a href="http://code.google.com/p/support/issues/detail?id=3213">Google Code Issue 3213</a></li>
<li><a href="http://code.google.com/p/googlecode-mylyn-connector/issues/detail?id=11">Issue 11</a> Support querys with filters, this may relate to problems formulating server side queries as well.</li>
</ul><h4>Project Hosting connector for Mylyn</h4><a href="http://code.google.com/a/eclipselabs.org/p/projecthosting-connector-for-mylyn/">Project Hosting connector for Mylyn</a> is licensed under Apache License 2.0.<br />
<blockquote>... One of the main goals of the project is to have a similar look-and-feel for the user interface to the one already provided on Google Code.</blockquote><blockquote>The functionality is limited to read-only interaction at this time, but ability to enter new issues is under development.<br />
</blockquote>The project has two members. Reading the project site it seems that it is read only access and focus on HTML layout in the editor. Not a lot appears to be happening here so I think this project is abandoned.<br />
<h4>What can be done about this?</h4><a href="http://www.eclipse.org/mylyn/">Mylyn</a> is the biggest develper productivity enhancer in recent years. Many commercial SCM vendors provide connectors made by or helped by <a href="http://www.tasktop.com/">Tasktop</a>. <br />
Google depends on and contributes to Eclipse in a big way (<a href="http://code.google.com/javadevtools/wbpro/index.html">WindowBuilder</a>, <a href="http://code.google.com/javadevtools/codepro/doc/index.html">CodePro Analytix</a>, <a href="http://code.google.com/appengine/">AppEngine</a>).<br />
<br />
I strongly feel that OSS community deserves a good Mylyn connector for the very accessible open source repository where SCM, Issue tracking and documentation all come together that is provide by Google Code/EclipseLabs! So this should be taken to the next step.<br />
<ul><li>So I'm going to volunteer at the Googlecode Mylyn Connector to help resolve some of the Mylyn specific issues using everything I learned contributing to Mylyn itself and creating the <a href="http://code.google.com/a/eclipselabs.org/p/industrial-mylyn/">Industrial Mylyn Connector</a> for connecting to SQL databases.</li>
<li><br />
But I'm also calling on readers of of this blog and Planet Eclipse to add comments and votes/stars to the issues in the GoogleCode Support pages listed above to raise the profile.</li>
</ul>So now I'm going to check out the code and start looking at some issues. I will keep you posted...Maarten Meijerhttp://www.blogger.com/profile/05900699818398561644noreply@blogger.com2tag:blogger.com,1999:blog-8878360187292205236.post-25868513747447701392011-01-12T10:29:00.001+01:002011-01-12T10:30:25.287+01:00Eclipse Orion on Mac OSX and iPadYesterday I <a href="http://eclipsophy.blogspot.com/2011/01/eclipse-orion-first-impressions-and.html">blogged</a> about setting up Eclipse Orion on MAc OSX and trying to access it from an iPad. Today I continue my exploration and share some comments on setup tuning and clarifications of the as yet sparse documentation on the <a href="http://wiki.eclipse.org/Orion">Orion Eclipsepedia</a>.<h4>Stopping the server on Mac OSX doesn't work</h4>When you startup up Orion as instructed in the <a href="http://wiki.eclipse.org/Orion/How_Tos/Running_0.2_M4#Downloading_and_running_Orion">wiki</a>it starts up without access to the console. You can see all the log messages by starting up the <em>Console</em> application, but you cannot tell Orion to <code>close</code>. To enable keyboard access to the osgi console, you need to do the following:<ul><li>Open the <em>eclipse</em> package using control-click and <em>Show Package Contents</em>.<br />
Create an alias to the file <code>Contents/MacOS/eclipse</code>.<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfVvllzSKr0Tp8Bz1iA-S2JBysDDELNbSE8Rjv_d4h-b_jGGdvPYpU0Gdwna_dzINr1kBUB2LQVE1q9jAspCmz06_HoFj5sSy-uvmyn9swwPSWxXZdw3r8nxbzrRp1CZknd1NuSsEyEck/s1600/eclipse-create-alias.png" imageanchor="1" style="margin-left:1em; margin-right:1em"><img border="0" height="136" width="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfVvllzSKr0Tp8Bz1iA-S2JBysDDELNbSE8Rjv_d4h-b_jGGdvPYpU0Gdwna_dzINr1kBUB2LQVE1q9jAspCmz06_HoFj5sSy-uvmyn9swwPSWxXZdw3r8nxbzrRp1CZknd1NuSsEyEck/s320/eclipse-create-alias.png" /></a></div></li>
<li>Rename this alias to <code>eclipse-orion</code> to the root folder.<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg0W_XGbSbUGCJwbQsEQu_WlFDD4rVazQWmyS2pWrZ1C_ezdy1y7O0rIorIhLsxHD4AkPaBTmWR59wfWwhyphenhyphenkoFMwPzTpD4CM7_9igyc3W15wt3YvKGuv-FkcIfKW8plD5vOpxRn3CGkYoU/s1600/orion-root-alias.png" imageanchor="1" style="margin-left:1em; margin-right:1em"><img border="0" height="152" width="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg0W_XGbSbUGCJwbQsEQu_WlFDD4rVazQWmyS2pWrZ1C_ezdy1y7O0rIorIhLsxHD4AkPaBTmWR59wfWwhyphenhyphenkoFMwPzTpD4CM7_9igyc3W15wt3YvKGuv-FkcIfKW8plD5vOpxRn3CGkYoU/s320/orion-root-alias.png" /></a></div></li>
<li>Now you can double click the alias and orion is started but you have access to the osgi console in a <em>Terminal</em> window.<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEix_syQJKVRs9wVaE2eQKNGTY-RG9Cyb7xJs_unS4b9kGQNXFHfF7_W5nxtIKncKdyL_X2S8TqpuxKtl4PhA89w_x2lsxCxSt6LHOXOixYxJ1N4fBQv6fR9eBwNG771YLIhAJV-iLe_oVc/s1600/orion-osgi-console.png" imageanchor="1" style="margin-left:1em; margin-right:1em"><img border="0" height="184" width="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEix_syQJKVRs9wVaE2eQKNGTY-RG9Cyb7xJs_unS4b9kGQNXFHfF7_W5nxtIKncKdyL_X2S8TqpuxKtl4PhA89w_x2lsxCxSt6LHOXOixYxJ1N4fBQv6fR9eBwNG771YLIhAJV-iLe_oVc/s320/orion-osgi-console.png" /></a></div></li>
<li>To stop and shutdown orion simple type <code>close</code> in the <em>Terminal</em> window.</li>
</ul><h4>Orion accessed from iPad doesn't work</h4>I can open files and view them and move around with the outline bar at the left, but as yet I have failed to activate editing mode on a file. Clicking in the text or scrolling by dragging doesn't work. I suspect that the HTML used simply does not activate the keyboard on an iPad.<br />
I think it is time to checkout the code...Maarten Meijerhttp://www.blogger.com/profile/05900699818398561644noreply@blogger.com1tag:blogger.com,1999:blog-8878360187292205236.post-56875659468106675432011-01-11T22:12:00.000+01:002011-01-11T22:12:44.023+01:00Eclipse Orion first impressions and setup for iPadAs iPad doesn't support Java, there is no Eclipse on it, until now!<br />
Because the iPad comes with Safari, a very good standards compliant webkit based browser, looking for a web based IDE does indeed make sense. So I'm very excited about the Orion announcement as can be found <a href="http://dev.eclipse.org/blogs/mike/2011/01/11/introducing-orion/">here</a>, <a href="http://borisoneclipse.blogspot.com/2011/01/orion.html">here</a> and <a href="http://eclipsr.blogspot.com/2011/01/new-eclipse-webdev-blog.html">here.</a><br />
<h4>Installing and starting is easy</h4>Download from <a href="http://download.eclipse.org/e4/orion/">http://download.eclipse.org/e4/orion/</a>. I choose the version for Mac OSX. It extracts into a folder named <code>eclipse</code> that I renamed immediately to <code>eclipse-orion</code> to avoid confusion with all the other versions installed on my machine.<br />
<h4>Setting the server port to other than 8080</h4>Port 8080 is already taken on my system I needed to edit the <code>config.ini</code> file and change the <code>org.eclipse.equinox.http.jetty.http.port</code> variable.<br />
For Mac OSX select eclipse and right mouse click to to show package contents:<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPOzk0Qccs46PNQnzt4Ktoq-1pcOWY4XlwZlVPSettVpT3qSPKngNqjgIbytoBnoOWiU5O68M_H67mjxAfxUU7c43VsGnrnswPlLwrUnrrZRQrhml96zyz2mZCVC0EpEeY8JMCCsBWnlE/s1600/eclipse-orion-port.png" imageanchor="1" style="margin-left:1em; margin-right:1em"><img border="0" height="291" width="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPOzk0Qccs46PNQnzt4Ktoq-1pcOWY4XlwZlVPSettVpT3qSPKngNqjgIbytoBnoOWiU5O68M_H67mjxAfxUU7c43VsGnrnswPlLwrUnrrZRQrhml96zyz2mZCVC0EpEeY8JMCCsBWnlE/s320/eclipse-orion-port.png" /></a></div>Then locate <code>config.ini</code> inside the <code>Contents/MacOS</code> folder.<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiMoSsQnBGfkRx7F_DCbsPBvet1hxaVpyt8FC5qHm3ZojJWPnddqQmxG9Bsbg4is3Qvzg7wFnisWWEWR1mJ-u1mQkF9KWGwwMz90T41YeQBgxW81GCCzX2RxhbQlRkZEfpnBFlkXrqDCWI/s1600/eclipse-orion-contents.png" imageanchor="1" style="margin-left:1em; margin-right:1em"><img border="0" height="152" width="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiMoSsQnBGfkRx7F_DCbsPBvet1hxaVpyt8FC5qHm3ZojJWPnddqQmxG9Bsbg4is3Qvzg7wFnisWWEWR1mJ-u1mQkF9KWGwwMz90T41YeQBgxW81GCCzX2RxhbQlRkZEfpnBFlkXrqDCWI/s320/eclipse-orion-contents.png" /></a></div>Then edit to choose the port that is free.<br />
<pre class="brush: plain;highlight: [10]">-startup
../../../plugins/org.eclipse.equinox.launcher_1.2.0.v20101119.jar
--launcher.library
../../../plugins/org.eclipse.equinox.launcher.cocoa.macosx_1.1.100.v20101004
-consoleLog
-console
-data
serverworkspace
-vmargs
-Dorg.eclipse.equinox.http.jetty.http.port=8888
-Dorg.eclipse.equinox.http.jetty.autostart=false
-XstartOnFirstThread
-Dorg.eclipse.swt.internal.carbon.smallFonts
</pre><br />
<h4>Fire up your iPad (simulator)</h4>Open the iPad simulator, start Safari and go the URL <code>http://ip-address-of-dev-machine:8888/ </code> and see the workspace.<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJCHtt9oILrbny2JjS4JzPrgocqcb9Q03KRozClNUYozN7KcQSIQSfZ9sr1b2YKcpveH3QGU4e06EJx_u6-Y9nkoHF29qLxCtMK128X5UbY4Adm28Ht7lEBzuEcKnllXa5pKHH7vystOM/s1600/orion-ipad.png" imageanchor="1" style="margin-left:1em; margin-right:1em"><img border="0" height="248" width="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJCHtt9oILrbny2JjS4JzPrgocqcb9Q03KRozClNUYozN7KcQSIQSfZ9sr1b2YKcpveH3QGU4e06EJx_u6-Y9nkoHF29qLxCtMK128X5UbY4Adm28Ht7lEBzuEcKnllXa5pKHH7vystOM/s320/orion-ipad.png" /></a></div><br />
Now you can edit files of your mobile website and save and see them in action right on the couch.<br />
<br />
Next time: hooking up to an existing workspace.Maarten Meijerhttp://www.blogger.com/profile/05900699818398561644noreply@blogger.com3tag:blogger.com,1999:blog-8878360187292205236.post-65590379426050083962010-11-24T22:49:00.002+01:002013-03-29T13:43:46.365+01:00NullController pattern - how to evolve a complex RCP Eclipse client application<h4>Introduction</h4>Many tutorials and quite a number of books describe how to get started in Eclipse plug-in development. It is only when trying to apply all of this new found knowledge to real world business applications that things get complicated.<br />
<h4>Gradual increase of complexity</h4><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">The main problem during development of large systems is that all parts evolve in parallel: that database schema, the business logic on the servers, the EJB connection code and the RCP client. So it's time to think about what John Gall, much quoted author on System Theory, wrote:</div><blockquote><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">“A complex system that works is invariably found to have evolved from a simple system that worked. The inverse proposition also appears to be true: A complex system designed from scratch never works and cannot be made to work. You have to start over, beginning with a working simple system.”</div></blockquote>That is the inspiration for this blog post: you have to start simple and get it to work, then evolve from there. In this blog entry I will share how with a little forethought you can make you RCP client application easier to develop and test. With <i>RCP client application</i> I mean a front end for a large server based business application where multiple users access real time data using an Eclipse RCP based client. All business logic takes place on the server, the client provides a view to the current data and allows users to modify that data.<br />
<h4>Basics: Split between UI and Core plug-ins</h4>A good practice is to divide up your functionality in two plug-ins: one to handle most logic, called the Core plug-in, and another containing all code that requires a UI, called the UI plug-in. <b>Only</b> the UI plugin has a dependency on the eclipse GUI framworks: <span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">org.eclipse.swt</span>, <span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">org.eclipse.jface</span>, <span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">org.eclipse.ui</span> and <span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">org.eclipse.ui.workbench</span><span class="Apple-style-span" style="font-family: inherit;">.</span> <br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQncITk41H6L93AjvLOFQJFiBxxReRvOJGcP7wQLmt4-VG0xGvhvA-DbUjdhnIyd1itouEvZteQ4qugQRE1fFFFmHWmOzJg9M9zIIoaWRuC0x-KR4HcLGyE0SZ__XHUinG9F4_gqzAbyI/s1600/coreuiplugin.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="167" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQncITk41H6L93AjvLOFQJFiBxxReRvOJGcP7wQLmt4-VG0xGvhvA-DbUjdhnIyd1itouEvZteQ4qugQRE1fFFFmHWmOzJg9M9zIIoaWRuC0x-KR4HcLGyE0SZ__XHUinG9F4_gqzAbyI/s320/coreuiplugin.png" width="320" /></a></div>You can check this using the PDE dependency view.<br />
<h4>NullController Pattern</h4>The split between UI and Core is also called the Model View Controller or MVC pattern. Basically the UI <i><b>subscribes</b></i> to data updates and translates UI events that modify data into <b><i>method calls</i></b> to the controller. In Java terms: the controller in Core has <span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">subscribe()</span> and <span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">unsubscribe()</span> methods that take an application specific <span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">listener</span> interface as parameter.<br />
The trick is to make the location of the controller indirect via a Factory, so it can evolve in complexity over time.<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiujwsFPetZaNlnzq3Syn7b7RN1KR-QQ8MSuIlmqoyVEmQ8E4TWwMpkhyphenhyphenASft7oMsGHvEkMvziLlKuQX0tPSXyGYR4jZZNSgMT9YAI893JUhEwYY94zo93Keo-ZX_WVsxVs4D9aeQTC768/s1600/nullcontroller-pattern.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="230" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiujwsFPetZaNlnzq3Syn7b7RN1KR-QQ8MSuIlmqoyVEmQ8E4TWwMpkhyphenhyphenASft7oMsGHvEkMvziLlKuQX0tPSXyGYR4jZZNSgMT9YAI893JUhEwYY94zo93Keo-ZX_WVsxVs4D9aeQTC768/s400/nullcontroller-pattern.png" width="400" /></a><br />
<h4>AbstractController</h4>The <span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">AbstractController</span> includes the code to handle <span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">subscribe()</span> and <span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">unsubscribe()</span> of one or more views. It probably also contains the code to broadcast new or changed data to the views.<br />
<h4>NullController</h4>The <span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">NullController</span> implementation is the simplest possible form of the interface. All action method calls do nothing and all query methods return either null or, when collections, empty instances (so all iterators in views work).<br />
With this controller you can work on the UI view and button layout and do simple developer testing for button and menu enablement.<br />
<h4>StubController</h4>The <span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">StubController</span> implementation is one step up in complexity. It is entirely resident in the client. All action method calls just provide expected feedback and all query methods return a simple local generated date object or collection. With this controller you can refine the UI interaction by allowing commands based on selection contents and implement selection service code. In this stage you can also demonstrate the UI to customers and users and start the development of training as the perceived behavior of the client will not change much.<br />
<h4>LocalTestController</h4>The <span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">LocalTestController</span> implementation links the UI data objects directly to local server code, but without the intermediate EJB layer. Here we can test whether the data in the data objects is filled consistently from the underlying databases.<br />
<h4>J2EEController</h4>When the above all works correctly it is time to insert the EJB layer. Create the <span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">J2EEController</span> and deploy the EAR on a test server and then do the final testing using the RCP client.<br />
<h4>Next time</h4>I will fill out these basic steps with some code examples to show in more detail how to implement this.
<h3>UPDATE</h3>
Sample code for this post is available at <a href="https://github.com/mjmeijer/com.eclipsophy.nullcontroller">Github</a>.Maarten Meijerhttp://www.blogger.com/profile/05900699818398561644noreply@blogger.com0tag:blogger.com,1999:blog-8878360187292205236.post-86687699768841299852010-11-22T10:47:00.001+01:002010-11-22T17:27:43.772+01:00Eclipse Demo Camp Antwerp approaching!30 November Eclipse experts and enthusiasts from Belgium and The Netherlands will gather in Kontich near Antwerp to attend <span style="font-style: italic;">Eclipse Demo Camp November 2010/Antwerp</span>. <br />
In prior years it was more of a Netherlands only event, but now it is a combined effort of Industrial TSI and SmartApp.<br />
<br />
The presenters currently scheduled are: <br />
<br />
<ul><li>Ralph Mueller, Eclipse Foundation: "You know the past, can you guess the future of Eclipse?"</li>
<li>Ralf Sternberg, EclipseSource: A talk from the Eclipse Summit 2010: "A look ahead at RAP: what's new now and will be noteworthy in the future"</li>
<li>Oliver Wolf, Product Manager and Architect at SOPERA GmbH: "SOA at Eclipse"</li>
<li>Wim Jongman, Industrial-TSI: Eclipse Mashup: How we use Eclipse Technology to stay ahead.</li>
</ul><br />
<br />
Previous events were well attended, for a brief photo impression see here for <a href="http://eclipsophy.blogspot.com/2010/06/eclipse-demo-camp-nieuwegein.html">2010</a> and <a href="http://eclipsophy.blogspot.com/2009/06/eclipse-demo-camp-nieuwegein.html">2009</a>.<br />
<br />
<br />
The number of already registered attendees is currently 17. So when you live or work in the Netherlands or Belgium and you have involvement with Eclipse in general, or Rich Web applications or Service Oriented Architecture in particular, please come and join us next week Tuesday. More information is available <a href="http://wiki.eclipse.org/Eclipse_DemoCamps_November_2010/Antwerp">here</a> and you can <a href="http://hendrix.tcs.be/">register here</a>.Maarten Meijerhttp://www.blogger.com/profile/05900699818398561644noreply@blogger.com0tag:blogger.com,1999:blog-8878360187292205236.post-80967450942911957382010-08-03T18:03:00.006+02:002010-08-03T18:12:34.177+02:00Where do all Eclipse and Equinox names come from?<h4>What does a year on Earth really look like?</h4>If you wan to know what the names Eclipse, Equinox and others really mean outside our little ecosphere, please have a look at this from Best of YouTube.<br /><object width="420" height="270"><param name="movie" value="http://www.youtube.com/v/9Ml4_Jv_HkE&hl=en_US&fs=1?rel=0&color1=0x2b405b&color2=0x6b8ab6&border=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/9Ml4_Jv_HkE&hl=en_US&fs=1?rel=0&color1=0x2b405b&color2=0x6b8ab6&border=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="420" height="270"></embed></object><br />It can also give you inspiration for naming your project if you don't want a <a href="http://en.wikipedia.org/wiki/Three-letter_acronym">TLA</a>.Maarten Meijerhttp://www.blogger.com/profile/05900699818398561644noreply@blogger.com0tag:blogger.com,1999:blog-8878360187292205236.post-15237379740424767492010-06-25T17:00:00.005+02:002010-06-25T17:25:41.795+02:00Eclipse Demo Camp Nieuwegein<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1ajlPOvwRz1ynJ08KUwCSLN29N0r4ZHmgJ57hZh_m2WaHvm96cTof6Nn8FKuWOGVAQqrYCxeuAITflQW7596VjD3O9BbtLEfxZxT3tOmJ8UWs6PlXgfjVaTl0SgIOSLEcfH0VCagNCCU/s1600/democamp-2010-01.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 213px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1ajlPOvwRz1ynJ08KUwCSLN29N0r4ZHmgJ57hZh_m2WaHvm96cTof6Nn8FKuWOGVAQqrYCxeuAITflQW7596VjD3O9BbtLEfxZxT3tOmJ8UWs6PlXgfjVaTl0SgIOSLEcfH0VCagNCCU/s320/democamp-2010-01.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5486727829466640482" /></a>On June 23 there was an Eclipse Democamp at Industrial TSI in Nieuwegein to celebrate the launch of Helios.<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg9nMCAylnBpElAgC8e5aR5THI84UxtH2ru6QBsjrUEIL0Txl1tSbrdqeiYNels8NHlRKTApDWAs3gkYXI9AmHGlgnAjLLRXV5d_B9lH1mtR5KtN8-rcQ085wYF3V-jc8VeIyNNU4T7g2E/s1600/democamp-2010-04.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 213px; height: 320px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg9nMCAylnBpElAgC8e5aR5THI84UxtH2ru6QBsjrUEIL0Txl1tSbrdqeiYNels8NHlRKTApDWAs3gkYXI9AmHGlgnAjLLRXV5d_B9lH1mtR5KtN8-rcQ085wYF3V-jc8VeIyNNU4T7g2E/s320/democamp-2010-04.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5486727852295894130" /></a>As usual Yuri Kok, owner of the <a href="http://www.linkedin.com/groups?gid=1855650&trk=myg_ugrp_ovr">Dutch Eclipse User Group </a> on LinkedIn managed to organize all the necessary ingredients like advanced networking facilities, an expectant audience of about 40 people and a number of speakers.<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBfDzrrpIP-gl45o71AdOq2bKo5aVzUmtSVs-IIZXmajzgRd6jHmcGZjftqFuoy40pMGnE-Rh7NJlrByEGbRJlUeIhN8jnQhwEE0odVmlrDD0ifcb_rfYH-dGbaQlbgP13Mx2kLbkKpVY/s1600/democamp-2010-02.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 213px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBfDzrrpIP-gl45o71AdOq2bKo5aVzUmtSVs-IIZXmajzgRd6jHmcGZjftqFuoy40pMGnE-Rh7NJlrByEGbRJlUeIhN8jnQhwEE0odVmlrDD0ifcb_rfYH-dGbaQlbgP13Mx2kLbkKpVY/s320/democamp-2010-02.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5486727837824356338" /></a><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXqIclUbqDtoeKzmbQozg-qJWHWh_6cPZUG8tcER5mQtoDL7ohbTtbk6uVQy6E-LXaHdU1BnSuWLyjX-cVjc2rAVdwQO_SoObyVkcWnOuDI7vGG5jXP-ZDHE7Pa-6w6BMaUi05fCwcLGA/s1600/democamp-2010-03.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 213px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXqIclUbqDtoeKzmbQozg-qJWHWh_6cPZUG8tcER5mQtoDL7ohbTtbk6uVQy6E-LXaHdU1BnSuWLyjX-cVjc2rAVdwQO_SoObyVkcWnOuDI7vGG5jXP-ZDHE7Pa-6w6BMaUi05fCwcLGA/s320/democamp-2010-03.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5486727850388542754" /></a><h4>KEYNOTE: Wim Jongman, Helios & OSGi Remote Services</h4>Wim Jongman introduced the new Helios release, which includes 39 projects! After that he quickly went to a demonstration of Eclipse Remote Services, and the Zookeeper discovery mechanism implementation that Remain BV (co-host of the event) has contributed to the ECF. This was a very nice demonstration that included a new widget: the "osgiloscope".<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj7VrcZCrK2CK0-RZHUbK8qxU-IrMjnXa-VXEVf_Tbukhs3Heaw-vMQcs0DcGabBTZ7oqaOb6apkHMsfgnQL8v7dOwgXGvHK74u_u-B2aLsLLgek4G4aBCXjBOfbPAcLyqdOX5xoUOfZD8/s1600/democamp-2010-05.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 213px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj7VrcZCrK2CK0-RZHUbK8qxU-IrMjnXa-VXEVf_Tbukhs3Heaw-vMQcs0DcGabBTZ7oqaOb6apkHMsfgnQL8v7dOwgXGvHK74u_u-B2aLsLLgek4G4aBCXjBOfbPAcLyqdOX5xoUOfZD8/s320/democamp-2010-05.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5486727855644789890" /></a><h4>Olivier Wolf, "SOA at Eclipse -- the Eclipse SOA Initiative"</h4>Oliver Wolf of <a href="http://www.sopera.de/en/home">SOPERA</a> next introduced us the <a href="http://www.eclipse.org/org/industry-workgroups/soawg.php">SOA Intiative</a> at Eclipse,describing the role of community and industry working group, the split between modelling and runtime, what projects are part of the SOA Initiative and more. Revelaing was his slide that showed what areas still need to be filled in.<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbeAJP0qBrK43lUb-DEJmz2Ui668EjTmFxAZ_FsrJDzymcYV6ZW3xe_pKOZsBg4En5vhrvpQzh86TSXmnrTeaTSOYHXz_R2e2sNLin95oiAwARkTw1lP6WXKWfuYKc0rmJeDkNn4693Lk/s1600/democamp-2010-06.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 213px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbeAJP0qBrK43lUb-DEJmz2Ui668EjTmFxAZ_FsrJDzymcYV6ZW3xe_pKOZsBg4En5vhrvpQzh86TSXmnrTeaTSOYHXz_R2e2sNLin95oiAwARkTw1lP6WXKWfuYKc0rmJeDkNn4693Lk/s320/democamp-2010-06.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5486729212163292514" /></a><h4>Drinks and slices</h4>Always an important part of an evening gathering, this was organised splendidly: a choice of pizzas and drinks!<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjYmj4_nBwr55aP0gj5oOVhj-PqmAbZRHIS6guHmoj3Zz79IE8I6hFwvS1-NfwBF6p7GSzURDxWSZPBR0Qul-Qw-36ZzI1j3V3WGzX-EYnJhO1dc2AHlyHR3ts8lAPLnBB_-HGsIW2LQlk/s1600/democamp-2010-07.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 214px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjYmj4_nBwr55aP0gj5oOVhj-PqmAbZRHIS6guHmoj3Zz79IE8I6hFwvS1-NfwBF6p7GSzURDxWSZPBR0Qul-Qw-36ZzI1j3V3WGzX-EYnJhO1dc2AHlyHR3ts8lAPLnBB_-HGsIW2LQlk/s320/democamp-2010-07.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5486729222557257202" /></a><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgqQOVkJDbyJHXuBKWWJyj7_mN9qu3rBpVzz4LvWTqMeM7ai-XSfaph3yyWHOglVMXps50zSArXqrcGpohKthR4sEpPfWDho7ahFUp33w5RKxyCll9davoIYlLzz2yE9ansvwNyoMFioDs/s1600/democamp-2010-08.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 214px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgqQOVkJDbyJHXuBKWWJyj7_mN9qu3rBpVzz4LvWTqMeM7ai-XSfaph3yyWHOglVMXps50zSArXqrcGpohKthR4sEpPfWDho7ahFUp33w5RKxyCll9davoIYlLzz2yE9ansvwNyoMFioDs/s320/democamp-2010-08.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5486729232195764914" /></a><h4>Ief Cuynen and Tom Bauwens, <a href="http://www.smartapps.be/">SmartApps</a> - Single-sourcing demo Eclipse RCP / RAP</h4>RAP and RCP are both part of the Helios release and have reached maturity. Tom showed a real life application where the shared code base and the very rich display on both the web and RCP were amply demonstrated. He also offered tips on organising your code using plugins for the shared stuff and fragments for the RCP or RAP specific stuff. <a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJFb5kefM2mBZZh-hqD_Kst_bga10LQbR3L-LlK48iXJi7VT1-ID281plYa41-6tPbW-qT96yc2zc6KbFJ0IB43h3GbqJe56zS5KCssKrzp-uiViq1XaGr6l7vjjOWYXZqiu2pvxiUrlA/s1600/democamp-2010-09.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 213px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJFb5kefM2mBZZh-hqD_Kst_bga10LQbR3L-LlK48iXJi7VT1-ID281plYa41-6tPbW-qT96yc2zc6KbFJ0IB43h3GbqJe56zS5KCssKrzp-uiViq1XaGr6l7vjjOWYXZqiu2pvxiUrlA/s320/democamp-2010-09.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5486729225746186882" /></a><h4>Jelle Herold, Stream BV - Statebox & Typewriter</h4>After telling us about <dfn>statebox</dfn>, a process modelling and runtime engine, last time, this time Jelle described the <dfn>typewriter</dfn> library.<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhD1RLpRPkSf0U46T9x4Iekud7igY8fIg5DRmnjkWjQaDgXRqnIYTr17cM-ryAqj1npC-YKo7kcijEvOcSD2HXK8snHmrSyeNSQIfOL0S9iCowWpSn7w2QXDck_fXAhxOIGjL0PLJeYFO4/s1600/democamp-2010-10.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 213px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhD1RLpRPkSf0U46T9x4Iekud7igY8fIg5DRmnjkWjQaDgXRqnIYTr17cM-ryAqj1npC-YKo7kcijEvOcSD2HXK8snHmrSyeNSQIfOL0S9iCowWpSn7w2QXDck_fXAhxOIGjL0PLJeYFO4/s320/democamp-2010-10.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5486729236467491682" /></a>Because statebox needs to work with data and types from all sorts of systems, many of them non-java, using <code>java.lang.reflect</code> was not an option.<br />Jelle's solution is an <em>interface only</em> reflection API, with implementations for Java (obviously), Swing, Wicket, Drupal, Solr and JFace.<br/>He invited us to look at and use his code <a href="http://bitbucket.org/wires/typewriter">http://bitbucket.org/wires/typewriter</a>.He can be contacted at jelle AT defekt DOT nl<h4>Olivier Wolf, "Eclipse Swordfish -- Service-oriented software development made easy"</h4>Oliver had brought a second presentation about <a href="http://www.eclipse.org/swordfish/">Swordfish</a>, a SOA engine part of the Eclipse SOA Initiative. To show us some examples he demonstrated their use of the new Discovery UI API part of Helios, that is also used by Eclipse Marketplace and Mylyn Connector discovery. <a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhX2PsIXkQktApp1KaTJ3D_nhRXb7UT1tOpt9gHI0wA-QK1NLgvsb8G45VDDhmps6pXPusOVRmONADKzY2lwmgBbmcO1TFIYKV1UCCctgSybNndYpLm_sT3toOaHiZW2mNY9DD0hHVgbg8/s1600/democamp-2010-11.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 213px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhX2PsIXkQktApp1KaTJ3D_nhRXb7UT1tOpt9gHI0wA-QK1NLgvsb8G45VDDhmps6pXPusOVRmONADKzY2lwmgBbmcO1TFIYKV1UCCctgSybNndYpLm_sT3toOaHiZW2mNY9DD0hHVgbg8/s320/democamp-2010-11.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5486730322106443794" /></a>We see the already(!) familiar Discovery UI, followed by the Installation part. <a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6z51W9fMitH410ng9zEZVcWjVoa3TtuwiTIhw3bRms9LzrgivWaLUrckOCSRslXMDFsl_4DgoBu2xKzIKwzyxcbZBSjH70F8zehRzrtV1X6ArsrZproM4Y8-W5ygw8RNzJdnOGf7VAk0/s1600/democamp-2010-12.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 213px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6z51W9fMitH410ng9zEZVcWjVoa3TtuwiTIhw3bRms9LzrgivWaLUrckOCSRslXMDFsl_4DgoBu2xKzIKwzyxcbZBSjH70F8zehRzrtV1X6ArsrZproM4Y8-W5ygw8RNzJdnOGf7VAk0/s320/democamp-2010-12.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5486730325689475314" /></a>Then he had the audience stunned by the popup of a compulsory registration dialog! See below:<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg3oMjH3nXPQz9LuAkqpIXbDLmQ1K5H4od33WhfdE2Qw8vWUk7JwovuNYUS2ZSG35bKMF-SfwybmssgmSxLseuc7BdK2Xgg8JpiqLG5qwLxb_rEhb0c24I1VzIDeE9L7s5AyuhkZffdniE/s1600/democamp-2010-13.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 213px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg3oMjH3nXPQz9LuAkqpIXbDLmQ1K5H4od33WhfdE2Qw8vWUk7JwovuNYUS2ZSG35bKMF-SfwybmssgmSxLseuc7BdK2Xgg8JpiqLG5qwLxb_rEhb0c24I1VzIDeE9L7s5AyuhkZffdniE/s320/democamp-2010-13.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5486730324922445058" /></a>He then went on to explain that this was all <cite>rather simple</cite>, just using <dfn>p2 requirements</dfn> to download the registration code from the server and <dfn>p2 touch points</dfn> to invoke this code before proceeding!He promised to explain all in a blog post soon!<h4>Doru Gardan, ST-Ericsson - "Hardware debugging on a Digital Signal Processor"</h4>To remind us that not everyone is on the latest and shiniest new release of Eclipse. He demonstrated their customised C-compiler and debugger stuff running in Ganymede. He compiled a demo program and ran it on the hardware with chip attached to his laptop.<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhes0k4XX4ICqPiktLbf2WcntkJTbQLVxP0cRYWTN4haCiTUGPvD6Ne_0AWtCesZMPB3_B-ZPZXt_GY_JpbytbCr6EITHBZI2XnjF7atcG-37bsOGLqulXt30chcn9tvFz0ROu7t05dvA0/s1600/democamp-2010-15.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 213px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhes0k4XX4ICqPiktLbf2WcntkJTbQLVxP0cRYWTN4haCiTUGPvD6Ne_0AWtCesZMPB3_B-ZPZXt_GY_JpbytbCr6EITHBZI2XnjF7atcG-37bsOGLqulXt30chcn9tvFz0ROu7t05dvA0/s320/democamp-2010-15.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5486730333689757106" /></a><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjmsQxEAyQLa-EAAcx99kRh45vkuyXoRDdsEiXDoXgPiNI-VWR7B1Q8zxMVT61-BoeXISro00mjbpvFmjC4S6Efj5CdogA8WUHDMXa0nH8mEGSZHMRLWgpHRphZXmsj7JNoV262YSqM3ec/s1600/democamp-2010-14.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 213px; height: 320px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjmsQxEAyQLa-EAAcx99kRh45vkuyXoRDdsEiXDoXgPiNI-VWR7B1Q8zxMVT61-BoeXISro00mjbpvFmjC4S6Efj5CdogA8WUHDMXa0nH8mEGSZHMRLWgpHRphZXmsj7JNoV262YSqM3ec/s320/democamp-2010-14.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5486730330244496002" /></a><h4>Conclusion</h4>Eclipse is doing well in the Netherlands, but we still need to go a long way for all users to interact and be aware of the community aspects. So all in all an informative evening that was very well hosted by Industrial TSI. Thank you, Yuri and all your colleagues!Maarten Meijerhttp://www.blogger.com/profile/05900699818398561644noreply@blogger.com1tag:blogger.com,1999:blog-8878360187292205236.post-10443685993719908762010-06-07T22:24:00.014+02:002010-06-11T09:18:47.071+02:00Getting started with Hudson & Eclipse<h4>Why automated build?</h4>After reading these two blog posts by Andrew Niefer <a href="http://aniefer.blogspot.com/2009/07/composing-and-updating-custom-eclipse.html">here</a> and <a href="http://aniefer.blogspot.com/2009/07/adt-part-2-more-like-epp.html">here</a> I understand that there is simply no way to build a custom updatable RCP application manually from Eclipse. The export options are too limited so I opened <a href="http://bugs.eclipse.org/?316059">bug 316059</a> to make this exporting easier.<br /><h4>Why Hudson?</h4>As the Eclipse building infrastructure itself is employing <a href="https://build.eclipse.org/hudson/">Hudson</a> I expect that automating the build of RCP applications will be possible with Hudson. The first step is to download Hudson from <a href="http://www.hudson-ci.org/">hudson-ci.org</a>. I installed it on my Mac in <code>/usr/local/hudson/</code>. <h4>LaunchAgent</h4>I don't like starting up Terminal to manually start it everytime so I created a LaunchAgent for it. Place the following plist xml in file <code>/Library/LaunchAgents/org.hudson-ci.agent.plist</code> and Hudson will start automagically every time on login.<br /><pre class="brush: xml;"><br /><?xml version="1.0" encoding="UTF-8"?><br /><!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"<br /> "http://www.apple.com/DTDs/PropertyList-1.0.dtd"><br /><plist version="1.0"><br /><dict><br /> <key>Label</key><br /> <string>org.hudson-ci.agent</string><br /> <key>OnDemand</key><br /> <false/><br /> <key>ProgramArguments</key><br /> <array><br /> <string>/usr/bin/java</string><br /> <string>-jar</string><br /> <string>/usr/local/hudson/hudson.war</string><br /> <string>--httpPort=9090</string><br /> </array><br /> <key>StandardErrorPath</key><br /> <string>/Library/Logs/hudson-err.log</string><br /> <key>StandardOutPath</key><br /> <string>/Library/Logs/hudson-out.log</string><br /></dict><br /></plist><br /></pre><br />I employ one POJO jar in my RCP app and I managed to set this up in a few hours to extract from CVS, run checkstyle, findbugs, junit tests, emma tests code coverage and do final build. Next time I'll cover building a an Eclipse feature and update site.<br /><h4>Moving HUDSON_HOME (Added on 2010 06 11)</h4>After some time I noticed that my home directory was increasing in size, leading to rapid and longer TmeMachine backups. I like the backups of my development tools to be different and under my direct (script) control so I needed to move the Hudson home directory. Luckily this can be done easily!<pre class="brush: xml;highlight:[6,7,8,9,10,11]"><br /><?xml version="1.0" encoding="UTF-8"?><br /><!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"<br /> "http://www.apple.com/DTDs/PropertyList-1.0.dtd"><br /><plist version="1.0"><br /><dict><br /><!-- Moving HUDSON_HOME to /_some_other_volume_/Hudson/ --><br /> <key>EnvironmentVariables</key><br /> <dict><br /> <key>HUDSON_HOME</key><br /> <string>/_some_other_volume_/Hudson/</string><br /> </dict><br /> <key>Label</key><br /> <string>org.hudson-ci.agent</string><br /> <key>OnDemand</key><br /> <false/><br /> <key>ProgramArguments</key><br /> <array><br /> <string>/usr/bin/java</string><br /> <string>-jar</string><br /> <string>/usr/local/hudson/hudson.war</string><br /> <string>--httpPort=9090</string><br /> </array><br /> <key>StandardErrorPath</key><br /> <string>/Library/Logs/hudson-err.log</string><br /> <key>StandardOutPath</key><br /> <string>/Library/Logs/hudson-out.log</string><br /></dict><br /></plist></pre><br />Now copy everything using terminal:<pre class="style:shell;"><br /><b>$ cp -pR .hudson/ /_some_other_volume_/Hudson/</b><br /></pre> and restart Hudson.<br /><pre class="style:shell;"><br /><b>$ ps -lA | grep hudson</b><br />501 _XXXX_ 565 4004 0 47 0 2972192 212840 - ↵<br />→ S a9a87e0 ?? 0:40.14 ↵<br />→ /usr/bin/java -jar /usr/local/hudson/hudson.war --httpPort=9090<br /><b>$ kill _XXXX_<br />$ sudo launchctl list</b><br /></pre><br />Then try in your browser: And now everything appears to be located in the new location!Maarten Meijerhttp://www.blogger.com/profile/05900699818398561644noreply@blogger.com0tag:blogger.com,1999:blog-8878360187292205236.post-62761978202464104482010-05-29T23:08:00.009+02:002010-05-30T13:50:06.863+02:00Bug 184532 RESOLVED: Industrial Connector moved to Eclipselabs<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://marketplace.eclipse.org/sites/default/files/industrial-110x80.png"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 110px; height: 80px;" src="http://marketplace.eclipse.org/sites/default/files/industrial-110x80.png" border="0" alt="" /></a><br /><h4>History</h4>The Mylyn project has grown tremendously and taken on new directions since <a href="https://bugs.eclipse.org/184532">bug 184532 [connector] Generic SQL connector</a> was opened in 2007. Widescale adoption and praise for Mylyn and the foundation of Tasktop was followed by the release of many commercial connectors.<br />As Mik has pointed out elsewhere, the Mylyn dev team simply does not have the resources to maintain the many contributions offered, one of which was this SQL connector. <br />This is the only way for the Mylyn project to stay in innovation mode, stay out of maintenance mode! We understand and respect that decision as we too will benefit from that innovation.<br /><br />The Industrial SQL Connector for Mylyn does have an active though not very visible user community as it is the basis of the Mylyn connector of the commercial software change management product of <a href="http://remainsoftware.com/solutions/software-change-management">Remain Software</a>.<br /><br />As can be seen from the entries in <a href="https://bugs.eclipse.org/184532">bug 184532</a> mentioned above also some people have used the Industrial SQL Connector to create connections to their in-house SQL based systems.<br /><br /><h4>Move to Eclipselabs.org</h4>For this reason we have decided to take the opportunity to join the newly formed <a href="http://code.google.com/a/eclipselabs.org/hosting/">Eclipselabs.org</a> with code hosting at Google code, and no longer actively pursue becoming part of mylyn core. There we will have our own dedicated Wiki, issue tracker, SVN repository and update site, so we no longer have to <a href="http://en.wikipedia.org/wiki/Free_rider_problem">free ride</a> on the eclipse.org infrastucture.<br />As a consequence the projects and packages will be renamed to get rid of the <code>org.eclipse.mylyn.*</code> prefix and revert back to <code>com.industrialtsi.mylyn.*</code>, but will keep the <a href="http://www.eclipse.org/legal/epl-v10.html">EPL</a> as license.<br /><br />The new location for the project and source code is here:<br /><a href="http://code.google.com/a/eclipselabs.org/p/industrial-mylyn/">http://code.google.com/a/eclipselabs.org/p/industrial-mylyn/</a><br /><br />We will be updating the Wiki and blog in the days to come. We fixed some more bugs, upgraded the version to 0.9.6 and offer a preliminary update site here:<br /><a href="http://svn.codespot.com/a/eclipselabs.org/industrial-mylyn/trunk/com.industrialtsi.mylyn.site/">http://svn.codespot.com/a/eclipselabs.org/industrial-mylyn/trunk/com.industrialtsi.mylyn.site/</a><br /><br />We are also present in the Eclipse Marketplace to be ready for Helios release here:<br /><a href="http://marketplace.eclipse.org/content/industrial-sql-connector-mylyn">http://marketplace.eclipse.org/content/industrial-sql-connector-mylyn</a>.<br /><br /><i>The above is an edited and more elaborate version of the <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=184532#c69">closing comment</a> on bug 184532.</i>Maarten Meijerhttp://www.blogger.com/profile/05900699818398561644noreply@blogger.com0tag:blogger.com,1999:blog-8878360187292205236.post-86875391944413209442010-05-11T23:58:00.007+02:002010-05-12T00:25:40.420+02:00Preparing for Helios & Eclipse MarketplaceHave you also created plugin that you want to make easy to install? Then make sure your plugin is listed at Eclipse Marketplace and add the feature ids of the base install from you site.xml. 5 minutes work that make it a lot easier for your users!<h4>Upcoming Eclipse Helios release</h4>I received a mail recently from the ever active Lynn Gayowski, the Marketing Events Manager for the Eclipse Foundation.<br />The upcoming Helios release is one huge event and everybody in the eco system can be involved, either by testing the milestones or by preparing for one of the exiting UI improvements in Helios: the Eclipse Marketplace client.<h4>Eclipse Marketplace client</h4>The <a href="http://marketplace.eclipse.org/">Eclipse Marketplace</a> is the website where you can find hundreds of plugins and RCP applications that will make your work easier: special purpose editors, task management, source code control, ...<br />Until now you could lookup a plugin on the marketplace and then use the update site for that plugin to install it in your eclipse.<br />A complicated process that involves webbrowser, search, copy, eclipse, add update site, paste, select, install, restart. This quickly adds up to several minutes. In Helios this is all replaced by a single menu selection <b>Help/Eclipse Solution Catalogs</b>.<br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgua6ACpNj8lBg8ymjYhrvqe6rh_ytcFC1mXRTmINWmV00U-4Xc8JNPNXIol7M63RtVT81WWoCvEdXE1hpjoCtD57rEoMkv2RvyvhAT48LJ1CrZ0QuU6ZOi95tEqMfgyFqYbZ8WX-WYamM/s1600/marketplace.png"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 255px; height: 320px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgua6ACpNj8lBg8ymjYhrvqe6rh_ytcFC1mXRTmINWmV00U-4Xc8JNPNXIol7M63RtVT81WWoCvEdXE1hpjoCtD57rEoMkv2RvyvhAT48LJ1CrZ0QuU6ZOi95tEqMfgyFqYbZ8WX-WYamM/s320/marketplace.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5470138055618939058" /></a><br /><h4>Only 5 minutes to set up!</h4>Lynn requested that I provide information to make this client also show the <b>Industrial SQL Connector for Mylyn</b> that I have blogged about here in the past. The steps to take are clearly described <a href="http://marketplace.eclipse.org/quickstart">here</a>. It is basically copying the feature id's from your site.xml to the data in the market place.<br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhcScPqjBuxurm_Udfranr4Ls57hGhVW6gGNTft9wpUXbhAYBVu9Bt3IUvqhOoXeGzhDsHrz_E1tZJ1EImW3BjFFCve_AQzXIvSz02HA9DB4INDgxi4ZG_Tv27gYVKqUnmpOkA3y92hTqI/s1600/marketplace-2.png"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 162px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhcScPqjBuxurm_Udfranr4Ls57hGhVW6gGNTft9wpUXbhAYBVu9Bt3IUvqhOoXeGzhDsHrz_E1tZJ1EImW3BjFFCve_AQzXIvSz02HA9DB4INDgxi4ZG_Tv27gYVKqUnmpOkA3y92hTqI/s320/marketplace-2.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5470141305342370978" /></a><br />All in all it took me just 5 minutes to set up for two solutions I manage, including editing the descriptions in HTML to look nice in the information hover, and adding an image. Thanks for the tip Lynn!Maarten Meijerhttp://www.blogger.com/profile/05900699818398561644noreply@blogger.com1tag:blogger.com,1999:blog-8878360187292205236.post-47846258235184096672010-01-18T15:46:00.005+01:002010-01-18T16:03:18.561+01:00Eclipse Function keys in Snow LeopardI recently upgraded to Mac OSX Snow Leopard and was really sorry that I lost all the Eclipse function keys, as they are reassigned for the OS: Show Dashboard, brightness up/down, etc. Luckily I soon discovered this option in System Preferences for Keyboard:<br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh9xDdCSPw7OiD9_i7w-_TASTDvr2MltjYlm-c8cwiX8jwhXY2WI1Ne2BYDeRzlqd9DsbpfBsU6-R3XpZeD8U__n0CLoxjNPhT6jaBBOMzNmD-8V3GR2YNR6kJel_WKwXHecaWYo7NJymg/s1600-h/blog-fnkeys.png"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 290px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh9xDdCSPw7OiD9_i7w-_TASTDvr2MltjYlm-c8cwiX8jwhXY2WI1Ne2BYDeRzlqd9DsbpfBsU6-R3XpZeD8U__n0CLoxjNPhT6jaBBOMzNmD-8V3GR2YNR6kJel_WKwXHecaWYo7NJymg/s320/blog-fnkeys.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5428095319254911266" /></a><br />Luckily it also work the other way around, so you can keep <b>f4</b> to mean <em>Dashboard</em>, but use <b>fn+f4</b> to do <em>Show Hierarchy</em>.Maarten Meijerhttp://www.blogger.com/profile/05900699818398561644noreply@blogger.com1tag:blogger.com,1999:blog-8878360187292205236.post-2882961617497891442009-12-17T12:50:00.011+01:002009-12-17T13:45:48.851+01:00Proper handling of linked resourcesIn the Eclipse workbench you can import resources, meaning copying them into the workspace, or you can set up a folder to link to them, and they files stay where they were. For large datasets, linking has obvious advantages. There is even a Decorator to show linked resources.<br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjAtkryGsq3DZ3iO16a3jyaBayLhnDCv5fxRGyiXL8914oiQkfSnIgod3xSogF8JhCBarcIdoO8LlGA1YM_4RPtF_72o743ByQjAm1u4CZ1TKrOSeDruTErsPHa_o1JL0iB5xplfnQzogg/s1600-h/linked-resource-blog-1.png"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 201px; height: 76px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjAtkryGsq3DZ3iO16a3jyaBayLhnDCv5fxRGyiXL8914oiQkfSnIgod3xSogF8JhCBarcIdoO8LlGA1YM_4RPtF_72o743ByQjAm1u4CZ1TKrOSeDruTErsPHa_o1JL0iB5xplfnQzogg/s400/linked-resource-blog-1.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5416176360524815410" /></a><br />When programming in Eclipse you sometimes must use plain Java based libraries. These libraries handle files using <code>java.io.File</code>. When you work in Eclipse you reference files in the workspace using <code>org.eclipse.core.resources.IFile</code>. So in this case I needed to convert between the two formats.<br /><h4>First attempt, WRONG!</h4>My first attempt was to use <code>f.getFullPath().toFile()</code> and that worked! Because I tested all my code with small data sets in the workspace, it wasn't until later that I found out, this does not work with linked resources:<br /><pre class="brush: text;">java.io.FileNotFoundException: /Remote-Data/eulumdat/data.file (No such file or directory)<br />at java.io.FileInputStream.open(Native Method)<br />at java.io.FileInputStream.<init>(FileInputStream.java:106)<br />at java.io.FileReader.<init>(FileReader.java:55)<br />at xxxx</pre><h4>Second attempt: the proper way</h4>My went back to the offending code and used CTRL+SPACE again. <a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjcusPN8-9wng3QxEJe9F7TN_5aUcFDt4piNICbk2S7p2y8rJ0KI6pu16zz5HmOQWsK4eN-KpDChXcfLTXdE9ga04AALPXAm0Xq8QRmQkSWcNB0mpjhF1DaVr-qKR6JmlzDIm4gSLaNpzk/s1600-h/linked-resource-blog-2.png"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 135px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjcusPN8-9wng3QxEJe9F7TN_5aUcFDt4piNICbk2S7p2y8rJ0KI6pu16zz5HmOQWsK4eN-KpDChXcfLTXdE9ga04AALPXAm0Xq8QRmQkSWcNB0mpjhF1DaVr-qKR6JmlzDIm4gSLaNpzk/s400/linked-resource-blog-2.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5416185344809052786" /></a>Now I selected <code>f.getLocation().toFile()</code> and that did it!<br /><h4>Conclusion</h4>In order to get your code working in all circumstances, you need to test with both resources in the workspace and outside.<br />I'm i good company though, as there are <a href="https://bugs.eclipse.org/bugs/buglist.cgi?quicksearch=linked+resources">64 open bugs</a> in the Eclipse bugzilla about linked resources.<br />Also I suspect code that doesn't work with linked resources, will not work with the remote system explorer, like <a href="https://bugs.eclipse.org/293108">this one</a>.Maarten Meijerhttp://www.blogger.com/profile/05900699818398561644noreply@blogger.com3tag:blogger.com,1999:blog-8878360187292205236.post-78450731619982133482009-12-10T12:55:00.012+01:002009-12-19T00:27:24.436+01:00Dutch Eclipse Democamp 2009 at TSI International NieuwegeinYesterday TSI International hosted the Eclipse Democamp for about 40 people in Nieuwegein.<br /><h4>Photographic impression</h4><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh34WMKmvOn8YUPqMaBG1ISEMcVVpCC_yckD45_4FOBdWzmhb81i6x6ym-lY7jMOamrdopVPOwvsGPPMrkX2K5Mo0ln_BT1DDhKY9gYX6Dy9TsAmAP27x4kYto1ndh6E7GWWPNT9HgP050/s1600-h/democamp-2009-01.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 213px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh34WMKmvOn8YUPqMaBG1ISEMcVVpCC_yckD45_4FOBdWzmhb81i6x6ym-lY7jMOamrdopVPOwvsGPPMrkX2K5Mo0ln_BT1DDhKY9gYX6Dy9TsAmAP27x4kYto1ndh6E7GWWPNT9HgP050/s320/democamp-2009-01.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5413575883843735922" /></a>Wim Jongman preparing for the kick off on Eclipse 4.0<br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgeQI6mqK_VHTiAtJwTYhqWKQE3-wD-8DPx1jzUH4NNnIukx57-kAkD673hkZ7R6Qi35F_gym2Ikw6JB55GlOS5gYIOVtJnHj1sReihq4mC-tjbHACgo4hmL5D6c-vj689cpNsw_P5y9EU/s1600-h/democamp-2009-02.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 213px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgeQI6mqK_VHTiAtJwTYhqWKQE3-wD-8DPx1jzUH4NNnIukx57-kAkD673hkZ7R6Qi35F_gym2Ikw6JB55GlOS5gYIOVtJnHj1sReihq4mC-tjbHACgo4hmL5D6c-vj689cpNsw_P5y9EU/s320/democamp-2009-02.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5413575879160876802" /></a>Advanced networking facilities<br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiYTyRls5TnSgYqmRiVjwyYTVH8E8HkU0cbgy7L8-y1MNj3vs_r6ZI6UfcmCNsBzNBB3ulQiz-a6M473EU8J311GLmZzlYGOACFvGpY6Uw4zQkTLEoBWj6R2eVZoMGU1id07Z8uj6v_SdA/s1600-h/democamp-2009-03.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 213px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiYTyRls5TnSgYqmRiVjwyYTVH8E8HkU0cbgy7L8-y1MNj3vs_r6ZI6UfcmCNsBzNBB3ulQiz-a6M473EU8J311GLmZzlYGOACFvGpY6Uw4zQkTLEoBWj6R2eVZoMGU1id07Z8uj6v_SdA/s320/democamp-2009-03.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5413575873462153938" /></a>All the chairs in the building set up<br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg5Q2yLElNGK-fgbzu_O63FsRvR9rQ-I4LPiDWDAjjD1KB2JUOEmlzyqsIqGpw4trTFkUWTza8azYGtoSt7XWCcQyTj6A8aNqeDC9Qk2QIDQxNyg_an_dhlA-cIc5aTAlmxUfpnCTEwFhw/s1600-h/democamp-2009-04.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 213px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg5Q2yLElNGK-fgbzu_O63FsRvR9rQ-I4LPiDWDAjjD1KB2JUOEmlzyqsIqGpw4trTFkUWTza8azYGtoSt7XWCcQyTj6A8aNqeDC9Qk2QIDQxNyg_an_dhlA-cIc5aTAlmxUfpnCTEwFhw/s320/democamp-2009-04.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5413575756802311858" /></a>Making clear who paid for food and drink<br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiWUZY1X7JNxwg65dluFirq1OrWKYlQhtyNOx_BsSzR374039-HYqQpHlkCoYFP_lrDlu_5zXyWhgA6yEIqILMc_pkCsk7I3t5NELg6vfqK-VPEsR9oNFRLIXIo6kocoDEGGUt6sWpb788/s1600-h/democamp-2009-05.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 213px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiWUZY1X7JNxwg65dluFirq1OrWKYlQhtyNOx_BsSzR374039-HYqQpHlkCoYFP_lrDlu_5zXyWhgA6yEIqILMc_pkCsk7I3t5NELg6vfqK-VPEsR9oNFRLIXIo6kocoDEGGUt6sWpb788/s320/democamp-2009-05.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5413575755683887394" /></a> and quite crowd came to listen and watch<br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhDqwHBsvQBt-FCGymI5qWKz3dpZK7GlnSJV9YmwyPM61xKoOZrU3JWoezUKy3xx4v4Neopmy9cuNAMhrot3T6rMgFCa_7OIZ17lYZ-CjYy0JtMrDQ3BuW056VzJxiAvzsPeSNj9D7RUS4/s1600-h/democamp-2009-06.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 213px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhDqwHBsvQBt-FCGymI5qWKz3dpZK7GlnSJV9YmwyPM61xKoOZrU3JWoezUKy3xx4v4Neopmy9cuNAMhrot3T6rMgFCa_7OIZ17lYZ-CjYy0JtMrDQ3BuW056VzJxiAvzsPeSNj9D7RUS4/s320/democamp-2009-06.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5413575748510428994" /></a>Jeroen van Grondelle and Marcel Offermans about OSGI service patterns. (Only implemented in full in <a href="http://felix.apache.org/site/index.html">Apache Felix</a>), Jeroen stressed that we have to rethink our application for OSGi to fully take advantage of its facilities and not continue in our old Eclipse habits. Think service, not listener. <br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNze-P8ZwJz_1W1NCpcslm9f0F7qcNx0jBjDroLNZyCMu1B16yc0KZ4tuC8CYmrkbE-Dql6dckgg6lcpHJlsjuhOMkZRIBgrdR4T-Lhba6ZJ0ZuxL58AzbOd5yDFiJ1OgV9wde02L4-wQ/s1600-h/democamp-2009-07.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 213px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNze-P8ZwJz_1W1NCpcslm9f0F7qcNx0jBjDroLNZyCMu1B16yc0KZ4tuC8CYmrkbE-Dql6dckgg6lcpHJlsjuhOMkZRIBgrdR4T-Lhba6ZJ0ZuxL58AzbOd5yDFiJ1OgV9wde02L4-wQ/s320/democamp-2009-07.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5413575742307364546" /></a><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEisv42z5FHwyzQHltRCF0_ZNFwfyA6sbk6mncL5T0ymO-9Ms4Th-N46LvNlSDz3TUCz1hG02__L1P2ucx2FiNVGoIpRMy0up58ibxmKpq7qpKZ4QrC2QyLdB_nAmvpwzzbz2bKZ_WfOBi0/s1600-h/democamp-2009-08.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 213px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEisv42z5FHwyzQHltRCF0_ZNFwfyA6sbk6mncL5T0ymO-9Ms4Th-N46LvNlSDz3TUCz1hG02__L1P2ucx2FiNVGoIpRMy0up58ibxmKpq7qpKZ4QrC2QyLdB_nAmvpwzzbz2bKZ_WfOBi0/s320/democamp-2009-08.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5413575527752313010" /></a><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgtQpjK4rz_Ii8OiDikqhisZE3noel6n8qTP-x6B-ZNEHFpJ-PmGb2h43l09FTcHA5qvTaoWrSM4Y0kLuocXIT6YlV15kqUdgh3f_cDMFUQMX3M4f9GbtuGpP8jQ4duVHq66XHOwPV-ols/s1600-h/democamp-2009-09.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 213px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgtQpjK4rz_Ii8OiDikqhisZE3noel6n8qTP-x6B-ZNEHFpJ-PmGb2h43l09FTcHA5qvTaoWrSM4Y0kLuocXIT6YlV15kqUdgh3f_cDMFUQMX3M4f9GbtuGpP8jQ4duVHq66XHOwPV-ols/s320/democamp-2009-09.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5413575518672591586" /></a><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjRjEBV_FvotAaRaSiYenMTUB0pMLuPPOm2KD_cNEOd_0H23HpTEdDF4C7Ttl790-BGhKTNv83M0WTDtrlOvIU11a1KACjk0bRZWV8Bd4sbpbSC92evRYcg9RsdhhM54KjLqcbcJb9oSfM/s1600-h/democamp-2009-10.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 213px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjRjEBV_FvotAaRaSiYenMTUB0pMLuPPOm2KD_cNEOd_0H23HpTEdDF4C7Ttl790-BGhKTNv83M0WTDtrlOvIU11a1KACjk0bRZWV8Bd4sbpbSC92evRYcg9RsdhhM54KjLqcbcJb9oSfM/s320/democamp-2009-10.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5413575514329957234" /></a><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEirm75Nf71jKXSbn_RdFPbBxb1WxKIN5oCCAhiglQZIQTqUKxZTgm3QXbTWSmJ1Pl-J-4DRQ9lckreWTjRPbJDE0Q2Ca9NzyXsof3g0erVbW_JHaCM0yQLLvmVibf5ZteFF8tdQQw2mzH8/s1600-h/democamp-2009-11.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 213px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEirm75Nf71jKXSbn_RdFPbBxb1WxKIN5oCCAhiglQZIQTqUKxZTgm3QXbTWSmJ1Pl-J-4DRQ9lckreWTjRPbJDE0Q2Ca9NzyXsof3g0erVbW_JHaCM0yQLLvmVibf5ZteFF8tdQQw2mzH8/s320/democamp-2009-11.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5413575507123917186" /></a>Jim van Dijk on <a href="http://www.eclipse.org/pmf/">Presentation Modelling Framework</a>. We have to learn to think about UI in a whole different way again, not in terms of implementation (widgets, controls, HTML, ...) but in their abstractions: conversations, dialogs, compound dialogs, etc.<br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUiPJStQhG1EkqCooaShsXnuGUFpLnnoOsLuQZMx4lZU6ojT_4ObsWAztXd2QrVXOz3PbKzJrVEqQV9Owb0KJumtIkSvStUmq9k_m0hCo7KScNIEKDbKNeqrpa6ib6O0faK2_XnN2TLYo/s1600-h/democamp-2009-12.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 213px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUiPJStQhG1EkqCooaShsXnuGUFpLnnoOsLuQZMx4lZU6ojT_4ObsWAztXd2QrVXOz3PbKzJrVEqQV9Owb0KJumtIkSvStUmq9k_m0hCo7KScNIEKDbKNeqrpa6ib6O0faK2_XnN2TLYo/s320/democamp-2009-12.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5413575506066664834" /></a><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh93BiIH_YuqR-mxkJILtYxHLowF4U9IRIVSzYgIQJC2PrSMj88rBwER5M3v18WT7QL3BVLMG_5EANiVALpqyhsaXTSrPunVvfxHlFogLCXu3zPIWf3ga0lbQHcvv6lqSqwO0bjAesB9HA/s1600-h/democamp-2009-13.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 213px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh93BiIH_YuqR-mxkJILtYxHLowF4U9IRIVSzYgIQJC2PrSMj88rBwER5M3v18WT7QL3BVLMG_5EANiVALpqyhsaXTSrPunVvfxHlFogLCXu3zPIWf3ga0lbQHcvv6lqSqwO0bjAesB9HA/s320/democamp-2009-13.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5413575273001198994" /></a>Break for food and drink, THANK YOU Wim Jongman!<br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4u9X_ekGEI9ZV2ZRcAjnFi82q-NQ6ykz5GUG4eX2itq6Hu198NeNqRJtFhl4T80bGi29B_US9G3bOugQGzLYznJ0Dr14qNpARn2bj7IheHU0vsvFv2-6Nl3yhCbJV-zacUQAPLNJXPu8/s1600-h/democamp-2009-14.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 213px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4u9X_ekGEI9ZV2ZRcAjnFi82q-NQ6ykz5GUG4eX2itq6Hu198NeNqRJtFhl4T80bGi29B_US9G3bOugQGzLYznJ0Dr14qNpARn2bj7IheHU0vsvFv2-6Nl3yhCbJV-zacUQAPLNJXPu8/s320/democamp-2009-14.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5413575267877793522" /></a>That went down just as well as the presentations<br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6Le3EGTB_-Qtbfx8pGMLJH3Nvxu2YD15M0krnNhbaRx7kFxNcjOa7cgAxFcyWq9UTiaWTx79SxlIifUwsBdzgoee5GH2CKgMy3lpjsGGyrqegsQla_IS8SmdDehltMIngWeSbiIo8b4Q/s1600-h/democamp-2009-15.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 213px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6Le3EGTB_-Qtbfx8pGMLJH3Nvxu2YD15M0krnNhbaRx7kFxNcjOa7cgAxFcyWq9UTiaWTx79SxlIifUwsBdzgoee5GH2CKgMy3lpjsGGyrqegsQla_IS8SmdDehltMIngWeSbiIo8b4Q/s320/democamp-2009-15.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5413575260380230722" /></a>Roel Spilker and Reinier Zwitserloot talked about <a href="http://projectlombok.org/">Project Lombok</a> and showed the Lombox Eclipse plugin to the world for the first time! <br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgLqgHorLhY2e7alGepcmohI4DDqLNab4ggb5_MvIajEfRqlmfei0aOZXfO1nBfIHsBtjF4BrxgNZTaLwZAIxJ5Eiz_j0WfB6umvnjhmAdexJ0oNWwmNOAQhApZgT42NxrEFLQySEvkQKQ/s1600-h/democamp-2009-16.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 213px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgLqgHorLhY2e7alGepcmohI4DDqLNab4ggb5_MvIajEfRqlmfei0aOZXfO1nBfIHsBtjF4BrxgNZTaLwZAIxJ5Eiz_j0WfB6umvnjhmAdexJ0oNWwmNOAQhApZgT42NxrEFLQySEvkQKQ/s320/democamp-2009-16.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5413575256796180306" /></a>Wim Jongman and Marcel Offermans talked about and demonstrated OSGi in the cloud using Eclipse and <a href="http://incubator.apache.org/ace/">Apache ACE</a>. <br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYuxzPeyrYv6NkhW5pbyL9tljMn3lLU_p4tpPvuQ9czb65oQJVk0_0SqexCGkf1WlJGus6_hZ80Z3_Ilq3XLTb8w-i9xx8bb96HngWG_UhrZi4u2ayG-elvPkPMHys_ylb9IkU11q_c2o/s1600-h/democamp-2009-17.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 213px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYuxzPeyrYv6NkhW5pbyL9tljMn3lLU_p4tpPvuQ9czb65oQJVk0_0SqexCGkf1WlJGus6_hZ80Z3_Ilq3XLTb8w-i9xx8bb96HngWG_UhrZi4u2ayG-elvPkPMHys_ylb9IkU11q_c2o/s320/democamp-2009-17.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5413575250913941106" /></a>Finally we heard and saw Jelle Herold about Verostko graphics toolkit & Statebox process engine.<br /><h4>Conclusion</h4>A well hosted gathering with excellent presentations for a growing number of Eclipse enthusiasts.Maarten Meijerhttp://www.blogger.com/profile/05900699818398561644noreply@blogger.com2tag:blogger.com,1999:blog-8878360187292205236.post-25672535968109666262009-12-10T11:25:00.009+01:002009-12-10T12:24:35.314+01:00Decorating your JobsReinforcing your brand with every UI contact of your plugin is important in this competitive world. Many plugins launch Jobs when when Eclipse is starting up, to refresh their data, check the license, or whatever. Some Jobs display an icon to reveal the identity and reinforce the brand. Below is an example, showing two jobs that use text only and one with an icon.<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjnsamrxGl2Hy_X22_22wurLhfy6QXvtQ6GhEdRPBppGW2t3kgRGYyCuCg0vtoKE_p2ScHdydyvCJrSq9RtDU8KKMzaQqhEbWBnxI-LVjhDuiORfv0SU6k4vp3d8AXTRQmBgrcNeS-id0k/s1600-h/decoratedjob.png"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 202px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjnsamrxGl2Hy_X22_22wurLhfy6QXvtQ6GhEdRPBppGW2t3kgRGYyCuCg0vtoKE_p2ScHdydyvCJrSq9RtDU8KKMzaQqhEbWBnxI-LVjhDuiORfv0SU6k4vp3d8AXTRQmBgrcNeS-id0k/s320/decoratedjob.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5413551762988128210" /></a>So how is this achieved?<h4>step 1: register with Workbench ProgressService</h4>An Eclipse <code>Job</code> can belong to a family, where a family can be any java <code>Object</code>. The <code>ProgressService</code> maintains a table of icons associated with each family. So step one is to register your icon and family in your Activator's <code>start()</code> method.<br /><pre class="brush: java;highlight: [4,5,6,7]">@Override<br />public void start(final BundleContext context) throws Exception {<br /> super.start(context);<br /> getWorkbench().getProgressService().<br /> registerIconForFamily(<br /> getImageDescriptor(ICONPATH), <br /> MyTools.PLUGIN_ID);<br />[...]<br /> Rebuilder rebuilder = new Rebuilder("Initializing My Tools");<br /> rebuilder.schedule(20L);<br />}</pre><h4>step 2: override <code>belongsTo()</code> in your Job subclass</h4>Next you override the method <code>belongsTo()</code> in your subclass with some simpel logic, calling <code>super.belongsTo()</code>when not equal top allow for Job class hierarchies.<pre class="brush: java;highlight: [5,6,7]">public class Rebuilder extends Job {<br />[...]<br />@Override<br />public boolean belongsTo(final Object family) {<br /> if (family.equals(MyTools.PLUGIN_ID)) {<br /> return true;<br /> }<br /> return super.belongsTo(family);<br />}<br />[...]<br />}</pre><h4>Conclusion</h4>As always in Eclipse programming this solution took a long time to find, but can be implemented in a few lines of code once you know how.<h4>Caveat</h4>What remains is that you can only do this for Jobs that you launch yourself, and not for other background tasks like the Auto Build jobs that call your Builders.<br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBbw75C-SYbRWYZkERIhRUw0VmvOxLL8inV9L5GOcRcFdANCWuv-Jm8eTrYQDSrRZvdgcMjJyycXHPI29U-F-MguQ-JucSa3VW9Y1zvCDM4R2Vqo1VPzuQeT-1b4gfKweZrJZ027xn9OY/s1600-h/autobuildjob.png"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 123px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBbw75C-SYbRWYZkERIhRUw0VmvOxLL8inV9L5GOcRcFdANCWuv-Jm8eTrYQDSrRZvdgcMjJyycXHPI29U-F-MguQ-JucSa3VW9Y1zvCDM4R2Vqo1VPzuQeT-1b4gfKweZrJZ027xn9OY/s320/autobuildjob.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5413559911987839906" /></a>They all share the same icon :-(<br />I have created a bug for this, please support and vote <a href="http://bugs.eclipse.org/297465">here</a>.Maarten Meijerhttp://www.blogger.com/profile/05900699818398561644noreply@blogger.com3tag:blogger.com,1999:blog-8878360187292205236.post-68198247758325351542009-12-04T14:52:00.017+01:002009-12-04T16:09:14.757+01:00WorkbenchMarkerResolution is fantastic!One of my ongoing projects that is in beta now for a long time is <a href="http://www.fold1.com/eulumdattools/">EulumdatTools</a>, a special purpose editor and workbench for managing, verifying and editing EULUMDAT files. <a href="http://www.helios32.com/Eulumdat.htm">EULUMDAT</a> is a European de facto standard for photometric data files. It describes stuff like manufacturer, product name, lamp type, power consumption and luminous flux distribution for lighting products.<h4>Builder, IMarker and IMarkerResolution2</h4><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxCH-ksW_WPbS8R-QEGl-sj-t-WyrvgdseyuhQB1BrZZ1TUUYhr6RlHRDygXSW6nrfS9TNMNs1BnCJ2LgdVZGrxgy07WEhPgthYEkbVtPeMRhDOcSBXTOCxtr0jqLh3yE7WSiLrwWfzk8/s1600-h/quickfix-blog-1.png"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 242px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxCH-ksW_WPbS8R-QEGl-sj-t-WyrvgdseyuhQB1BrZZ1TUUYhr6RlHRDygXSW6nrfS9TNMNs1BnCJ2LgdVZGrxgy07WEhPgthYEkbVtPeMRhDOcSBXTOCxtr0jqLh3yE7WSiLrwWfzk8/s320/quickfix-blog-1.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5411382377766662450" /></a><br />I used Eclipse to create a Builder, IMarkers and IMarkerResolution2 to create a Validator, Problems view entries and Quick Fix solutions under CTRL/CMD+1 to resolve issues where file were not conforming to standard or incomplete (for the curious: some manufacturers do not provide the Direct Flux Factors). <br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhkvx2M76JgSJEpxhGUXU1yxNW44cUtk7HQ-dObPK7ttanXgVOI0FR_4-QOzd9Ob7DyjjpeMxOXhETvkFQFyWc8P0mtxlFlCFBkHFY-b8Vq0YGx7hKwUYTy_qsJ1ShXHqdO9Bq3lxpn7SA/s1600-h/quickfix-blog-2.png"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 314px; height: 320px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhkvx2M76JgSJEpxhGUXU1yxNW44cUtk7HQ-dObPK7ttanXgVOI0FR_4-QOzd9Ob7DyjjpeMxOXhETvkFQFyWc8P0mtxlFlCFBkHFY-b8Vq0YGx7hKwUYTy_qsJ1ShXHqdO9Bq3lxpn7SA/s320/quickfix-blog-2.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5411382384908975474" /></a>There are 10 of these Direct Flux Factors in every file, so it would be nice to be able to fix these all in one action.<h4>WorkbenchMarkerResolution to the rescue!</h4>After some research I found that that is easier to implement than I first thought! What you must do is make your Quick Fix code <code>extend WorkbenchMarkerReslution</code> instead of <code>implement IMarkerResolution2</code>.<br />This means you must implement one extra method: <code>IMarker[] findOtherMarkers(IMarker[] markers)</code>. You receive ALL of the markers in the problems view and must return an array of those you can handle in this Quick Fix, this is easy to implement with a loop and a <code>isValidOther()</code> method.<pre class="brush: java">public class ReplaceDFF extends WorkbenchMarkerResolution {<br /><br />private final IMarker originalMarker;<br /><br />// use constructor to remember original marker<br />public ReplaceDFF(final IMarker marker) {<br /> super();<br /> originalMarker = marker;<br />}<br /><br />@Override<br />public IMarker[] findOtherMarkers(IMarker[] markers) {<br /> List<IMarker> others = new ArrayList<IMarker>();<br /> for (IMarker marker : markers) {<br /> if (isValidOther(marker)) {<br /> others.add(marker);<br /> }<br /> }<br /> return others.toArray(new IMarker[0]);<br />}<br /><br />@Override<br />public boolean isValidOther(final IMarker marker) {<br />// is it the originalMarker, we don't want duplicates!<br />if(markerToCheck.equals(originalMarker)) {<br /> return false;<br />}<br /> // is it in the same file as original marker?<br /> if(!marker.getResource().equals(originalMarker.getResource())) {<br /> return false;<br /> }<br /> // is it the same validator?<br /> String checkerName = LightOutputRatioChecker.class.getName();<br /> if(!checkerName.equals(getCheckerName(marker))) {<br /> return false;<br /> }<br /> // is it the same error found?<br /> String checkerMessage = getCheckerMessage(marker);<br /> if(!checkerMessage.startsWith(<br /> LightOutputRatioChecker.DIRECT_RATIO_1))<br /> {<br /> return false;<br /> }<br /> return true;<br />}<br />[...]<br />}</pre><h4>The result is improved usability</h4>Running with this small modification gives us this Quick Fix Dialog:<br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhzkE_BZOVbHWR3_qAhuZ3ToEhwBCC2vuw1rhJkO8SyNQkdkXQXISM7abL5n_bZx1AvTMFGBskIifsT3RKMik7ubWjfqAf66U8W_oZuwxZ4IOHXakXJzlZqKa3LJWQgcNAcW2BVB7uf-RI/s1600-h/quickfix-blog-3.png"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 314px; height: 320px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhzkE_BZOVbHWR3_qAhuZ3ToEhwBCC2vuw1rhJkO8SyNQkdkXQXISM7abL5n_bZx1AvTMFGBskIifsT3RKMik7ubWjfqAf66U8W_oZuwxZ4IOHXakXJzlZqKa3LJWQgcNAcW2BVB7uf-RI/s320/quickfix-blog-3.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5411388901357747778" /></a>In practice the values are all correct or more than one is wrong, so handling this in one Quick fix will improve the users productivity in a big way. Click once, save the file and all warnings are gone...<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEga6KrPUnwTtRrlzrPvi1DPkCJcLjYijxXTUgKW4kCPGj2Np1fbZ717YZJnd74AzZKn1OJDM17loqc-klYw5IPsdw7K0m3ah7vkaMkTciwQI-tcgeVAj1Y-BGgrcSaWIogjbloYcT3pdh8/s1600-h/quickfix-blog-4.png"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 242px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEga6KrPUnwTtRrlzrPvi1DPkCJcLjYijxXTUgKW4kCPGj2Np1fbZ717YZJnd74AzZKn1OJDM17loqc-klYw5IPsdw7K0m3ah7vkaMkTciwQI-tcgeVAj1Y-BGgrcSaWIogjbloYcT3pdh8/s320/quickfix-blog-4.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5411392713015470370" /></a><h4>Final notes...</h4>I experimented with various filtering strategies before settling on fixing all similar errors in one file. Using the filters you can also opt to:<ul><li>Fix different errors all in the same file, when your run(IMarker) method can handle different errors.</li><li>Find all errors in the workspace, letting through all markers with this fix. But then each fix required the file to be opened, so that takes long time and this cannot be cancelled.</li><li>I may still try to check whether the file is already open and only suggest to apply the fix in these.</li></ul>Maarten Meijerhttp://www.blogger.com/profile/05900699818398561644noreply@blogger.com0