Meine Rückblick auf 2015 bei Jaxenter

Meine Beiträge zu "Entwickler blicken zurück auf 2015", Teile 1 – 5:

Eclipse Process Framework (EPF) on Linux 64 bit

This question has been discussed over and over again: How to run the Eclipse Process Framework on Linux 64 bit? The good news: I found a solution. The bad news: It’s not free, it involves CrossOver Linux for €48, which I am more than happy to pay. You can download the 2-week-trial to see whether it works for you.

Here are the step-by-step instructions:

  • Download and install CrossOver
  • Add a new Bottle of Type Windows XP (others may work, too).
  • Right-click and select "Install Software into Bottle"
  • Find and select"Java7" (it works for me, even though it states that it does not)
  • Important: Also install Internet Explorer 8. Without this, it will crash as soon as you try to use Rich Text
  • Download EPF for Windows (I tried 1.5.1.7, which works)
  • Open C: (right-click "Open C: Drive") and extract EPF to a location of your choice (I leave it in C:).
  • Test the installation from the Linux File Browser. Important: Don’t double-click, instead right-click and select "Open With… | CrossOver (Run)". Make sure that you load/create and open an element with rich text, e.g. a Role. If the browser is not correctly installed, then EPF will crash.
  • Create a Linux launcher, now that everything works. I usually create a .desktop file in .local/share/applications. The launcher command line is:
  • /opt/cxoffice/bin/wine –bottle #BOTTLE_NAME# –cx-app "C:\epf-composer\epf.exe" -data "Y:\epf-workspace"
  • The -data argument is optional, I use it to set the workspace to the location of my liking. Y: is mapped to the Linux user home, so adjust the path as you see fit.

I hope you find these instructions useful. Please let me know if things can be improved!

When to use WizardPageSupport: probably never (#Eclipse #JFace)

Admitted, what Lars Vogel shows in his tutorial looks tempting: Provide neat error messages in Eclipse Wizards using data binding.  But as so often (unfortunately), the code is half-baked, and therefore barely usable.  Data Binding works fine, but Validation, as described, sucks.

In this particular case, WizardPageSupport works well if you have Widgets that can be validated individually: For instance, making sure that an Email field contains emails.  But it breaks down, as soon as the validation takes multiple Widgets into account. Consider an Address field, for instance, where City and Zip Code (and many other fields) have co-dependencies.  Setting the the Zip code should clear the error message on the City, but I have not seen a straight forward way of doing this.

So I dropped WizardPageSupport altogether, and instead added a page-specific validation method to my model.  Then I added a listener to call the validation when anything changes:

public class Page1 extends WizardPage {     public Page1() {         ...         model.addPropertyChangeListener(new PropertyChangeListener() {             @Override             public void propertyChange(PropertyChangeEvent evt) {                 IStatus status = model.validatePage1();                 setMessage(status.getMessage(), status.getSeverity());             }         });     }     ... } 

And ironically, my code got shorter and cleaner, compared to using WizardPageSupport.  Frustrating, as the idea behind this class is neat.

Running Rodin 1.1 with Ubuntu 9.10

I had a few issues getting Rodin 1.1 to work properly after Updating Ubuntu to 9.10.  The main issue is the HTML-Viewer that Eclipse uses.  It wraps Firefox/xulrunner in an SWT-Control.  Unfortunately, Firefox 3.5 (xulrunner 1.9.1) is incompatible with Eclipse 3.4, on which Rodin is based.

To work around this problem, you need to install xulrunner 1.9.0.  I installed it locally at ~/opt/xulrunner-1.9.0.15

Next, you need to edit your rodin.ini (in the Rodin installation directory) and add the following line:

-Dorg.eclipse.swt.browser.XULRunnerPath=~/opt/xulrunner-1.9.0.15

That’s it!  This also works for running Eclipse 3.4 (in that case, you have to edit eclipse.ini).

Good luck!

Building a GWT app that is an Eclipse Plug-In

For my own reference:

  • Create a new GWT-Project
  • Give it a standard Plug-In name (e.g. de.jastram.gwtexample)
  • Give the Project the Plug-In Nature (Right-click on Project > Configure > Convert to Plug-in Projects…)
  • Add Dependency to de.jastram.jettyrunner
  • Add Extension de.jastram.jettyrunner.warrunner
  • Add a war-element
  • That’s it – don’t forget to compile.