Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » e(fx)clipse » GEF5 with e4 RCP and Tycho(Cross post from GEF forum)
GEF5 with e4 RCP and Tycho [message #1838029] Sat, 13 February 2021 22:16 Go to next message
Ken Keefe is currently offline Ken KeefeFriend
Messages: 41
Registered: April 2012
Member
This is a cross post from the GEF forum. One of the GEF guys suggested I post my topic here because the current problem is javafx related, which GEF5 is tightly integrated with. Here is the original post:

I have a large commercial application that used to be Eclipse RCP 3.x with GEF 3.x. I've transitioned it to a pure e4 RCP application and I'm trying to make it work with the latest GEF 5. I have been struggling with JavaFX and GEF 5 for a while now. To try and work the problem, I set out to create a small working example that can help me and hopefully others understand how to configure an e4 application with GEF 5. I also have a subsequent goal of building the whole thing with a headless Tycho build.

I am currently stuck and I hope to get some help to make this proof of concept application work. You can check it out here: https://github.com/kjkeefe/e4gef5shapes

The README explains how to get it imported and running (although it is broken with a javafx problem). The README also shows the current sticking point.

Please let me know if you have any questions or ideas for how to improve this example. If you can help just get me past the current error, I can spend some more cycles on the next steps.

Thanks,
Ken
Re: GEF5 with e4 RCP and Tycho [message #1838030 is a reply to message #1838029] Sat, 13 February 2021 22:22 Go to previous messageGo to next message
Ken Keefe is currently offline Ken KeefeFriend
Messages: 41
Registered: April 2012
Member
As Tom pointed out over on the other post, I am trying to bundle the javafx libraries in my own bundles so that when I distribute my application, my users don't need to install JavaFX first and my application doesn't need to perform some discovery of the JavaFX libraries and configure the eclipse.ini to point to the right path. Bundling it like this seemed like a simpler solution, but it looks like I am missing something.
Re: GEF5 with e4 RCP and Tycho [message #1838052 is a reply to message #1838030] Sun, 14 February 2021 20:11 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
I try to clone your repo in the next few days and see what I can find. In general we advise people to not repackage javafx but use the adapter-hooks from efxclipse because then JavaFX runs as a JPMS-Module which is the only officially supported way.
Re: GEF5 with e4 RCP and Tycho [message #1838090 is a reply to message #1838052] Mon, 15 February 2021 19:51 Go to previous messageGo to next message
Ken Keefe is currently offline Ken KeefeFriend
Messages: 41
Registered: April 2012
Member
I am happy to do it any way that you recommend. I just don't want to require my users to install something before my software is installed. It'd be great if there was a simple Maven dependency or Eclipse feature I could include in my product definition. Thank you for working on it.
Re: GEF5 with e4 RCP and Tycho [message #1838504 is a reply to message #1838090] Fri, 26 February 2021 16:14 Go to previous messageGo to next message
Ken Keefe is currently offline Ken KeefeFriend
Messages: 41
Registered: April 2012
Member
Thomas, were you able to clone the repo and work on a solution?
Re: GEF5 with e4 RCP and Tycho [message #1838605 is a reply to message #1838504] Tue, 02 March 2021 10:41 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
Sorry not yet - swapped with company related work - but I have not forgotten about it
Re: GEF5 with e4 RCP and Tycho [message #1839423 is a reply to message #1838605] Sun, 21 March 2021 04:55 Go to previous messageGo to next message
Ken Keefe is currently offline Ken KeefeFriend
Messages: 41
Registered: April 2012
Member
Hi Thomas. I just wanted to ping you on this item again. Thank you for your help!
Re: GEF5 with e4 RCP and Tycho [message #1839663 is a reply to message #1839423] Thu, 25 March 2021 10:44 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
Yeah - I'm a bit swapped with work so I don't have enough cycles to work on OSS stuff. But I have not forgotten about you and I feel a bit bad that I didn't yet respond to your very well prepared example
Re: GEF5 with e4 RCP and Tycho [message #1839951 is a reply to message #1839663] Thu, 01 April 2021 21:45 Go to previous messageGo to next message
Ken Keefe is currently offline Ken KeefeFriend
Messages: 41
Registered: April 2012
Member
Any chance you have had some time to look at this?

If there are any ideas you can suggest I look into, I'm happy to try it out. I really just want to get my e4 RCP app working as soon as possible.
Re: GEF5 with e4 RCP and Tycho [message #1840106 is a reply to message #1839951] Tue, 06 April 2021 22:47 Go to previous message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
So I sat down tonight and looked at your project.

Let's start with the CNF:
This happens because the gef bundles DO NOT use package-imports because they assume JavaFX is on the Application/Extension-Classpath hence the classloader delegation in Equinox will not look up anything in your "Repackage-JavaFX-Bundles". You can fix that by creating fragments to the various GEF-Bundles (eg org.eclipse.gef.mvc.fx.ui) and require there your extra-Bundle. I think I had to add 4 Fragments to get a step further.

Your extra bundle dependency tree is not right:
As you rebundle javafx.embed.swt you miss you need to add a require-bundle for org.eclipse.swt.

Your extra platform bundles miss the native code header:
Your repackage bundles have to have native code headers informing OSGi about your packaged dylib/dll/so-Files.

Unfortunately I still ran in problems because of what ever reason libglass was not found. And there I gave up and decided to go with how we at efxclipse advice to setup and run OpenJFX inside OSGi. I opened a PR https://github.com/kjkeefe/e4gef5shapes/pull/1. Unfortunately you currently have to go with the 11-Release of JavaFX because there's a bug in your p2-repository when it comes to javafx.embed.swt but I'm going to fix this and then you should be able to upgrade to OpenJFX-16
Previous Topic:e(fx)clipse offline installation
Next Topic:FXML and CSS autocomplete not working
Goto Forum:
  


Current Time: Fri Dec 27 03:42:36 GMT 2024

Powered by FUDForum. Page generated in 0.07136 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top