gef-classic icon indicating copy to clipboard operation
gef-classic copied to clipboard

Context Buttons for Selection and Hover of EditParts

Open azoitl opened this issue 2 years ago • 9 comments

@sebHollersbacher and I are currently working on a prototype for a context button infrastructure for the graphical editors of 4diac IDE. This is inspired by the the ContextButtons in Graphiti but we hope to get a bit simpler API.

ContextButton-Graphiti ContextButton-Graphiti

Based on the Eclipse Platform's Command Infrastructure our first prototype can show buttons on all 4 sides of a Figure. When the user moves mouse to 1 side, it hides all the other sides.

ContextButton-left ContextButton-sides ContextButton top

In our work we tried to keep the whole infrastructure as generic as possible. Therefore we think we could upstream it to GEF Classic. Our approach would be to integrate it in the NonResizableEditPolicy in such a way that it will not affect any existing code. But users who would like to have it would just need to implement a dedicated response in the getAdapter method.

The first version of our prototype can be found in the 4diac IDE Gerrit.

What do you think is this something we should move to GEF Classic or keep it in 4diac IDE.

\cc @pcdavid @Phillipus @ptziegler

azoitl avatar Aug 31 '23 16:08 azoitl

:+1: It would be really nice to have this feature in gef.

ddscharfe avatar Sep 25 '23 12:09 ddscharfe

Sorry for not responding earlier. I agree that this would be a nice feature, as long as it is optional and doesn't affect existing API. But then I know you know that anyway ;-)

Phillipus avatar Sep 25 '23 12:09 Phillipus

The current status can be seen in the video. Additionally, the buttons have a tooltip, which can not be seen in the video for some reason, to better indicate which command a button executes.

https://github.com/eclipse/gef-classic/assets/49431931/f8cb0120-acc3-4f4d-bd65-5d13a2a97a9d

sebHollersbacher avatar Sep 26 '23 09:09 sebHollersbacher

This issue is stale because it has been open for 90 days with no activity.

github-actions[bot] avatar Dec 26 '23 01:12 github-actions[bot]

This issue is stale because it has been open for 90 days with no activity.

github-actions[bot] avatar Mar 28 '24 01:03 github-actions[bot]

This issue is stale because it has been open for 90 days with no activity.

github-actions[bot] avatar Jun 27 '24 01:06 github-actions[bot]

This issue was closed because it has been inactive for 180 days since being marked as stale.

github-actions[bot] avatar Dec 24 '24 02:12 github-actions[bot]

This issue is stale because it has been open for 90 days with no activity.

github-actions[bot] avatar Mar 25 '25 02:03 github-actions[bot]