About mixing and matching JDT and JavaFX

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.

  1. JDT-Core: Correct JDT-Core is the same you use everyday in your eclipse, it provides you the incremental compiler, launch and debug support, …
  2. JavaFX: Right i used FX as the UI technology – it’s an experiment
  3. e4-core: For DI I used e4 stuff
  4. Equinox: Correct the whole thing is mixed together using OSGi
  5. 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.

16 thoughts on “About mixing and matching JDT and JavaFX

  1. Lars Vogel June 3, 2012 / 11:42 pm

    You doing scary things these days.🙂

    Serious: this is very much impressive.

  2. Sopot Çela (@smcela) June 3, 2012 / 11:53 pm

    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.

  3. David Carver June 4, 2012 / 1:10 am

    Now if we could integrate it and the work that Dough Schaefer started.

    • Tom Schindl June 4, 2012 / 8:08 am

      Not sure I follow. So what work has Doug started?

      • Doug Schaefer (@dougschaefer) June 13, 2012 / 3:33 pm

        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.

  4. Ralf Sternberg (@ralfstx) June 4, 2012 / 9:44 am

    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?

  5. Leo Roos June 4, 2012 / 4:07 pm

    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”.

    • Tom Schindl June 5, 2012 / 7:47 am

      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.

  6. Not Relevant June 5, 2012 / 8:46 am

    Is it possible to have a SWT implementation using JavaFX?

    • Daniel Zimmermann June 5, 2012 / 9:30 am

      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…

      • Tom Schindl June 5, 2012 / 10:06 am

        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.

  7. Daniel Zimmermann June 5, 2012 / 9:28 am

    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!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s