I’ve just pushed the bits for 0.0.9 into the git-repo and the uploaded the p2-repo and all-in-one downloads to efxclipse.org. This release comes with new features and as always bug fixes.
We’ve added new wizards to create a JavaFX Library Project in contrast to JavaFX Project which is the main application project. There are new wizards to create an Preloader and Application class.
The Preview control can be put into a mode where it loads the associated controller and creates an instance of it, including all bindings defined, … . The foundation for this feature was to provide the whole projects classpath to the FXMLLoader which is needed to reference e.g. custom controls developped in your project as well as other none JavaFX components like the MigLayout port for JavaFX.
I’ve started documenting the DSL at http://efclipse.org/fxgraph.html.
I decided to redefine some keywords (previewCssFiles is now called styledwith, previewResourceFile is now called resourcefile, previewClasspathEntries is not needed anymore because the projects classpath available in the preview).
I’ve added the (optional) concept of namespaces to the DSL which makes sense once you want to reference other FXGraph components inside your FXGraph-Definition.
So your DSL file can now start with something like this:
Including other components
At the language level this feature was already present since the start but it was not implemented until now.
The Preview currently does not support loading those subcomponents but I’ll try to make this work in 0.0.10.
Support for translations from resource files
There’s a new keyword rstring which allows you to mark that a given string should be looked up in the given resource file instead of used as is.
Improved (singlevalued) attribute content proposals
The class proposal displayed for single valued attributes now take the accepted object type into account which reduces the number of proposals tremendously in most cases.
Reading the above paragraphs one might think e(fx)clipse is only about my custom DSL but to demostrate this is not I’ve started – as promised – on an FXML-Tooling support. Please note the support is currently really rudimentary (only simple attributes on elements) but what I have now is a foundation to build on in the next release.
I’ve experimented a lot in the last days (e.g. building an in memory logical model using SAX) but I finally once more used Xtext to built up an in memory model of the XML-File because there would have been so many things I’d have had to write my own when doing the parsing myself.
The Preview component does not yet support the FXML-Files but is scheduled to get supported with 0.0.10 with many more FXML improvements as well as bidirectional FXGraph to FXML conversion. Because of this planned feature the fxml-Document created from FXGraph-Files is now written next to the FXGraph-File.
No new features have been released in the runtime components but Kai is busy working on the e4 front and we hope to provide new features with 0.0.10.
Other soft facts
I’ve updated to Xtext and Xtend 2.2 which are now a prerequisit because I’m using some of their bleeding edge features in the DSL. The All-In-One downloads are now built on top of Eclipse 3.7.1 (For the cowards) and 4.2M4 (For the adventurous) and naturally also include Xtext and Xtend 2.2.
Bugtracking and contributing
We now have a bugtracker at http://efxclipse.org/trac if you are seeking for a feature, discover bugs (which is very likely), … I can only hope you’ll find the time to report them.
I plan to release a new version every 3 weeks which is half the time of an Eclipse Milestone cycle. So every time the Eclipse SDK releases a new version so does e(fx)clipse. The only exception might be support for 3.7.2 where an All-In-One build with the latest e(fx)clipse version at time will be provided.
Downloaded 4.2M4. It can’t find the xtext. I checked “contact all…”.
Looks like the xtext 2.2 stuff is not yet in juno repo. Could you try add http://download.eclipse.org/modeling/tmf/xtext/updates/composite/releases/ to your repositories.
This looks really intriguing. I installed it with no trouble, but I can’t get even a trivial app to run (a main file, with a simple fxgraph, whose fxml I load in my start method. Here’s a backtrace from Eclipse debug. Any idea what I’m leaving out?
Thread [JavaFX-Launcher] (Suspended (exception NullPointerException))
SystemProperties.setVersions() line: 81
SystemProperties.access$200() line: 31
SystemProperties$1.run() line: 66
AccessController.doPrivileged(PrivilegedAction) line: not available [native method]
SystemProperties.() line: 62
LauncherImpl.launchApplication1(Class, Class, String) line: 140
LauncherImpl.access$000(Class, Class, String) line: 27
LauncherImpl$1.run() line: 97
Thread.run() line: not available
Hard to findout what’s going on. Would you mind ziping up and sending me your project and give me some informations about your platform (OS, version of Java, 64bit or 32)? You can send me the project to tom dot schindl at bestsolution dot at.
Thanks for looking at it, all better now. It was a careless error on my part, combined with an unhelpful error on JavaFX’s part.
Pingback: Java desktop links of the week, December 19 | Jonathan Giles
Pingback: JavaFX links of the week, December 19 // JavaFX News, Demos and Insight // FX Experience
I’ve just upgraded to this new release and installed it OK without problem. I’m using Eclipse 3.7.1.
Just to say thank you for your promising plugin. I’m eager to see the improvements of the upcoming release.
I will post any issue I might have during the using to the bugtracker.
I tried running the plugin with the prefconfigured Eclipse 3.7.1 distro from efxclipse.org, but the FXGraph Preview won’t run since it just can’t find a JavaFX class (JFXPanel). I did set the JavaFX-SDK-Directory in Preferences. Are there any additional steps neccessary to use the plug-in? Does JavaFX need to be a OSGi bundle? Any help is appreciated, as I’m really interested in the Live Preview feature of this plugin! Looks promising!
An excerpt from the error message:
PS: I’m running Mac OSX Snow Leopard
Well the thing is that until some weeks it was not possible to bundle JavaFX with any application. The trick e(fx)clipse uses is to provide a fake bundle which exports all JavaFX-packages and at runtime it locates the JavaFX-Binaries and creates a custom classloader.
On OS-X the problem is how to locate the FX-Jars on the system (on win32 this is done through the Windows Registry). The workaround I used is that i require you to set the JAVAFX_HOME-variable pointing to the JavaFX-Install location.
The real problem on OS-X in 0.0.9 though is that the focus is jumping from the editor to the preview while you are typing so it is not very useable (there’s a JIRA-Entry for this problem already). Since I’ve switched to FXCanvas in 0.0.10 this will be solved hopefully with the next release (due early next week).
I hope i can provide a prebundled JavaFX-OSGi bundle in 0.0.11.
Thanks for your fast reply! So I’ll currently stay with my self-written reload&preview mechanism for FXML files, until your next release.
The next release will bring direct FXML-Support so you don’t even have to use fxgraph anymore (unless you are like me and don’t like to edit XML directly)
Reto did you had a chance to give 0.0.11 a spin, might be interesting to hear from a Mac user if things are working as expected or what I should/have to improve to make you use e(fx)clipse.
I only had a few minutes to test it on my Mac. Preview of FXML files is working and looks good! I experienced a crash though when pressing a Menu entry from within this example (https://github.com/tomsontom/e-fx-clipse/blob/master/at.bestsolution.efxclipse.testcases.fxgraph/src/at/bestsolution/efxclipse/testcases/fxgraph/AddressBook.fxml)… Eclipse (Indigo) just closed/crashed everytime. Maybe you can check that on Windows.
on win32 all is fine and I’m experienceing the same thread dump on os-x. I’m going to log a bug.
Logged as: http://javafx-jira.kenai.com/browse/RT-18837
Very well done. Today I have an application built in less than 4 hours (Menu, BorderPane, TabPane, GridPane). With a little practice goes the loose in 1 hour. DSL is a bit simpler than XML.
The viewer is very helpful. Total of everything is now very stable.
Incredibly all with Xtext.