Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUwe Stieber2014-04-29 03:59:34 -0400
committerUwe Stieber2014-04-29 04:01:59 -0400
commit3605361fa6016663600c9d25351d1cee31fe2637 (patch)
treeae715293ec24dfee0cc8e9a09f3935bb92a9a94b
parent1a7b98fdab66f10525fd46d48263f703170b046b (diff)
downloadorg.eclipse.tcf-3605361fa6016663600c9d25351d1cee31fe2637.tar.gz
org.eclipse.tcf-3605361fa6016663600c9d25351d1cee31fe2637.tar.xz
org.eclipse.tcf-3605361fa6016663600c9d25351d1cee31fe2637.zip
Target Explorer: Fix Bug 433645 - Local terminal connector should not enable local echo on windows if PTY is available
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.local/src/org/eclipse/tcf/te/ui/terminals/local/types/LocalConnectorType.java22
1 files changed, 14 insertions, 8 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 60ac89885..fe8f36915 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
@@ -70,25 +70,31 @@ public class LocalConnectorType extends AbstractConnectorType {
// Extract the process properties using defaults
String image;
- if (!properties.containsKey(ITerminalsConnectorConstants.PROP_PROCESS_PATH) ||
- properties.getStringProperty(ITerminalsConnectorConstants.PROP_PROCESS_PATH) == null){
-
+ if (!properties.containsKey(ITerminalsConnectorConstants.PROP_PROCESS_PATH)
+ || properties.getStringProperty(ITerminalsConnectorConstants.PROP_PROCESS_PATH) == null) {
File defaultShell = defaultShell();
image = defaultShell.isAbsolute() ? defaultShell.getAbsolutePath() : defaultShell.getPath();
} else {
image = properties.getStringProperty(ITerminalsConnectorConstants.PROP_PROCESS_PATH);
}
+
boolean localEcho;
- if (!properties.containsKey(ITerminalsConnectorConstants.PROP_LOCAL_ECHO) ||
- properties.getStringProperty(ITerminalsConnectorConstants.PROP_LOCAL_ECHO) == null){
- localEcho = Host.isWindowsHost();
+ 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;
- if (!properties.containsKey(ITerminalsConnectorConstants.PROP_LINE_SEPARATOR) ||
- properties.getStringProperty(ITerminalsConnectorConstants.PROP_LINE_SEPARATOR) == 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;
} else {
lineSeparator = properties.getStringProperty(ITerminalsConnectorConstants.PROP_LINE_SEPARATOR);

Back to the top