This Bugzilla instance is deprecated, and most Eclipse projects now use GitHub or Eclipse GitLab. Please see the deprecation plan for details.
Bug 411602 - CTRL+Q keyboard shortcut in any dialog closes the workbench without option to save
Summary: CTRL+Q keyboard shortcut in any dialog closes the workbench without option to...
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.2   Edit
Hardware: PC Windows 7
: P3 critical with 1 vote (vote)
Target Milestone: 4.4 M1   Edit
Assignee: Paul Webster CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 392860 431887 (view as bug list)
Depends on:
Blocks: 349226 414330 414765
  Show dependency tree
 
Reported: 2013-06-25 09:21 EDT by Tobias Melcher CLA
Modified: 2014-06-13 10:28 EDT (History)
7 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tobias Melcher CLA 2013-06-25 09:21:46 EDT
Steps to reproduce the issue:
- open java editor 
- press CTRL-O to view inplace outline
- press CTRL-Q
==> eclipse is surpisingly closed

CTRL-Q keyboard shortcut for java editor triggers a "Jump to last modification". 
The workbench should not be closed if I press CTRL-Q if the inplace outline view is open. 

Class org.eclipse.e4.ui.internal.workbench.ExitHandler is internally called. 
Is this really the intended behavior?

With best regards,
Tobias Melcher
Comment 1 Markus Keller CLA 2013-07-01 09:19:00 EDT
This is critical, since you don't even get a chance to save dirty editors.
Comment 2 Markus Keller CLA 2013-07-01 09:30:52 EDT
This happens in all dialogs (e.g. in About Eclipse). See also bug 412001.
Comment 3 Eric Moffatt CLA 2013-07-09 15:55:35 EDT
Yoiks !!

Not sure why Ctrl-Q is firing the e4.Exit command, this command doesn't show up in the Keys pref page (I unbound the 'Last Edit Location'.

Paul Elder just pointed out the likely cause...the 'e4.exit' command is bound to Ctrl-Q...in the legacyIDE.xmi file !!

We should take a very close look at both this and any  other bindings declared in the startup model...
Comment 4 Markus Keller CLA 2013-07-10 10:48:04 EDT
Command+Q means Quit on the Mac, where M1 is Command. But that shouldn't affect Windows.
Comment 5 Paul Webster CLA 2013-07-29 16:06:19 EDT
I've released a fix for the quit problem.

http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=8f2a2860a007b7321d03dcae23bb10941a12ffea

http://git.eclipse.org/c/platform/eclipse.platform.git/commit/?id=c6f76d3ee70c56b52aa17b2e0db2e8cbbab219be

Those e4 commands should never be defined in the IDE.  They're a leftover from when we were originally defining the Workbench model.

I'll leave this bug open as we still need a fix for the fact that window keybindings are restricted when a dialog has the focus.

PW
Comment 6 Paul Elder CLA 2013-07-31 11:15:36 EDT
The fixes in comment 5 only affects new workspaces. Any workspace created before the fix will still have these commands saved in
<workspaceroot>/.metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi

To correct existing workspaces, we'd need to scrub these commands from workbench.xmi
Comment 7 Markus Keller CLA 2013-07-31 12:13:37 EDT
(In reply to comment #6)
> To correct existing workspaces, we'd need to scrub these commands from
> workbench.xmi

Maybe related to bug 405296?
Comment 8 Paul Webster CLA 2013-07-31 13:53:53 EDT
(In reply to comment #6)
> 
> To correct existing workspaces, we'd need to scrub these commands from
> workbench.xmi

I've created a processor that will scrub the old e4 commands out of a workbench based RCP project: https://git.eclipse.org/r/#/c/15021/

Paul, could you please have a look?

PW
Comment 10 Paul Elder CLA 2013-08-01 09:02:27 EDT
(In reply to comment #7)
> 
> Maybe related to bug 405296?

Not really. In this case, we had incorrectly put some information in the prototypical workbench.xmi, and we needed to remove it.

In bug 405296, the situation is much more complex. We've had a contribution, which we've integrated into the model via model processors. Then the contributor has disappeared. I imagine the 'correct' thing to do is some of these cases is remove those contributions. But in cases where views or editors have been contributed, it seems best to leave things, and let the user remove them if they don't want them.
Comment 11 Dani Megert CLA 2013-08-09 04:01:09 EDT
Verified that it works in I20130807-2000.
Comment 12 Wojciech Sudol CLA 2014-04-03 06:08:07 EDT
*** Bug 431887 has been marked as a duplicate of this bug. ***
Comment 13 Paul Webster CLA 2014-06-13 10:28:21 EDT
*** Bug 392860 has been marked as a duplicate of this bug. ***