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

Bug 333417

Summary: [KeyBindings] Rename "Workbench" context and hide if not supported
Product: [Eclipse Project] Platform Reporter: Markus Keller <markus.kell.r>
Component: UIAssignee: Prakash Rangaraj <prakash>
Status: VERIFIED FIXED QA Contact: Prakash Rangaraj <prakash>
Severity: normal    
Priority: P3 CC: daniel_megert, prakash, pwebster, remy.suen
Version: 3.7   
Target Milestone: 3.7 M6   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on:    
Bug Blocks: 370430    
Attachments:
Description Flags
Patch v01 none

Description Markus Keller CLA 2011-01-03 07:02:14 EST
Follow-up to bug 74073

(In reply to bug 74073 comment #29 and following)
> Do we really need the new context? It looks weird in the 'Keys' pref page:
> When: 'Workbench'.
> Also, it doesn't seem to work, e.g. if I assign commands using that context
> they won't be enabled - hence the context is very misleading. I think we should
> be very careful in defining a new context and avoid it if possible.

(In reply to bug 74073 comment #33)
> Well, I would interpret 'Workbench' context as the context enabled when a
> workbench is active and not the other way around and I would also expect that
> if I bind an existing command to it (e.g. Save) it will work when a workbench
> window is active.

I think the best solution would be to give the context a correct name (e.g. "No Windows" or "No Windows Shown") and a better ID that corresponds to the new name.

To avoid the confusing UI in applications that don't support the windowless mode, the Keys preference page should hide the unsupported context if IWorkbenchConfigurer#getExitOnLastWindowClose() is false.
Comment 1 Dani Megert CLA 2011-01-03 07:09:17 EST
This should be done for M5.
Comment 2 Prakash Rangaraj CLA 2011-01-18 06:18:07 EST
Created attachment 186990 [details]
Patch v01
Comment 3 Prakash Rangaraj CLA 2011-01-25 00:41:58 EST
Pushing it for M6
Comment 4 Prakash Rangaraj CLA 2011-02-22 03:46:47 EST
Patch v01 released to HEAD
Comment 5 Markus Keller CLA 2011-03-02 11:41:03 EST
This fix broke filtering of internal contexts (which e.g. show up after the debugger has hit a breakpoint).

Fixed in HEAD of org.eclipse.ui.internal.keys.model.ContextModel.filterContexts(boolean, boolean, boolean).
Comment 6 Prakash Rangaraj CLA 2011-03-09 00:01:52 EST
Verified in I20110307-2110