GEF5 + e(fx)clipse // Problem DragNDrop Shapes (Double Click ?) [message #1791389] |
Thu, 28 June 2018 10:52  |
Eclipse User |
|
|
|
Hello,
i'm currently experimenting with eclipse e4 RCP and GEF5. I'm evaluating currently 2 Variants. The 1st is e4 RCP based on SWT and GEF5. The GEF-Component is very similar implemented like the official GEF-Example-App.
The 2nd is mostly the same except that it is based on e(fx)clipse (JavaFX).
After starting both Applications everything looks good and similar. But one Thing is strange:
In the e(fx)clipse Variant i must do a "Double-Click-And-Press" on a Shape to move the Shape on the Viewer.
On the SWT-Variant i'm good with a "Single-Click-and-Press".
Is somebody know if there are some known Issues with that Click-Events on SWT/JFX After a Migration?
It would be great if somybody can give me an hint. After a few hours of analysis i have no Idea where the Problem is.
Best Regards,
Shawn
|
|
|
|
Re: GEF5 + e(fx)clipse // Problem DragNDrop Shapes (Double Click ?) [message #1791882 is a reply to message #1791841] |
Fri, 06 July 2018 09:11   |
Eclipse User |
|
|
|
Hi Shawn,
I have used GEF inside pure JavaFX-rendered Eclipse before some time ago, so I believe it should work pretty seamlessly, a few things need special care though (e.g. domain activation), but no big deal.
If I was facing your problem (interaction does not work as expected), I would start debugging the corresponding handlers, i.e. FocusAndSelectOnClickHandler and TranslateSelectedOnDragHandler. There are methods for processing respective input events (click(), press(), drag(), release()) where the JavaFX event objects should arrive.
The FocusAndSelectOnClickHandler should execute operations that set the clicked part as the focus part inside the FocusModel, as well as adding it to the selected parts inside the SelectionModel.
The TranslateSelectedOnDragHandler should execute operations that transform the selected parts according to the drag event data.
Therefore, the JavaFX focus concept should not interfere with processing these mouse events on the GEF side. The problem should be different from the DndTabPane becoming the focus owner.
If the respective callback methods for processing input events are not visited, i.e. click(), press(), and drag() are not called, then you need to go one step further and investigate what is happening inside the ClickDragGesture that forwards mouse input events to GEF handlers.
Inside ClickDragGesture, you can find a JavaFX mouse event filter (JavaFX filter vs. handler: filters are executed while traveling from the root to the event target, handlers are executed on the way back to the root) that should receive all JavaFX mouse input events. If it does not get the click and drag events, something is really broken.
Feel free to report back.
h2h
Matthias
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04214 seconds