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 Go to next message](https://www.eclipse.org/forums/theme/Solstice/images/down.png) |
Rishabh Sharma![Friend of Eclipse Friend](https://www.eclipse.org/donate/web-api/friends_decorator.php?email=rishabh.sharma5797%40gmail.com) 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
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02019 seconds