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

Bug 467426

Summary: Implement a context menu for editors
Product: [ECD] Orion Reporter: Eric Moffatt <emoffatt>
Component: ClientAssignee: Eric Moffatt <emoffatt>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P2 CC: antonm, Carolyn_MacLeod, curtis.windatt.public, john.arthorne, Silenio_Quarti, steve_northover
Version: unspecified   
Target Milestone: 10.0   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
Current context menu contents none

Description Eric Moffatt CLA 2015-05-15 13:44:54 EDT
We've reached the point where it makes sense to have a context menu for editors like we do for the common-nav.
Comment 1 Eric Moffatt CLA 2015-05-15 13:50:14 EDT
I've pushed a branch "emoffatt/EditorContextMenu" for the initial work for this.

Currently it uses most of the same commands as are registered in 'registerCommands' but without the substructure.

There's also a small tweak to the contextMenu so that it'll restore the focus after the context menu is used. The problem here is that the 'autoDismiss' code calls 'close' with restoreFocus === false meaning that if you choose 'Rename Element' from the menu stuff gets selected correctly but typing does nothing. We'll likely have to make this behavior definable on a per case basis so that it's 'true' for the *editor* context menu and (perhaps) 'false' for the common-nav.
Comment 2 Eric Moffatt CLA 2015-05-15 13:51:37 EDT
Assigning to myself as high pri (since I'm actively working on it)
Comment 3 Eric Moffatt CLA 2015-05-15 14:25:39 EDT
Created attachment 253514 [details]
Current context menu contents


This is a starting point for discussions. In general we want this menu to be *focused* not a kitchen sink...
Comment 4 Carolyn MacLeod CLA 2015-05-15 14:32:33 EDT
Please make sure that you can invoke the context menu with Shift+F10, then use up/down arrows to navigate (right/left if there are submenus), and that Esc closes it and restores focus to the editor so the user can keep typing.

Another thing to check is that it opens at the cursor when you type Shift+F10, instead of some random corner of the screen...

Thanks.
Comment 5 Carolyn MacLeod CLA 2015-05-15 14:34:23 EDT
^^^opens at the cursor^^^
== "text cursor", not "mouse cursor". So I should have said "opens at the caret".
Sorry about that...
Comment 6 Eric Moffatt CLA 2015-06-03 12:35:03 EDT
Here's the first cut...

commit: 27b8f8c09da46e42eeb00f2191e7a77d11b434e0
Comment 7 Steve Northover CLA 2015-08-25 19:21:17 EDT
This is done, right?
Comment 8 Steve Northover CLA 2015-09-15 13:38:32 EDT
We have a context menu now in the editor.
Comment 9 Carolyn MacLeod CLA 2015-09-15 13:48:39 EDT
And it even works with shift+F10   :)
Comment 10 Steve Northover CLA 2015-09-15 13:53:58 EDT
But does ESC close it?
Comment 11 Carolyn MacLeod CLA 2015-09-15 14:35:32 EDT
Yes it does.
Good question - thanks.