Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Running GEF5 with Open JDK 17 and Open JavaFX 17 on Eclipse 4.25
Running GEF5 with Open JDK 17 and Open JavaFX 17 on Eclipse 4.25 [message #1860628] Tue, 22 August 2023 12:19 Go to next message
Rishabh Sharma is currently offline Rishabh SharmaFriend
Messages: 3
Registered: August 2023
Junior Member
Hi ,

I've been trying to setup GEF5 on Eclipse 4.25 with Open JDK 17 and Open Java FX 17. I was successful to some extent however when I tried to use GEF's creation policy (org.eclipse.gef.mvc.fx.policies.CreationPolicy) to draw a visual, there was an exception and I could not draw the visual on the canvas.

The Exception was
java.lang.NullPointerException: Cannot invoke "org.eclipse.gef.mvc.fx.parts.IContentPart.getRoot()" because "part" is null
at org.eclipse.gef.mvc.fx.policies.CreationPolicy.createFocusOperation(CreationPolicy.java:217)
at org.eclipse.gef.mvc.fx.policies.CreationPolicy.create(CreationPolicy.java:152)
at org.eclipse.gef.mvc.fx.policies.CreationPolicy.create(CreationPolicy.java:201)


I debugged the issue and found out some things mentioned below

The issue is that in the CreationPolicy.create method , we add a Content Child to a Parent ContentPolicy, (Line num : 119) which, in short , adds a child Content Part to an ObservableListWrapperEx of the parent through the setAll Operation.

The following piece of code then triggers an event

helper.fireValueChangedEvent(
new ListListenerHelperEx.AtomicChange<>(this,
previousContents, ElementarySubChange.replaced(
previousContents, delegate(), 0, size())));

which the JavaFX17 should respond to an then the Actual Content Part is retrieved from the Content Factory.

But in JavaFX 17 --> javafx.collections.ObservableListBase<E> --> void javafx.collections.ObservableListBase.fireChange(Change<? extends E> change method, the listenerHelper is null for this list and hence the event is then ignored.


However, I was able to get it to work with OpenJDK11 and Open JavaFX 11.
I also need it to work on OpenJDK 17 and Open JavaFX17.


Did I do something wrong in the setup?

I'm using GEF 5 on both my setups and e(fx)clipe 3.7.0 with eclipse 4.14 and OpenJDK 11
and e(fx)clipse 3.9.0 with eclipse 4.25 and Open JDK 17.

Any help would be appreciated.

Thanks and Regards,
Rishabh
Re: Running GEF5 with Open JDK 17 and Open JavaFX 17 on Eclipse 4.25 [message #1860664 is a reply to message #1860628] Thu, 24 August 2023 13:54 Go to previous messageGo to next message
Tamas Miklossy is currently offline Tamas MiklossyFriend
Messages: 151
Registered: February 2016
Senior Member
Hello Rishabh,

Could you please also share your experience as a comment on the following blog post:
https://blogs.itemis.com/after-eight-eclipse-anwendungen-mit-efxclipse-javafx-openjdk-mit-java-11-erfolgreich-aufsetzen

itemis AG is interested in making Eclipse GEF5 running on Java 17 and document it properly.

Thanks!
Tamás
Re: Running GEF5 with Open JDK 17 and Open JavaFX 17 on Eclipse 4.25 [message #1860665 is a reply to message #1860664] Thu, 24 August 2023 13:56 Go to previous messageGo to next message
Tamas Miklossy is currently offline Tamas MiklossyFriend
Messages: 151
Registered: February 2016
Senior Member
The english version of the blog post is available under: https://blogs.itemis.com/en/after-eight-eclipse-development-with-java-and-javafx

[Updated on: Thu, 24 August 2023 13:57]

Report message to a moderator

Re: Running GEF5 with Open JDK 17 and Open JavaFX 17 on Eclipse 4.25 [message #1860988 is a reply to message #1860665] Wed, 13 September 2023 09:57 Go to previous message
Rishabh Sharma is currently offline Rishabh SharmaFriend
Messages: 3
Registered: August 2023
Junior Member
Just an update here.
I was successfully able to setup GEF5 with Open JavaFX 17 and OpenJDK17,

All I had to do was revert my GEF5 installation to the one specified here : https://download.eclipse.org/tools/gef/updates/releases/5.0.0_gef-master_4403/
Looks like there is a bug in GEF5 when installed directly from Eclipse 4.25's update site.

Thanks,
Rishabh
Previous Topic:How to - set up eclipse development with open JFX Java > 8
Goto Forum:
  


Current Time: Sat Nov 11 05:59:40 GMT 2023

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

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

Back to the top