Bug 567758

Summary: Add Close to the left and right option to tabs
Product: [Tools] MAT Reporter: Andrew Johnson <andrew_johnson>
Component: GUIAssignee: Andrew Johnson <andrew_johnson>
Status: VERIFIED FIXED QA Contact:
Severity: enhancement    
Priority: P3    
Version: 1.10   
Target Milestone: 1.11.0   
Hardware: All   
OS: All   
See Also: https://git.eclipse.org/r/c/mat/org.eclipse.mat/+/170548
https://git.eclipse.org/c/mat/org.eclipse.mat.git/commit/?id=00ed4972e4fa23b96c29031a95b947cd273b5bbc
https://git.eclipse.org/r/c/mat/org.eclipse.mat/+/170582
https://git.eclipse.org/c/mat/org.eclipse.mat.git/commit/?id=a66a3f968efc3816a55709f313a6ebdd04bd7798
https://git.eclipse.org/r/c/mat/org.eclipse.mat/+/170605
https://git.eclipse.org/c/mat/org.eclipse.mat.git/commit/?id=c45769311e77dbc2d145c0202746aaff874fd043
https://git.eclipse.org/r/c/mat/org.eclipse.mat/+/170606
https://git.eclipse.org/c/mat/org.eclipse.mat.git/commit/?id=eaa1de7287a1084f4178a6ef55ff453930050da1
https://git.eclipse.org/r/c/mat/org.eclipse.mat/+/170637
https://git.eclipse.org/c/mat/org.eclipse.mat.git/commit/?id=fe916c34e7a994769b59bfb217e5e6eca181ab95
https://git.eclipse.org/r/c/mat/org.eclipse.mat/+/171342
https://git.eclipse.org/c/mat/org.eclipse.mat.git/commit/?id=71e75d20b3b8f18989a4c6db26a8084deb28c421
https://git.eclipse.org/r/c/mat/org.eclipse.mat/+/171359
https://git.eclipse.org/c/mat/org.eclipse.mat.git/commit/?id=278092b1778f10f425c6f402ad0760baedb7bc3c
Whiteboard:
Attachments:
Description Flags
Screenshot showing move tabs none

Description Andrew Johnson CLA 2020-10-09 09:12:22 EDT
Ordinary Eclipse now has a menu option on tabs, visible in MAT for Error Log/Notes/Navigation history.
Close to the Left
Close to the Right
See bug 337588

It would be nice to have this for the main area with all the query results.
Close
Close Others
Close to the Left
Close to the Right
----
Close All

Note the new separator. Also only show Close others/left/right if there are tabs to close.
Comment 1 Eclipse Genie CLA 2020-10-09 09:21:12 EDT
New Gerrit change created: https://git.eclipse.org/r/c/mat/org.eclipse.mat/+/170548
Comment 3 Andrew Johnson CLA 2020-10-10 04:46:47 EDT
Another useful idea is to be able to move the tabs.
A solution I came up with is to move the current tab left or right, with a keyboard accelerator to make it easy,
and leave the menu active afterwards to allow the tab to be moved again.
I didn't see a way of bringing up the tab pop-up menu, so I added a shift-F10 key listener.
This should be a command/action to allow key binding to be set but I didn't do that.
Comment 4 Eclipse Genie CLA 2020-10-10 04:48:21 EDT
New Gerrit change created: https://git.eclipse.org/r/c/mat/org.eclipse.mat/+/170582
Comment 6 Andrew Johnson CLA 2020-10-10 05:27:13 EDT
Created attachment 284417 [details]
Screenshot showing move tabs
Comment 7 Eclipse Genie CLA 2020-10-10 16:01:37 EDT
New Gerrit change created: https://git.eclipse.org/r/c/mat/org.eclipse.mat/+/170605
Comment 9 Eclipse Genie CLA 2020-10-10 16:31:13 EDT
New Gerrit change created: https://git.eclipse.org/r/c/mat/org.eclipse.mat/+/170606
Comment 11 Eclipse Genie CLA 2020-10-12 09:22:23 EDT
New Gerrit change created: https://git.eclipse.org/r/c/mat/org.eclipse.mat/+/170637
Comment 13 Andrew Johnson CLA 2020-10-12 10:35:19 EDT
The menu is now brought up using a command, active on the editor view, so is using ctrl-F10 to avoid confusion with the context menu on shift-F10.

Test using keyboard to bring up menu with ctrl-F10 once tab is selected, then L/R to move tabs, or up/down to select other options.
Test using mouse to bring up menu on active or non-active tabs, and move using keyboard / mouse.
Check that active tab remains active and toolbar is correct.
Comment 14 Andrew Johnson CLA 2020-10-27 05:24:24 EDT
The key assignments Ctrl-F8 Ctrl-Shift-F8 are different from Eclipse IDE where than means next/previous perspective.
Ctrl-PageDown and Ctrl-PageUp are already the defaults for tab movement.

Also Ctrl-F10 is show view menu e.g. for the Error log view.
Perhaps Alt-F10 would be better (shift and ctrl are already used)
Comment 15 Eclipse Genie CLA 2020-10-27 07:46:13 EDT
New Gerrit change created: https://git.eclipse.org/r/c/mat/org.eclipse.mat/+/171342
Comment 17 Eclipse Genie CLA 2020-10-27 09:57:52 EDT
New Gerrit change created: https://git.eclipse.org/r/c/mat/org.eclipse.mat/+/171359
Comment 19 Andrew Johnson CLA 2020-11-22 08:58:18 EST
On Ubuntu, ctrl-F10 brings  up the menu, L or R moves the tab, but the menu is not recreated so pressing L again doesn't move the tab
further, unless ctrl-F10 is pressed again first.

Other than that, this task is done.