mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-24 17:35:35 +02:00
Bug 313643 - [terminal][local] Unexpected dialog on quit-workbench about unterminated terminal sessions
This commit is contained in:
parent
94fbeea5cc
commit
f6954aa634
4 changed files with 25 additions and 10 deletions
|
@ -7,7 +7,7 @@ feature@org.eclipse.tm.terminal.telnet=v201005032000,:pserver:anonymous:none@dev
|
|||
feature@org.eclipse.tm.terminal.test=v200905272300,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.core/terminal/org.eclipse.tm.terminal.test-feature
|
||||
feature@org.eclipse.tm.terminal.view=v201005032000,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.core/terminal/org.eclipse.tm.terminal.view-feature
|
||||
plugin@org.eclipse.tm.terminal=v201005261000,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.core/terminal/org.eclipse.tm.terminal
|
||||
plugin@org.eclipse.tm.terminal.local=v201005270915,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.core/terminal/org.eclipse.tm.terminal.local
|
||||
plugin@org.eclipse.tm.terminal.local=v201005271015,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.core/terminal/org.eclipse.tm.terminal.local
|
||||
plugin@org.eclipse.tm.terminal.serial=v200905272300,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.core/terminal/org.eclipse.tm.terminal.serial
|
||||
plugin@org.eclipse.tm.terminal.ssh=v200905272300,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.core/terminal/org.eclipse.tm.terminal.ssh
|
||||
plugin@org.eclipse.tm.terminal.telnet=v200909160005,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.core/terminal/org.eclipse.tm.terminal.telnet
|
||||
|
|
|
@ -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;
|
||||
|
||||
/**
|
||||
|
|
|
@ -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}>
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue