e(fx)clipse 0.0.12 released

A little bit later than scheduled here’s the next release. This time the number of new features is smaller than in previous releases but there still some small nice additions. Let’s look into it.

Update to latest upstream modules

The new release comes with Eclipse 4.2M5. I also looked into up-dating the subclipse integration but at the moment the newest version is only provided for win32/64 and so I’m waiting until I can consume it from upstream. All other components (xtext, egit and mercurial) are unchanged.

Linux Support

As promised since the beginning. At the very moment the JavaFX 2.0 team provides builds for Linux e(fx)clipse will provide all in one downloads (one was able to install from the p2-site since the beginning). The JavaFX 2.0 Linux build provided is for 32bit and so is the e(fx)clipse all in one version you can download.

The linux support though is still a bit limited – the live preview (JavaFX-SWT-Integration) crashed my Eclipse instance.


Support for CSS 3 Selectors

I’ve added support for CSS 3 selectors as the screenshot below shows:

Support for LCD Text

I’ve added support for the newly introduced LCD Text support which is done in CSS using “-fx-font-smoothing-type”

It’s not really easy to follow which CSS-Attributes are added and sometimes the docs are not correct so if you encounter an attribute you definately know is working but the CSS-Editor marks it as an error file me a ticket.

Colors in CSS

I’ve added 2 things when it comes to colors inside the CSS-Editor. You can use a color picker instead of entering the rgb-value manually:

Thanks to Sebastian Zarnekow’s blog this was a piece of cake.

And for already existing colors the hover will display it:


Support for @DefaultProperty

Elements who mark one for their properties as the @DefaultProperty are now respected and you can omit the attribute-name for them making your the file more readable in many situations – whether you make use of this feature is up to you.

Support for Script-Value references

The syntax has been expanded to allow referencing of script values:


In this release it only received bugfixes. If you want to help with it file bugs, send me patches, … .


I’ve started working on SVG and FXG to FXML-Converters as I already outline in one my last posts my plan was to add them to e(fx)clipse to allow you converting those external formats to JavaFX 2.0 representations. You should not expect a lot for it as of now because they are in a very very early stage and as outlined in the above post JavaFX 2.0/2.1 (at least for SVG which I looked a bit closer) won’t provide enough API to implement a fully compliant convert as of now.

The main purpose to add them already today into e(fx)clipse is to receive feedback from you on problems you encounter. I hope you share the source SVG and FXG drawings with me or even provide a patch?

An interesting sidenote on this is that technically I’m transforming the source formats into an EMF-Model (there’s a specific one for SVG and one for FXG) and then do the conversion using xtend (a Eclipse and Java-Developer should get started with xtend within 30 minutes because the tooling feels so similar to your JDT-Editor).

Just one final sentence on FXG: Adobe if this is really the spec of a format I’m happy I never had work with your stuff – take a look at SVG-Spec on how I expect someone to define a (graphic) format.

Community Support

I’ve been receiving more and more mails to my private account and I’m always grateful to help but to not only put the burden on me I decided to open a google-group where people can ask questions, others can help too, … . I’ll try to update the fxgraph-reference as well but you know I’m doing this in my spare time and so things take time.

If e.g. you mastered the first steps in fxgraph and want to share your findings, don’t hesitate to send a message to above group. I’ll plan to add an extra page to http://efxclipse.org so that people have a central place to find informations. I’m happy for reviews in blogs (even if there are things you don’t like about e(fx)clipse I want to know them).

You can find the new group at: http://groups.google.com/group/efxclipse. Come, join and bring up ideas to make e(fx)clipse a success.

What’s cooking for the next releases

  • Bugfixes
  • Code improvements (make FXML and FXGraph use the same code base e.g. for content proposals)
  • EclipseCon preperation – If you haven’t seen this. We are going to demonstrate a JavaFX-e4-Application which live snycs with an SWT-e4-Application
  • SVG-Path-Editor based on Xtext naturally (the grammer is already in the git-repo)

SVG for FXML-Conversion

So some weeks ago I read Jasper Potts blog on FXG to FXML-Conversion tool (useing simple XSL-Stylesheet). This blog Jasper asked if there’s probably one day someone providing a conversion tool for SVG.

This has been on my list for some time now and because I was traveling a bit in the last 2 weeks I had some time to hack on such a converter. I’ve not used XSL but instead used xtend (svg-parser (java),fxml-converter (xtend)) (because an XML-File comes with a lot of multiline strings). It took some time to wrap my head around SVG and how I could translate this in FXML/JavaFX 2.0 API calls but I finally I’m at a point where I have something to show off:

Please note that the JavaFX 2.0 image on the left is only made up of primitive JavaFX 2.0 elements (Circles, SVGPaths, Rect, Gradients, …) and it by far does not yet handle all the nifty stuff one can do with SVG but it shows me that such a conversion tool is doable to some extend though e.g. when it comes to filtering, … SVG has much more definitions than the JavaFX-API currently provides.

I was not even able to convert the SVG-Gaussian-Blur to JavaFX’ Gaussian-Blur (but that might just me I’m not an expert in graphics stuff), SVG allows to apply multiple filters/effects to a node, … . So to provide full SVG-Support – without residing to libraries like Batik – in JavaFX 2.x we’d need more API (or at least a tutorial how to e.g. write custom effects) but even with the current API one can get quite far as you don’t notice any missing thing in the above screenshot.

I’ve pushed the orignal svg-File (from the KDE oxygen-theme) and the resulting fxml-File to my git repo so that you can compare them.

e(fx)clipse 0.0.11 released

Grrrrr. This now very embarrassing because after i pushed the build to my server and published the release post I found 2 major regressions who make editing fxgraph-Files fairly tedious. I also had a problem with my release script for the 3.7.0 version where I packaged the 0.0.9 version of e(fx)clipse instead of 0.0.10.

So I decided to make another release 0.0.11 which fixes the regression and the packaging. Sorry if this caused trouble to you but this simply slipped through my checks. For those who already downloaded the broken 0.0.10 release I’m sorry but you should redownload version 0.0.11 (it also includes one new feature).



Preview Keyword

The keyword has been already part of the language but now its semantics are fully implemented. You can now prefix an attribute in your FXGraph-File with preview and so the content is only passed to the preview but not into the serialized file. I added this feature because sometimes it is necessary to fill controls with data to see how their layout changes. A good example in this sense is the ChoiceBox who layouts itself according to its content.

e(fx)clipse 0.0.10 released

The 0.0.10 release is broken. Please update to 0.11

3 weeks after 0.0.9 (and one day behind schedule because of New Years day) I just pushed 0.0.10 to http://efxclipse.org/. There are many improvements which will take a look later on and take a look at the provided all in one downloads who’ve been received quite well by the community. In the last 3 weeks I registered the following downloads:

  1. eclipse-SDK-3.7.1-efxclipse-0.0.9-win32.zip: 101
  2. eclipse-SDK-4.2M4-efxclipse-0.0.9-win32.zip: 55
  3. eclipse-SDK-4.2M4-efxclipse-0.0.9-win32-x86_64: 49
  4. eclipse-SDK-3.7.1-efxclipse-0.0.9-win32-x86_64: 41
  5. eclipse-SDK-3.7.1-efxclipse-0.0.9-macosx-cocoa-x86_64: 13

So they are eating up quite some bandwidth (~100GB in December). Let’s now dive into the new features one by one.

All in one downloads

The aim of the all in one downloads has been to give developers an easy way to start writing JavaFX applications. Now that JavaFX is provided as opensource in the openfx-project to give Eclipse users an easy way to contribute I added the mercurial-plugin 1.9.1 to the all in one downloads so that you can access the openjfx-repository without the need to install anything new. I also upgraded to Xtext 2.2.1 and EGit 1.2.0 so that you have the newest bugfixes in your IDE.


Internal changes

There are 2 internal changes that happened which you might not directly notice.

SWT-Interop for the LivePreview

One of the internal things I’ve changed was that since 2.0.2 there’s is direct JavaFX-SWT interop available I switched from my hacky JavaFX – Swing – SWT_Swing_Bridge – SWT to it which has 2 consequences:

  • JavaFX 2.0.2 is hard requirement for e(fx)clipse 0.0.10
  • Mac-Support is working and fully supported

JavaFX library look up for the live preview

Until 0.0.9 the look of the JavaFX library for the Live-Preview was done on win32 by consulting the Windows registry and on Mac OS-X by looking for an ENV-Variable (JAVAFX_HOME).

The approach had a draw back because it could have happened that the SDK you had configured in your IDE and the JavaFX version used for the live preview could have gone out of sync. This has now changed and when running inside the IDE the configured SDK version is used instead. This makes it much easier for OS-X users because they now don’t have to reconfigure their ENV to use the live preview.


FXGraph is my custom DSL used to author FXML-Files. I promised that I’ll provide a FXML to FXGraph roundtrip converted but I’ll have to defer this for 0.0.11 or even later.

Support for factory methods

I’ve added support for factory-methods and to really support them I had to change the language a bit which is not a problem because noone could have used this feature because though the language had the keyword for it it was not implemented appropiately.

The syntax looks like this:

New Outline

The outline view in 0.0.9 was the default one provided by Xtext. I’ve invested some time in 0.0.10 to customize it and show informations in a similar fashion the JDT-Outline view does.

Here are screenshots of the results:

Content Assist improvements

The content assist has been improved tremendously by limiting the results to values assignable to the left.


The formatting like idents, spaces, line breaks, … have been customized so that you can now press CTRL+SHIFT+F like you are used to in Java-Files and the your source gets formatted nicely.

JavaDoc everywhere

The JavaDoc is now shown everywhere like you are used to it in Java-Files as well. For example when showing the content assist for properties the JavaDoc is displayed next to the proposal.

Autocompleteion for Enum values

Attributes who are represented as enum-Values now provide a content proposal.

Wizard improvements

The wizard has been improved to add support for custom root elements (and remembers them for the next time).


So in 0.0.9 I switched the FXML-Editor from a custom written to an Xtext backed one (the only feature I had by then was to provide attribute proposals).

So while I also added new features to FXGraph most of the time I spend in this release cycle was on the FXML-Editor front which now has decent sub-element proposals, JavaDoc support, … . The features are yet not as advanced as they are in fxgraph but they are coming along nicely.

Subelement proposals


Not all elements yet show the JavaDoc appropriate for them but the most important ones already do.

Live Preview

I think that this is the most interesting feature of the FXML-Tooling because it allows you see the resulting UI while you are authoring the FXML-File.

FXML currently does not support to encode custom informations into it because it does not allow one to use itsown XML-Namespace. To make the live preview load the CSS-Files and message.properties one has to add a mapping file in the root directory of the project. The FXML-Wizard will create one for you, if you already have fxml-Files and want to add the configuration-file your own simply create a file named “fxml-preview.properties” in your project (at the toplevel, not inside the src-Folder) and add the following content:

# -------------------------------------
# Configuration setting for FXML-Files
# -------------------------------------

# -------------------------------------
# Values applicable to all FXML-Files
# -------------------------------------

# fxmlpreview.all.stylesheets=test.css            # Comma seperated list of css-styles
# fxmlpreview.all.messagefile=messages.properties # Properties file

# -------------------------------------
# Values applicable to a specific FXML-File 
# (replace ${fxmlfilename} with your filename WITHOUT the fxml-suffix)
# -------------------------------------

# fxmlpreview.file.${fxmlfilename}.stylesheets=test.css              # Comma seperated list of css-styles merged with default styles
# fxmlpreview.file.${fxmlfilename}.messagefile=messages.properties   # Properties file overrules default properties

I think the file is self-explanatory.