What is the result of mixing JDT and JavaFX into one project? Right you get an Java-IDE π You don’t believe me? Then watch this short video.
Freaking cool but how did I managed to get this work. First all of the whole thing is not a fake. I used different OpenSource technologies to make this work.
- JDT-Core: Correct JDT-Core is the same you use everyday in your eclipse, it provides you the incremental compiler, launch and debug support, …
- JavaFX: Right i used FX as the UI technology – it’s an experiment
- e4-core: For DI I used e4 stuff
- Equinox: Correct the whole thing is mixed together using OSGi
- e(fx)clipse-runtime: To make JavaFX run in OSGi, I used stuff from my e(fx)clipse project
Finally the big mystery where the hell is this nice editor coming from? First of JavaFX has no such nice control as SWTs StyledText but what it has is a Webkit-Browser and Java/JavaScript integration. So guess what the the editor you are seeing there is the one developed by the Orion project at Eclipse.org – no joke!
Packaging up the whole thing into a product without JavaFX the size is ~25MB – if packaging JavaFX so that you get a “crossplatform-no-prerequist” product the size would be ~92MB.
You doing scary things these days. π
Serious: this is very much impressive.
You, my friend, are on to something. What a great idea to use the webview this way.
So you are editing code on a browser hosted on a JavaFX widget and taking the code back to jdt-core to compile and run? Looks like black magic π
Nice work Tom.
Now if we could integrate it and the work that Dough Schaefer started.
Not sure I follow. So what work has Doug started?
Not sure what Dave is talking about. This trumps SWT on JavaFX which we both agree would be very difficult. I’m coming to the mind that we need to dump SWT in it’s entirety and start the UI from scratch. But that’s a huge job that is likely impossible.
Awesome! π How does the communication between browser and JDT work? Something comparable to BrowserFunction in SWT? What about the overhead when having to react on every single character typed?
Yes it is similar to the SWT-BrowserFunction – frankly I have not yet measured the performance but I’m reacting on every single keypress in the browser already. You can take a glance at the source which is as always is located at my github account – this time https://github.com/tomsontom/fx-ide.
The editor is at https://github.com/tomsontom/fx-ide/blob/master/at.bestsolution.javafx.ide.editor/src/at/bestsolution/javafx/ide/editor/SourceEditor.java and there you see I’m updating my Java representation on each and every keystroke – I don’t really expect any performance problems a user will notice.
Looks interesting, but I must admit, that I don’t see the implications, which seam to be obvious to everyone else.
Could you perhaps elaborate on what might develop from this “proof of concept”.
There are multiple interesting things going on here. First of suddenly JavaFX has a rich text editor. Second thing is that it shows how powerful and well designed Eclipse Technologies are and third this is a prototype of a new lightweight Java-IDE.
Is it possible to have a SWT implementation using JavaFX?
I don’t know if this is realy necessary. With e4 a JavaFX renderer is all you need.
As far as I know Tom and/or Kai Toedter are (or at least were) on this topic as well…
You are right – I’m not yet sure there’s a business usecase for SWT on JavaFX – but I did a proof-of-concept implementation.
So you asked – here it is https://tomsondev.bestsolution.at/2012/06/05/almost-totally-crazy/
I find it not scary but impressive! π
And I envy you to get all the stuff mixed together so well and I grow to come to the conclusion, that I’m a poor developer compared to you!
Pingback: Eclipse Techs on steroids | Tomsondev Blog