A while ago I wrote about how the JavaFX Eclipse plugin has some shortcomings. Luckily, the plugin is released under an Open Source license (BSD). Therefore, the source is available, and anyone can fix problems and supply patches.
So I decided to do just that, and checked out the code from the Subversion repository. I followed the steps described in the Wiki to get the project compiled.
The first thing I ran into, is that the default target didn’t exist. That was easy enough to fix.
Next, it bothered me that I needed to provide several properties on the command line. For instance I needed to specify
-DeclipseDir=/opt/eclipse every time. So I patched the build to get this location from the environment variable
ECLIPSE_HOME which I set in my
The same goes for the location of the JavaFX SDK. I introduced a
JAVAFX_HOME environment variable to store that location. With these three modifications I could finally issue a build with just a simple
With the build working it was time to tackle one of the problems I encountered during my usage of the plug-in. I figured it would be easy to fix the issue where compilation errors use up three lines in the
Problems view, so that’s where I started. Based on information in the book Eclipse, Building Commercial-Quality Plug-ins, I knew I had to look for
IMarker. There was only one such place in the code, so the problem was easily fixed. Progress at last!
I took a look at the other issues that were reported against the plug-in. There might be easier ones than the ones I experienced 😉 Indeed, someone noticed that the JavaFX perspective missed an icon. At first I couldn’t reproduce it, but that was because I was starting the plug-in from Eclipse. The official distribution did show the problem. Luckily, the bug reporter also found the cause: the icon used wasn’t part of the jar. A simple addition to
build.properties fixed that.
Five patches already! I was feeling pretty good about myself 🙂
Next, someone wanted help with
import statements. That was a lot trickier, but probably also a lot more valuable. Having looked at the
IMarker code before, I naturally wanted to add a marker resolution.
This turned out to be a lot more work than I anticipated, but I managed to get something working. There were some glitches, and it probably needed a lot more testing for corner cases, but I could add a missing import statement based on the class name. Because I felt that this code wasn’t ready for prime time yet, I didn’t supply a patch, though.
This patching frenzy took place during the holidays. I got no response from Sun during that time, but I guess that was to be expected, given the time of year. So I decided to wait until some time into the new year to see what would happen.
Monday January 5 went by without news, but this morning I started to receive a stream of email notifications about issue tracker updates. Several of my patches were being accepted, and then I even received notification that I was given commit access! Such are the wonders of Open Source…