Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUwe Stieber2014-05-23 09:11:34 -0400
committerUwe Stieber2014-05-23 09:11:34 -0400
commitf590a2fcce23705dde516490be94b0d1f7cc1961 (patch)
tree50c0573edd77397de7ab31e8e8310a605c23a60a
parent8593c0a1ba3316a067b32f2d1dd89cdb216c937a (diff)
downloadorg.eclipse.tcf-f590a2fcce23705dde516490be94b0d1f7cc1961.tar.gz
org.eclipse.tcf-f590a2fcce23705dde516490be94b0d1f7cc1961.tar.xz
org.eclipse.tcf-f590a2fcce23705dde516490be94b0d1f7cc1961.zip
Target Explorer: Fix line separator initialization for local terminal
connections
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.local/src/org/eclipse/tcf/te/ui/terminals/local/types/LocalConnectorType.java16
1 files changed, 10 insertions, 6 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.local/src/org/eclipse/tcf/te/ui/terminals/local/types/LocalConnectorType.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.local/src/org/eclipse/tcf/te/ui/terminals/local/types/LocalConnectorType.java
index fe8f36915..1c9d62535 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.local/src/org/eclipse/tcf/te/ui/terminals/local/types/LocalConnectorType.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.local/src/org/eclipse/tcf/te/ui/terminals/local/types/LocalConnectorType.java
@@ -78,24 +78,28 @@ public class LocalConnectorType extends AbstractConnectorType {
image = properties.getStringProperty(ITerminalsConnectorConstants.PROP_PROCESS_PATH);
}
- boolean localEcho;
+ // Determine if a PTY will be used
+ boolean isUsingPTY = (properties.getProperty(ITerminalsConnectorConstants.PROP_PROCESS_OBJ) == null && PTY.isSupported(PTY.Mode.TERMINAL))
+ || properties.getProperty(ITerminalsConnectorConstants.PROP_PTY_OBJ) instanceof PTY;
+
+ boolean localEcho = false;
if (!properties.containsKey(ITerminalsConnectorConstants.PROP_LOCAL_ECHO)
|| properties.getStringProperty(ITerminalsConnectorConstants.PROP_LOCAL_ECHO) == null) {
- localEcho = false;
// On Windows, turn on local echo by default if no PTY is used (bug 433645)
if (Host.isWindowsHost()) {
- boolean isUsingPTY = (properties.getProperty(ITerminalsConnectorConstants.PROP_PROCESS_OBJ) == null && PTY.isSupported(PTY.Mode.TERMINAL))
- || properties.getProperty(ITerminalsConnectorConstants.PROP_PTY_OBJ) instanceof PTY;
localEcho = !isUsingPTY;
}
} else {
localEcho = properties.getBooleanProperty(ITerminalsConnectorConstants.PROP_LOCAL_ECHO);
}
- String lineSeparator;
+ String lineSeparator = null;
if (!properties.containsKey(ITerminalsConnectorConstants.PROP_LINE_SEPARATOR)
|| properties.getStringProperty(ITerminalsConnectorConstants.PROP_LINE_SEPARATOR) == null) {
- lineSeparator = Host.isWindowsHost() ? ILineSeparatorConstants.LINE_SEPARATOR_CRLF : ILineSeparatorConstants.LINE_SEPARATOR_LF;
+ // No line separator will be set if a PTY is used
+ if (!isUsingPTY) {
+ lineSeparator = Host.isWindowsHost() ? ILineSeparatorConstants.LINE_SEPARATOR_CRLF : ILineSeparatorConstants.LINE_SEPARATOR_LF;
+ }
} else {
lineSeparator = properties.getStringProperty(ITerminalsConnectorConstants.PROP_LINE_SEPARATOR);
}

Back to the top