Bug 213148 - [Workbench] "Confirm exit when closing last window" doesn't prompt on closing through menu action
Summary: [Workbench] "Confirm exit when closing last window" doesn't prompt on closing...
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows XP
: P3 minor (vote)
Target Milestone: ---   Edit
Assignee: Platform UI Triaged CLA
QA Contact:
URL:
Whiteboard:
Keywords: helpwanted
Depends on:
Blocks:
 
Reported: 2007-12-17 03:49 EST by Zhiqiang Qian CLA
Modified: 2019-09-06 15:35 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Zhiqiang Qian CLA 2007-12-17 03:49:53 EST
steps:
launch Eclipse,
then under menu "Window", choose "Preference",
then go to General -> Startup and Shutdown,
check the checkbox "Confirm exit when closing last window",
then click "OK" on the dialog box.

Open any file in editor.

then click the "File" menu,
then click "Exit" item,
there will be no prompt to prompt user to exit eclipse, but if you click "close" button on window top right corner, there will have prompt.
Comment 1 Paul Webster CLA 2007-12-18 09:03:00 EST
AFAIK that's deliberate ... File>Exit is exit the application, and has never required the confirmation prompt.

Confirm exit on closing last window is for clicking on the 'X'.

Now I can see why that might be a bit confusing, but I don't want a confirmation dialog with I select File>Exit (if you get that far, it's not an accident you really did want to exit).

PW
Comment 2 Remy Suen CLA 2008-11-15 07:59:22 EST
(In reply to comment #1)
> AFAIK that's deliberate ... File>Exit is exit the application, and has never
> required the confirmation prompt.
> 
> Confirm exit on closing last window is for clicking on the 'X'.

I think so too. This is completely in line with WorkbenchWindowAdvisor's preWindowShellClose() method. The SDK's advisor prompts the dialog in its own implementation of preWindowShellClose(). However, the action created by ActionFactory.QUIT will simply shut down the workbench without going through this method (this is spec'ed behaviour in preWindowShellClose()'s javadoc) and hence, does not prompt the user about anything.

http://help.eclipse.org/stable/nftopic/org.eclipse.platform.doc.isv/reference/api/org/eclipse/ui/application/WorkbenchWindowAdvisor.html#preWindowShellClose()

I suggest closing as WONTFIX.
Comment 3 Eclipse Webmaster CLA 2019-09-06 15:35:29 EDT
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.