eclipse / gef-classic

Eclipse GEF(tm) Classic code
Eclipse Public License 2.0
25 stars 49 forks source link

[Zest 2.0] Fix ambiguity in RotateGestureListener regarding connections #536

Closed ptziegler closed 4 weeks ago

ptziegler commented 1 month ago

The RotateGestureListener assumes that it is only possible to select nodes (and containers) inside a Zest graph, but not connections. Trying to do so causes a ClassCastException.

To avoid this problem, we now explicitly check the currently selected items and only perform the rotation if all of them are nodes.

ptziegler commented 1 month ago

I'm not entirely sure how rotation is defined when the selection is "mixed", i.e. containing both nodes and connections. One idea was to allow the rotation of connections by rotating their source and destination nodes but how would it then behave if the connection and e.g. the source node is selected?

So in the end, I simply consider this an illegal state where rotation is not possible.