diff --git a/releng/org.eclipse.rse.build/maps/terminal.map b/releng/org.eclipse.rse.build/maps/terminal.map index 6490046e584..7a9dccc91ad 100644 --- a/releng/org.eclipse.rse.build/maps/terminal.map +++ b/releng/org.eclipse.rse.build/maps/terminal.map @@ -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=v201005271100,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.core/terminal/org.eclipse.tm.terminal.local +plugin@org.eclipse.tm.terminal.local=v201005281600,: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=v201005271030,: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 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 7d16025e5a5..497d9160811 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 @@ -42,7 +42,7 @@ import org.eclipse.ui.IWorkbenchWindow; * mechanism. * * @author Mirko Raner - * @version $Revision: 1.1 $ + * @version $Revision: 1.2 $ */ public class LocalTerminalStillRunningListener implements IWorkbenchListener { @@ -72,7 +72,7 @@ public class LocalTerminalStillRunningListener implements IWorkbenchListener { IPreferenceStore store = LocalTerminalActivator.getDefault().getPreferenceStore(); if (!store.getBoolean(LocalTerminalActivator.PREF_CONFIRM_TERMINATE_ON_SHUTDOWN)) { - //return true; + return true; } ILaunchConfigurationType launchType; String launchTypeID = LocalTerminalLaunchDelegate.LAUNCH_CONFIGURATION_TYPE_ID; diff --git a/terminal/org.eclipse.tm.terminal.local/src/org/eclipse/tm/internal/terminal/local/process/LocalTerminalProcess.java b/terminal/org.eclipse.tm.terminal.local/src/org/eclipse/tm/internal/terminal/local/process/LocalTerminalProcess.java index 458851cdf69..f0f2e11c5f9 100644 --- a/terminal/org.eclipse.tm.terminal.local/src/org/eclipse/tm/internal/terminal/local/process/LocalTerminalProcess.java +++ b/terminal/org.eclipse.tm.terminal.local/src/org/eclipse/tm/internal/terminal/local/process/LocalTerminalProcess.java @@ -7,6 +7,7 @@ * * Contributors: * Mirko Raner - initial implementation for Eclipse Bug 196337 + * Mirko Raner - [314607] Launching a terminal also pops up the console view **************************************************************************************************/ package org.eclipse.tm.internal.terminal.local.process; @@ -50,6 +51,15 @@ import org.eclipse.debug.core.model.RuntimeProcess; * null. After the launch is terminated it will appear in the Debug view with the * terminated process as its child element. The exit value of the terminal process can also be seen * in that view.

+ * {@link #getStreamsProxy()} will also return null during initialization of a + * {@link LocalTerminalProcess} object until after the + * {@link RuntimeProcess#RuntimeProcess(ILaunch, Process, String, Map) super constructor} invocation + * has been completed. This disables a code path that caused a Console view to pop up when the + * {@link org.eclipse.debug.core.model.IStreamMonitor IStreamMonitor} already contained data (like, + * for example, a shell's initial prompt) when the ProcessConsoleManager received an + * {@link org.eclipse.debug.core.ILaunchListener#launchChanged(ILaunch)} notification (which cannot + * be avoided). See https://bugs.eclipse.org/314607 + * for additional details.

* * This solution for preventing standard consoles from being opened does certainly not deserve the * cleanliness award for straightforward coding, but at least it doesn't rely on internal API at @@ -57,7 +67,7 @@ import org.eclipse.debug.core.model.RuntimeProcess; * extension point as proposed in bug 242373 (https://bugs.eclipse.org/bugs/show_bug.cgi?id=242373). * * @author Mirko Raner - * @version $Revision: 1.1 $ + * @version $Revision: 1.2 $ */ public final class LocalTerminalProcess extends RuntimeProcess { @@ -66,6 +76,7 @@ public final class LocalTerminalProcess extends RuntimeProcess { */ public final static String PROCESS_TYPE = "org.eclipse.tm.terminal.localProcess"; //$NON-NLS-1$ + private boolean enableStreamsProxy; private boolean resetStreamsProxy; private PTY pty; @@ -80,6 +91,7 @@ public final class LocalTerminalProcess extends RuntimeProcess { protected LocalTerminalProcess(ILaunch launch, Process process, String name, Map attributes) { super(launch, process, name, setProcessType(attributes)); + enableStreamsProxy = true; LocalTerminalProcessRegistry.registerWithLaunch(launch, this); launch.removeProcess(this); } @@ -110,7 +122,7 @@ public final class LocalTerminalProcess extends RuntimeProcess { */ public IStreamsProxy getStreamsProxy() { - if (resetStreamsProxy) { + if (resetStreamsProxy || !enableStreamsProxy) { return null; }