Community
Participate
Working Groups
Follow-up to bug 374147 Handle MENU_KEYBOARD from MenuDetect events in more widgets. E.g. the Text widget should use the same strategy as StyledText (with bug 375721 fixed), and Tree and Table should also show the menu close to the focus item. See org.eclipse.ui.actions.QuickMenuCreator#computeMenuLocation(Control) from org.eclipse.ui.workbench for inspiration. That's what Navigate > Show In (Alt+Shift+W) uses. Note that the menus for Tree and Table are indented a bit so that items below the focus item stay partly visible.
Fix in 4.2 for Table, Tree, List on Windows only (so far): http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=dc8b70b8b17620c5e26d2b27a9531e3a6acaed33
The horizontal centering looks a bit strange if the items have varying length. E.g. if you open the context menu on fCount in the Outline view here: public class Hello { int fCount; AbstractList<LinkedHashMap<StringBuffer, FileOutputStream>> cache; } For multi-selection I also prefer the QuickMenuCreator's approach (show menu on a selected item close to the mouse position).
Same fix as comment 1, in 3.8: http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?h=R3_8_maintenance&id=2e8e62c6b2a4a293d84300ac744b2e43c2105d84
We decided not to use the mouse position because that seemed like a very strange property to consider when the fix is mostly being done for keyboard only users.
Fix Text in 4.2 on Windows: http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=e708e100f8ab1e9d40a025dee6cebdd5da60a939 Fix Text in 3.8 on Windows: http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?h=R3_8_maintenance&id=1502107eb741a62e372c2ee45cccdacbd95479f4
(In reply to comment 2) > The horizontal centering looks a bit strange if the items have varying length. Thank-you, Markus. I was using [Tree|Table]Item.getTextBounds(0) and I should have been using [Tree|Table]Item.getBounds() to measure the width of the item string. Fixed in 4.2: http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=7e7c23207b059dd8f2f569032a4266c17d005c2c and in 3.8: http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?h=R3_8_maintenance&id=71b464964b4568fbd72962189eeae03e7d8e938c
> We decided not to use the mouse position because that seemed like a very > strange property to consider when the fix is mostly being done for keyboard > only users. Sounds reasonable for the Open Context Menu command, yes. IIRC, the QuickMenuCreator uses the mouse position to support workflows where the user selects multiple items with Ctrl+Click and then e.g. presses Alt+Shift+W to open the "Show In" quick menu. > Thank-you, Markus. I was using [Tree|Table]Item.getTextBounds(0) and I should > have been using [Tree|Table]Item.getBounds() to measure the width of the item > string. Sounds like the API should have a bit more documentation (see bug 314867;-).
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie.
This bug was marked as stalebug a while ago. Marking as worksforme. If this report is still relevant for the current release, please reopen and remove the stalebug whiteboard tag.
This bug has been marked as stalebug a while ago without any further interaction. If this report is still relevant for the current release, please reopen and remove the stalebug whiteboard flag.