aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOleg Besedin2012-05-08 10:43:18 (EDT)
committerOleg Besedin2012-05-08 10:43:18 (EDT)
commit741a0a346fe199d5a3c1a8e967f7ac49d7675988 (patch)
treeafbff1b358f688513b062e9d71c05a684a3b49b8
parentfda10e6bdebc53ec114b6c700858334512cc508a (diff)
downloadeclipse.platform.ui-741a0a346fe199d5a3c1a8e967f7ac49d7675988.zip
eclipse.platform.ui-741a0a346fe199d5a3c1a8e967f7ac49d7675988.tar.gz
eclipse.platform.ui-741a0a346fe199d5a3c1a8e967f7ac49d7675988.tar.bz2
Bug 375744 - Command-Q does not ask to confirm exitv20120508-1443
-rw-r--r--bundles/org.eclipse.e4.ui.workbench.renderers.swt.cocoa/src/org/eclipse/e4/ui/workbench/renderers/swt/cocoa/CocoaUIHandler.java1
-rw-r--r--bundles/org.eclipse.ui.ide.application/META-INF/MANIFEST.MF3
-rw-r--r--bundles/org.eclipse.ui.ide.application/plugin.xml7
-rw-r--r--bundles/org.eclipse.ui.ide.application/src/org/eclipse/ui/internal/ide/application/QuitHandler.java45
4 files changed, 1 insertions, 55 deletions
diff --git a/bundles/org.eclipse.e4.ui.workbench.renderers.swt.cocoa/src/org/eclipse/e4/ui/workbench/renderers/swt/cocoa/CocoaUIHandler.java b/bundles/org.eclipse.e4.ui.workbench.renderers.swt.cocoa/src/org/eclipse/e4/ui/workbench/renderers/swt/cocoa/CocoaUIHandler.java
index c68c45f..1ce3943 100644
--- a/bundles/org.eclipse.e4.ui.workbench.renderers.swt.cocoa/src/org/eclipse/e4/ui/workbench/renderers/swt/cocoa/CocoaUIHandler.java
+++ b/bundles/org.eclipse.e4.ui.workbench.renderers.swt.cocoa/src/org/eclipse/e4/ui/workbench/renderers/swt/cocoa/CocoaUIHandler.java
@@ -598,7 +598,6 @@ public class CocoaUIHandler {
// cribbed from SWT Snippet347
private void hookApplicationMenu() {
- hookAppMenuItem(SWT.ID_QUIT, COMMAND_ID_QUIT);
hookAppMenuItem(SWT.ID_PREFERENCES, COMMAND_ID_PREFERENCES);
hookAppMenuItem(SWT.ID_ABOUT, COMMAND_ID_ABOUT);
}
diff --git a/bundles/org.eclipse.ui.ide.application/META-INF/MANIFEST.MF b/bundles/org.eclipse.ui.ide.application/META-INF/MANIFEST.MF
index bd2a535..1da7ddd 100644
--- a/bundles/org.eclipse.ui.ide.application/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.ui.ide.application/META-INF/MANIFEST.MF
@@ -12,8 +12,7 @@ Require-Bundle: org.eclipse.ui.ide;bundle-version="[3.6.0,4.0.0)",
org.eclipse.core.resources;bundle-version="[3.2.0,4.0.0)",
org.eclipse.ui;bundle-version="[3.6.0,4.0.0)",
org.eclipse.core.net;bundle-version="[1.0.0,2.0.0)",
- org.eclipse.core.filesystem;bundle-version="1.3.0",
- org.eclipse.core.expressions;bundle-version="[3.4.300,4.0.0)"
+ org.eclipse.core.filesystem;bundle-version="1.3.0"
Export-Package: org.eclipse.ui.internal.ide.application;x-internal:=true,
org.eclipse.ui.internal.ide.application.dialogs;x-internal:=true
Import-Package: com.ibm.icu.text
diff --git a/bundles/org.eclipse.ui.ide.application/plugin.xml b/bundles/org.eclipse.ui.ide.application/plugin.xml
index c98ea62..ee32e3d 100644
--- a/bundles/org.eclipse.ui.ide.application/plugin.xml
+++ b/bundles/org.eclipse.ui.ide.application/plugin.xml
@@ -106,11 +106,4 @@
</menu>
</menuContribution>
</extension>
- <extension
- point="org.eclipse.ui.handlers">
- <handler
- class="org.eclipse.ui.internal.ide.application.QuitHandler"
- commandId="org.eclipse.ui.file.exit">
- </handler>
- </extension>
</plugin>
diff --git a/bundles/org.eclipse.ui.ide.application/src/org/eclipse/ui/internal/ide/application/QuitHandler.java b/bundles/org.eclipse.ui.ide.application/src/org/eclipse/ui/internal/ide/application/QuitHandler.java
deleted file mode 100644
index 1b0cf65..0000000
--- a/bundles/org.eclipse.ui.ide.application/src/org/eclipse/ui/internal/ide/application/QuitHandler.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2012 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Brian de Alwis - adapted to prompt user for confirmation
- *******************************************************************************/
-package org.eclipse.ui.internal.ide.application;
-
-import org.eclipse.core.commands.AbstractHandler;
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.expressions.IEvaluationContext;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.handlers.HandlerUtil;
-
-/**
- * Adaptation of {@link org.eclipse.ui.internal.handlers.QuitHandler} that
- * prompts the user to confirm whether to quit.
- */
-public class QuitHandler extends AbstractHandler {
-
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.
- * ExecutionEvent)
- */
- public Object execute(ExecutionEvent event) throws ExecutionException {
- IEvaluationContext context = (IEvaluationContext) event.getApplicationContext();
- IWorkbench workbench = (IWorkbench) context.getVariable(IWorkbench.class.getName());
- Shell shell = HandlerUtil.getActiveShell(event);
- if (IDEWorkbenchWindowAdvisor.promptOnExit(shell)) {
- workbench.close();
- }
- return null;
- }
-
-}