Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 333417 - [KeyBindings] Rename "Workbench" context and hide if not supported
Summary: [KeyBindings] Rename "Workbench" context and hide if not supported
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.7   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 3.7 M6   Edit
Assignee: Prakash Rangaraj CLA
QA Contact: Prakash Rangaraj CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 370430
  Show dependency tree
 
Reported: 2011-01-03 07:02 EST by Markus Keller CLA
Modified: 2012-02-02 08:06 EST (History)
4 users (show)

See Also:


Attachments
Patch v01 (15.30 KB, patch)
2011-01-18 06:18 EST, Prakash Rangaraj CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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