Skip to main content

This CGIT instance is deprecated, and repositories have been moved to Gitlab or Github. See the repository descriptions for specific locations.

summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Oberhuber2010-05-27 10:14:01 +0000
committerMartin Oberhuber2010-05-27 10:14:01 +0000
commitf6954aa634268c5c8a53f163fc54da4dcaaae38c (patch)
tree6ef21654b72e46ed12b398d792bb8e7bd646efd5 /terminal
parent94fbeea5cc8ae9e57a1c8a866ddf09f479e4c178 (diff)
downloadorg.eclipse.tm-f6954aa634268c5c8a53f163fc54da4dcaaae38c.tar.gz
org.eclipse.tm-f6954aa634268c5c8a53f163fc54da4dcaaae38c.tar.xz
org.eclipse.tm-f6954aa634268c5c8a53f163fc54da4dcaaae38c.zip
Bug 313643 - [terminal][local] Unexpected dialog on quit-workbench about unterminated terminal sessions
Diffstat (limited to 'terminal')
-rw-r--r--terminal/org.eclipse.tm.terminal.local/src/org/eclipse/tm/internal/terminal/local/LocalTerminalActivator.java14
-rw-r--r--terminal/org.eclipse.tm.terminal.local/src/org/eclipse/tm/internal/terminal/local/LocalTerminalMessages.properties10
-rw-r--r--terminal/org.eclipse.tm.terminal.local/src/org/eclipse/tm/internal/terminal/local/launch/LocalTerminalStillRunningListener.java9
3 files changed, 24 insertions, 9 deletions
diff --git a/terminal/org.eclipse.tm.terminal.local/src/org/eclipse/tm/internal/terminal/local/LocalTerminalActivator.java b/terminal/org.eclipse.tm.terminal.local/src/org/eclipse/tm/internal/terminal/local/LocalTerminalActivator.java
index 26ba5ce99..84ba198d4 100644
--- a/terminal/org.eclipse.tm.terminal.local/src/org/eclipse/tm/internal/terminal/local/LocalTerminalActivator.java
+++ b/terminal/org.eclipse.tm.terminal.local/src/org/eclipse/tm/internal/terminal/local/LocalTerminalActivator.java
@@ -1,5 +1,5 @@
/***************************************************************************************************
- * Copyright (c) 2008 Mirko Raner and others.
+ * Copyright (c) 2008, 2010 Mirko Raner 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
@@ -20,7 +20,7 @@ import org.osgi.framework.BundleContext;
* Connector plug-in.
*
* @author Mirko Raner
- * @version $Revision: 1.2 $
+ * @version $Revision: 1.1 $
*/
public class LocalTerminalActivator extends AbstractUIPlugin {
@@ -29,6 +29,16 @@ public class LocalTerminalActivator extends AbstractUIPlugin {
*/
public static final String PLUGIN_ID = "org.eclipse.tm.terminal.local"; //$NON-NLS-1$
+ /**
+ * The preference key for confirming process termination during workbench shutdown.
+ * Value: "CONFIRM_TERMINATE".
+ * If the corresponding Preference slot is set to "true", a confirmation dialog
+ * will be shown when quitting Workbench while a local Terminal is still running.
+ * For details, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=313643
+ * @since 0.1
+ */
+ public final static String PREF_CONFIRM_TERMINATE_ON_SHUTDOWN = "CONFIRM_TERMINATE";//$NON-NLS-1$
+
private static LocalTerminalActivator plugin;
/**
diff --git a/terminal/org.eclipse.tm.terminal.local/src/org/eclipse/tm/internal/terminal/local/LocalTerminalMessages.properties b/terminal/org.eclipse.tm.terminal.local/src/org/eclipse/tm/internal/terminal/local/LocalTerminalMessages.properties
index 942ad3561..6a8d5a985 100644
--- a/terminal/org.eclipse.tm.terminal.local/src/org/eclipse/tm/internal/terminal/local/LocalTerminalMessages.properties
+++ b/terminal/org.eclipse.tm.terminal.local/src/org/eclipse/tm/internal/terminal/local/LocalTerminalMessages.properties
@@ -39,11 +39,9 @@ errorLaunchConfigurationNoLongerExists=The launch configuration ''{0}'' that is
configuration.
errorTitleCouldNotConnectToTerminal=Could not connect to Terminal
warningTitleTerminalsStillRunning=Warning: Terminals with active processes are still running
-warningMessageTerminalsStillRunning=The workbench is about to be shut down even though one or more \
- terminals with active processes are still running. You may abort the shut-down of the workbench \
- or you may quit the workbench nonetheless, in which case processes might be terminated in an \
- unexpected fashion. You may also terminate processes individually. The workbench shut-down will \
- continue automatically once no more terminal processes are running.
-quitWorkbenchAnyway=Quit Workbench Anyway
+warningMessageTerminalsStillRunning=The workbench is about to shut down even though one or more \
+ terminals with active processes are still running. Unsaved data may be lost if the shutdown \
+ proceeds.
+quitWorkbenchAnyway=Quit Workbench Anyways
doNoQuitWorkbench=Do Not Quit Workbench
terminatedProcess={0} <terminated, exit value: {1}>
diff --git a/terminal/org.eclipse.tm.terminal.local/src/org/eclipse/tm/internal/terminal/local/launch/LocalTerminalStillRunningListener.java b/terminal/org.eclipse.tm.terminal.local/src/org/eclipse/tm/internal/terminal/local/launch/LocalTerminalStillRunningListener.java
index 9014b5fb3..7d16025e5 100644
--- a/terminal/org.eclipse.tm.terminal.local/src/org/eclipse/tm/internal/terminal/local/launch/LocalTerminalStillRunningListener.java
+++ b/terminal/org.eclipse.tm.terminal.local/src/org/eclipse/tm/internal/terminal/local/launch/LocalTerminalStillRunningListener.java
@@ -1,5 +1,5 @@
/***************************************************************************************************
- * Copyright (c) 2008 Mirko Raner and others.
+ * Copyright (c) 2008, 2010 Mirko Raner 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
@@ -17,6 +17,8 @@ import org.eclipse.core.runtime.CoreException;
import org.eclipse.debug.core.ILaunch;
import org.eclipse.debug.core.ILaunchConfiguration;
import org.eclipse.debug.core.ILaunchConfigurationType;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.tm.internal.terminal.local.LocalTerminalActivator;
import org.eclipse.tm.internal.terminal.local.LocalTerminalUtilities;
import org.eclipse.tm.internal.terminal.local.launch.ui.LocalTerminalStillRunningDialog;
import org.eclipse.tm.internal.terminal.provisional.api.Logger;
@@ -67,6 +69,11 @@ public class LocalTerminalStillRunningListener implements IWorkbenchListener {
return true;
}
+ IPreferenceStore store = LocalTerminalActivator.getDefault().getPreferenceStore();
+ if (!store.getBoolean(LocalTerminalActivator.PREF_CONFIRM_TERMINATE_ON_SHUTDOWN)) {
+
+ //return true;
+ }
ILaunchConfigurationType launchType;
String launchTypeID = LocalTerminalLaunchDelegate.LAUNCH_CONFIGURATION_TYPE_ID;
launchType = LocalTerminalUtilities.LAUNCH_MANAGER.getLaunchConfigurationType(launchTypeID);

Back to the top