Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 360765

Summary: Alt key does centered resize instead of disabling snapping
Product: [Tools] GEF Reporter: Peter Severin <peter>
Component: GEF-Legacy GEF (MVC)Assignee: Alexander Nyßen <nyssen>
Status: RESOLVED FIXED QA Contact:
Severity: major    
Priority: P3 CC: nyssen
Version: 3.7   
Target Milestone: 3.7.2 (Indigo SR2)   
Hardware: All   
OS: All   
Whiteboard:

Description Peter Severin CLA 2011-10-13 03:24:20 EDT
Build Identifier: M20110909-1335

I've noticed a regression in GEF under Eclipse 3.7. When doing resize and pressing Alt to disable snapping the editor instead does centered resize.

Reproducible: Always
Comment 1 Peter Severin CLA 2011-10-13 03:46:03 EDT
I can see that the problem is in ResizeTracker#updateSourceRequest. In previous versions the modifier for centered resize was Shift and now it's Alt which is in conflict with snapping modifier. In the same place constrained resize modifier has changed from MOD1 (Ctrl or Control) to Shift.

I hope it was a mistake since I don't want to retrain all my users to use different modifiers.
Comment 2 Alexander Nyßen CLA 2011-10-13 04:01:59 EDT
Peter, I changed this behavior on Mac to match the default behavior of the platform, where centered resize is perfomed on ALT key. We could however think of adding a hook so people can change the default key bindings (that would be needed in several places, i think).
Comment 3 Peter Severin CLA 2011-10-13 04:06:05 EDT
Alexander, the behavior has changed on all platforms. And now there is no way to disable snapping. Surely it's a bug... From those 3 behaviors, centered resize, constrained resize, and disable snapping, I find the last to be the most important.

If you decide to keep things this way then please add a way to configure modifiers so they can be changed back.
Comment 4 Alexander Nyßen CLA 2011-10-13 04:10:34 EDT
OK, I will take a look.
Comment 5 Alexander Nyßen CLA 2011-10-13 17:29:42 EDT
(In reply to comment #3)
> Alexander, the behavior has changed on all platforms. And now there is no way
> to disable snapping. Surely it's a bug... From those 3 behaviors, centered
> resize, constrained resize, and disable snapping, I find the last to be the
> most important.
> 
> If you decide to keep things this way then please add a way to configure
> modifiers so they can be changed back.

You are right, I screwed it when I applied the changes of bug #98539. Actually, centered resize should be mapped to ALT on the Mac only, whereas Windows uses CTRL, i.e. MOD1. I will change this back for the non Mac platforms.
Comment 6 Alexander Nyßen CLA 2011-10-13 17:35:58 EDT
Changed centered resize is performed using ALT on the Mac and MOD1 on all other platforms. Constrained resize is performed using SHIFT on all platforms. This should fit the platform specific behavior that one can e.g. observe within Powerpoint and Keynote respectively. Snapping is prevented using CTRL on the Mac and ALT on all other platforms.
Comment 7 Alexander Nyßen CLA 2011-10-13 17:38:11 EDT
I will not be able to extend the API to allow clients to override the settings in the 3.7.2 stream, as this would collide with our API retention policy. I will thus close this one as fixed in 3.7.2 (changes are committed to R3_7_maintenance branch and HEAD). Please open another bug if you want to have this feature implemented for 3.8.
Comment 8 Peter Severin CLA 2011-10-27 02:46:20 EDT
Alexander, is there an integration build of GEF somewhere? I'd like to get your fixes before the official 3.7.2 release.