Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUwe Stieber2015-02-13 10:29:49 -0500
committerUwe Stieber2015-02-13 10:29:49 -0500
commit98a6719eacd34bfc8a75e9b3c0945dcf35b8ba08 (patch)
tree9ffbec5c62fd8507213e3c4a2af6433825d55c58
parent73869f0b3a61a59690d5c555827e950b6e9ec368 (diff)
downloadorg.eclipse.tcf-98a6719eacd34bfc8a75e9b3c0945dcf35b8ba08.tar.gz
org.eclipse.tcf-98a6719eacd34bfc8a75e9b3c0945dcf35b8ba08.tar.xz
org.eclipse.tcf-98a6719eacd34bfc8a75e9b3c0945dcf35b8ba08.zip
Terminals: Adapt to API changes of TM Terminal 4.0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.ui/src/org/eclipse/tcf/te/tcf/terminals/ui/connector/TerminalsSettings.java29
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.ui/src/org/eclipse/tcf/te/tcf/terminals/ui/launcher/TerminalsLauncherDelegate.java2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.local/src/org/eclipse/tcf/te/ui/terminals/local/launcher/LocalLauncherDelegate.java2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.process/src/org/eclipse/tcf/te/ui/terminals/process/ProcessLauncherDelegate.java2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.process/src/org/eclipse/tcf/te/ui/terminals/process/ProcessSettings.java49
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.serial/src/org/eclipse/tcf/te/ui/terminals/serial/launcher/SerialLauncherDelegate.java2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.ssh/src/org/eclipse/tcf/te/ui/terminals/ssh/launcher/SshLauncherDelegate.java4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.telnet/src/org/eclipse/tcf/te/ui/terminals/telnet/launcher/TelnetLauncherDelegate.java2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/internal/SettingsStore.java69
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/streams/StreamsLauncherDelegate.java2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/streams/StreamsSettings.java33
11 files changed, 56 insertions, 140 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.ui/src/org/eclipse/tcf/te/tcf/terminals/ui/connector/TerminalsSettings.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.ui/src/org/eclipse/tcf/te/tcf/terminals/ui/connector/TerminalsSettings.java
index 022e83e5c..6c7ee4e90 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.ui/src/org/eclipse/tcf/te/tcf/terminals/ui/connector/TerminalsSettings.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.ui/src/org/eclipse/tcf/te/tcf/terminals/ui/connector/TerminalsSettings.java
@@ -13,7 +13,6 @@ import java.io.InputStream;
import java.io.OutputStream;
import org.eclipse.core.runtime.Assert;
-import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer;
import org.eclipse.tcf.te.tcf.terminals.core.interfaces.launcher.ITerminalsLauncher;
import org.eclipse.tm.internal.terminal.provisional.api.ISettingsStore;
@@ -151,14 +150,12 @@ public class TerminalsSettings {
*/
public void load(ISettingsStore store) {
Assert.isNotNull(store);
- localEcho = Boolean.parseBoolean(store.get("LocalEcho", Boolean.FALSE.toString())); //$NON-NLS-1$
- lineSeparator = store.get("LineSeparator", null); //$NON-NLS-1$
- if (store instanceof IPropertiesContainer) {
- stdin = (OutputStream)((IPropertiesContainer)store).getProperty("stdin"); //$NON-NLS-1$
- stdout = (InputStream)((IPropertiesContainer)store).getProperty("stdout"); //$NON-NLS-1$
- stderr = (InputStream)((IPropertiesContainer)store).getProperty("stderr"); //$NON-NLS-1$
- launcher = (ITerminalsLauncher)((IPropertiesContainer)store).getProperty("launcher"); //$NON-NLS-1$
- }
+ localEcho = store.getBooleanProperty("LocalEcho"); //$NON-NLS-1$
+ lineSeparator = store.getStringProperty("LineSeparator"); //$NON-NLS-1$
+ stdin = (OutputStream)store.getProperty("stdin"); //$NON-NLS-1$
+ stdout = (InputStream)store.getProperty("stdout"); //$NON-NLS-1$
+ stderr = (InputStream)store.getProperty("stderr"); //$NON-NLS-1$
+ launcher = (ITerminalsLauncher)store.getProperty("launcher"); //$NON-NLS-1$
}
/**
@@ -168,13 +165,11 @@ public class TerminalsSettings {
*/
public void save(ISettingsStore store) {
Assert.isNotNull(store);
- store.put("LocalEcho", Boolean.toString(localEcho)); //$NON-NLS-1$
- store.put("LineSeparator", lineSeparator); //$NON-NLS-1$
- if (store instanceof IPropertiesContainer) {
- ((IPropertiesContainer)store).setProperty("stdin", stdin); //$NON-NLS-1$
- ((IPropertiesContainer)store).setProperty("stdout", stdout); //$NON-NLS-1$
- ((IPropertiesContainer)store).setProperty("stderr", stderr); //$NON-NLS-1$
- ((IPropertiesContainer)store).setProperty("launcher", launcher); //$NON-NLS-1$
- }
+ store.setProperty("LocalEcho", localEcho); //$NON-NLS-1$
+ store.setProperty("LineSeparator", lineSeparator); //$NON-NLS-1$
+ store.setProperty("stdin", stdin); //$NON-NLS-1$
+ store.setProperty("stdout", stdout); //$NON-NLS-1$
+ store.setProperty("stderr", stderr); //$NON-NLS-1$
+ store.setProperty("launcher", launcher); //$NON-NLS-1$
}
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.ui/src/org/eclipse/tcf/te/tcf/terminals/ui/launcher/TerminalsLauncherDelegate.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.ui/src/org/eclipse/tcf/te/tcf/terminals/ui/launcher/TerminalsLauncherDelegate.java
index e72016cac..a1bcbf6e3 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.ui/src/org/eclipse/tcf/te/tcf/terminals/ui/launcher/TerminalsLauncherDelegate.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.ui/src/org/eclipse/tcf/te/tcf/terminals/ui/launcher/TerminalsLauncherDelegate.java
@@ -33,10 +33,10 @@ import org.eclipse.tcf.te.tcf.terminals.ui.controls.TerminalsConfigurationPanel;
import org.eclipse.tcf.te.ui.terminals.interfaces.IConfigurationPanel;
import org.eclipse.tcf.te.ui.terminals.interfaces.IConfigurationPanelContainer;
import org.eclipse.tcf.te.ui.terminals.interfaces.IMementoHandler;
-import org.eclipse.tcf.te.ui.terminals.internal.SettingsStore;
import org.eclipse.tcf.te.ui.terminals.launcher.AbstractLauncherDelegate;
import org.eclipse.tm.internal.terminal.provisional.api.ISettingsStore;
import org.eclipse.tm.internal.terminal.provisional.api.ITerminalConnector;
+import org.eclipse.tm.internal.terminal.provisional.api.SettingsStore;
import org.eclipse.tm.internal.terminal.provisional.api.TerminalConnectorExtension;
/**
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.local/src/org/eclipse/tcf/te/ui/terminals/local/launcher/LocalLauncherDelegate.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.local/src/org/eclipse/tcf/te/ui/terminals/local/launcher/LocalLauncherDelegate.java
index a6b30a607..fad02da55 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.local/src/org/eclipse/tcf/te/ui/terminals/local/launcher/LocalLauncherDelegate.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.local/src/org/eclipse/tcf/te/ui/terminals/local/launcher/LocalLauncherDelegate.java
@@ -38,7 +38,6 @@ import org.eclipse.tcf.te.core.terminals.interfaces.constants.ITerminalsConnecto
import org.eclipse.tcf.te.ui.terminals.interfaces.IConfigurationPanel;
import org.eclipse.tcf.te.ui.terminals.interfaces.IConfigurationPanelContainer;
import org.eclipse.tcf.te.ui.terminals.interfaces.IMementoHandler;
-import org.eclipse.tcf.te.ui.terminals.internal.SettingsStore;
import org.eclipse.tcf.te.ui.terminals.launcher.AbstractLauncherDelegate;
import org.eclipse.tcf.te.ui.terminals.local.activator.UIPlugin;
import org.eclipse.tcf.te.ui.terminals.local.controls.LocalWizardConfigurationPanel;
@@ -46,6 +45,7 @@ import org.eclipse.tcf.te.ui.terminals.local.showin.interfaces.IPreferenceKeys;
import org.eclipse.tcf.te.ui.terminals.process.ProcessSettings;
import org.eclipse.tm.internal.terminal.provisional.api.ISettingsStore;
import org.eclipse.tm.internal.terminal.provisional.api.ITerminalConnector;
+import org.eclipse.tm.internal.terminal.provisional.api.SettingsStore;
import org.eclipse.tm.internal.terminal.provisional.api.TerminalConnectorExtension;
import org.eclipse.ui.ISelectionService;
import org.eclipse.ui.PlatformUI;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.process/src/org/eclipse/tcf/te/ui/terminals/process/ProcessLauncherDelegate.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.process/src/org/eclipse/tcf/te/ui/terminals/process/ProcessLauncherDelegate.java
index fc78d60de..ef5796421 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.process/src/org/eclipse/tcf/te/ui/terminals/process/ProcessLauncherDelegate.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.process/src/org/eclipse/tcf/te/ui/terminals/process/ProcessLauncherDelegate.java
@@ -20,10 +20,10 @@ import org.eclipse.tcf.te.core.terminals.interfaces.ITerminalServiceOutputStream
import org.eclipse.tcf.te.core.terminals.interfaces.constants.ITerminalsConnectorConstants;
import org.eclipse.tcf.te.ui.terminals.interfaces.IConfigurationPanel;
import org.eclipse.tcf.te.ui.terminals.interfaces.IConfigurationPanelContainer;
-import org.eclipse.tcf.te.ui.terminals.internal.SettingsStore;
import org.eclipse.tcf.te.ui.terminals.launcher.AbstractLauncherDelegate;
import org.eclipse.tm.internal.terminal.provisional.api.ISettingsStore;
import org.eclipse.tm.internal.terminal.provisional.api.ITerminalConnector;
+import org.eclipse.tm.internal.terminal.provisional.api.SettingsStore;
import org.eclipse.tm.internal.terminal.provisional.api.TerminalConnectorExtension;
/**
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.process/src/org/eclipse/tcf/te/ui/terminals/process/ProcessSettings.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.process/src/org/eclipse/tcf/te/ui/terminals/process/ProcessSettings.java
index 4a306ddfb..6be8344f1 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.process/src/org/eclipse/tcf/te/ui/terminals/process/ProcessSettings.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.process/src/org/eclipse/tcf/te/ui/terminals/process/ProcessSettings.java
@@ -12,7 +12,6 @@ package org.eclipse.tcf.te.ui.terminals.process;
import org.eclipse.cdt.utils.pty.PTY;
import org.eclipse.core.runtime.Assert;
import org.eclipse.tcf.te.core.terminals.interfaces.ITerminalServiceOutputStreamMonitorListener;
-import org.eclipse.tcf.te.ui.terminals.internal.SettingsStore;
import org.eclipse.tm.internal.terminal.provisional.api.ISettingsStore;
/**
@@ -260,19 +259,17 @@ public class ProcessSettings {
*/
public void load(ISettingsStore store) {
Assert.isNotNull(store);
- image = store.get("Path", null);//$NON-NLS-1$
- arguments = store.get("Arguments", null); //$NON-NLS-1$
- localEcho = Boolean.parseBoolean(store.get("LocalEcho", Boolean.FALSE.toString())); //$NON-NLS-1$
- mergeWithNativeEnvironment = Boolean.parseBoolean(store.get("MergeWithNativeEnvironment", Boolean.FALSE.toString())); //$NON-NLS-1$
- lineSeparator = store.get("LineSeparator", null); //$NON-NLS-1$
- workingDir = store.get("WorkingDir", null); //$NON-NLS-1$
- if (store instanceof SettingsStore) {
- process = (Process)((SettingsStore)store).getSettings().get("Process"); //$NON-NLS-1$
- pty = (PTY)((SettingsStore)store).getSettings().get("PTY"); //$NON-NLS-1$
- stdoutListeners = (ITerminalServiceOutputStreamMonitorListener[])((SettingsStore)store).getSettings().get("StdOutListeners"); //$NON-NLS-1$
- stderrListeners = (ITerminalServiceOutputStreamMonitorListener[])((SettingsStore)store).getSettings().get("StdErrListeners"); //$NON-NLS-1$
- environment = (String[])((SettingsStore)store).getSettings().get("Environment"); //$NON-NLS-1$
- }
+ image = store.getStringProperty("Path");//$NON-NLS-1$
+ arguments = store.getStringProperty("Arguments"); //$NON-NLS-1$
+ localEcho = store.getBooleanProperty("LocalEcho"); //$NON-NLS-1$
+ mergeWithNativeEnvironment = store.getBooleanProperty("MergeWithNativeEnvironment"); //$NON-NLS-1$
+ lineSeparator = store.getStringProperty("LineSeparator"); //$NON-NLS-1$
+ workingDir = store.getStringProperty("WorkingDir"); //$NON-NLS-1$
+ process = (Process)store.getProperty("Process"); //$NON-NLS-1$
+ pty = (PTY)store.getProperty("PTY"); //$NON-NLS-1$
+ stdoutListeners = (ITerminalServiceOutputStreamMonitorListener[])store.getProperty("StdOutListeners"); //$NON-NLS-1$
+ stderrListeners = (ITerminalServiceOutputStreamMonitorListener[])store.getProperty("StdErrListeners"); //$NON-NLS-1$
+ environment = (String[])store.getProperty("Environment"); //$NON-NLS-1$
}
/**
@@ -282,18 +279,16 @@ public class ProcessSettings {
*/
public void save(ISettingsStore store) {
Assert.isNotNull(store);
- store.put("Path", image);//$NON-NLS-1$
- store.put("Arguments", arguments); //$NON-NLS-1$
- store.put("LocalEcho", Boolean.toString(localEcho)); //$NON-NLS-1$
- store.put("MergeWithNativeEnvironment", Boolean.toString(mergeWithNativeEnvironment)); //$NON-NLS-1$
- store.put("LineSeparator", lineSeparator); //$NON-NLS-1$
- store.put("WorkingDir", workingDir); //$NON-NLS-1$
- if (store instanceof SettingsStore) {
- ((SettingsStore)store).getSettings().put("Process", process); //$NON-NLS-1$
- ((SettingsStore)store).getSettings().put("PTY", pty); //$NON-NLS-1$
- ((SettingsStore)store).getSettings().put("StdOutListeners", stdoutListeners); //$NON-NLS-1$
- ((SettingsStore)store).getSettings().put("StdErrListeners", stderrListeners); //$NON-NLS-1$
- ((SettingsStore)store).getSettings().put("Environment", environment); //$NON-NLS-1$
- }
+ store.setProperty("Path", image);//$NON-NLS-1$
+ store.setProperty("Arguments", arguments); //$NON-NLS-1$
+ store.setProperty("LocalEcho", localEcho); //$NON-NLS-1$
+ store.setProperty("MergeWithNativeEnvironment", mergeWithNativeEnvironment); //$NON-NLS-1$
+ store.setProperty("LineSeparator", lineSeparator); //$NON-NLS-1$
+ store.setProperty("WorkingDir", workingDir); //$NON-NLS-1$
+ store.setProperty("Process", process); //$NON-NLS-1$
+ store.setProperty("PTY", pty); //$NON-NLS-1$
+ store.setProperty("StdOutListeners", stdoutListeners); //$NON-NLS-1$
+ store.setProperty("StdErrListeners", stderrListeners); //$NON-NLS-1$
+ store.setProperty("Environment", environment); //$NON-NLS-1$
}
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.serial/src/org/eclipse/tcf/te/ui/terminals/serial/launcher/SerialLauncherDelegate.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.serial/src/org/eclipse/tcf/te/ui/terminals/serial/launcher/SerialLauncherDelegate.java
index 6a8dd00a4..29a051b62 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.serial/src/org/eclipse/tcf/te/ui/terminals/serial/launcher/SerialLauncherDelegate.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.serial/src/org/eclipse/tcf/te/ui/terminals/serial/launcher/SerialLauncherDelegate.java
@@ -22,12 +22,12 @@ import org.eclipse.tcf.te.core.terminals.interfaces.constants.ITerminalsConnecto
import org.eclipse.tcf.te.ui.terminals.interfaces.IConfigurationPanel;
import org.eclipse.tcf.te.ui.terminals.interfaces.IConfigurationPanelContainer;
import org.eclipse.tcf.te.ui.terminals.interfaces.IMementoHandler;
-import org.eclipse.tcf.te.ui.terminals.internal.SettingsStore;
import org.eclipse.tcf.te.ui.terminals.launcher.AbstractLauncherDelegate;
import org.eclipse.tcf.te.ui.terminals.serial.controls.SerialConfigurationPanel;
import org.eclipse.tcf.te.ui.terminals.serial.nls.Messages;
import org.eclipse.tm.internal.terminal.provisional.api.ISettingsStore;
import org.eclipse.tm.internal.terminal.provisional.api.ITerminalConnector;
+import org.eclipse.tm.internal.terminal.provisional.api.SettingsStore;
import org.eclipse.tm.internal.terminal.provisional.api.TerminalConnectorExtension;
import org.eclipse.tm.internal.terminal.serial.SerialSettings;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.ssh/src/org/eclipse/tcf/te/ui/terminals/ssh/launcher/SshLauncherDelegate.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.ssh/src/org/eclipse/tcf/te/ui/terminals/ssh/launcher/SshLauncherDelegate.java
index 3fd55ba81..c294ef381 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.ssh/src/org/eclipse/tcf/te/ui/terminals/ssh/launcher/SshLauncherDelegate.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.ssh/src/org/eclipse/tcf/te/ui/terminals/ssh/launcher/SshLauncherDelegate.java
@@ -23,12 +23,12 @@ import org.eclipse.tcf.te.core.terminals.interfaces.constants.ITerminalsConnecto
import org.eclipse.tcf.te.ui.terminals.interfaces.IConfigurationPanel;
import org.eclipse.tcf.te.ui.terminals.interfaces.IConfigurationPanelContainer;
import org.eclipse.tcf.te.ui.terminals.interfaces.IMementoHandler;
-import org.eclipse.tcf.te.ui.terminals.internal.SettingsStore;
import org.eclipse.tcf.te.ui.terminals.launcher.AbstractLauncherDelegate;
import org.eclipse.tcf.te.ui.terminals.ssh.controls.SshWizardConfigurationPanel;
import org.eclipse.tcf.te.ui.terminals.ssh.nls.Messages;
import org.eclipse.tm.internal.terminal.provisional.api.ISettingsStore;
import org.eclipse.tm.internal.terminal.provisional.api.ITerminalConnector;
+import org.eclipse.tm.internal.terminal.provisional.api.SettingsStore;
import org.eclipse.tm.internal.terminal.provisional.api.TerminalConnectorExtension;
import org.eclipse.tm.internal.terminal.ssh.SshSettings;
@@ -165,7 +165,7 @@ public class SshLauncherDelegate extends AbstractLauncherDelegate {
sshSettings.save(store);
// MWE TODO make sure this is NOT passed outside as this is plain text
- store.put("Password", password); //$NON-NLS-1$
+ store.setProperty("Password", password); //$NON-NLS-1$
// Construct the terminal connector instance
ITerminalConnector connector = TerminalConnectorExtension.makeTerminalConnector(connectorId);
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.telnet/src/org/eclipse/tcf/te/ui/terminals/telnet/launcher/TelnetLauncherDelegate.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.telnet/src/org/eclipse/tcf/te/ui/terminals/telnet/launcher/TelnetLauncherDelegate.java
index 6bb351c8f..dceec53fc 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.telnet/src/org/eclipse/tcf/te/ui/terminals/telnet/launcher/TelnetLauncherDelegate.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.telnet/src/org/eclipse/tcf/te/ui/terminals/telnet/launcher/TelnetLauncherDelegate.java
@@ -23,12 +23,12 @@ import org.eclipse.tcf.te.core.terminals.interfaces.constants.ITerminalsConnecto
import org.eclipse.tcf.te.ui.terminals.interfaces.IConfigurationPanel;
import org.eclipse.tcf.te.ui.terminals.interfaces.IConfigurationPanelContainer;
import org.eclipse.tcf.te.ui.terminals.interfaces.IMementoHandler;
-import org.eclipse.tcf.te.ui.terminals.internal.SettingsStore;
import org.eclipse.tcf.te.ui.terminals.launcher.AbstractLauncherDelegate;
import org.eclipse.tcf.te.ui.terminals.telnet.controls.TelnetWizardConfigurationPanel;
import org.eclipse.tcf.te.ui.terminals.telnet.nls.Messages;
import org.eclipse.tm.internal.terminal.provisional.api.ISettingsStore;
import org.eclipse.tm.internal.terminal.provisional.api.ITerminalConnector;
+import org.eclipse.tm.internal.terminal.provisional.api.SettingsStore;
import org.eclipse.tm.internal.terminal.provisional.api.TerminalConnectorExtension;
import org.eclipse.tm.internal.terminal.telnet.TelnetSettings;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/internal/SettingsStore.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/internal/SettingsStore.java
deleted file mode 100644
index 31635db6d..000000000
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/internal/SettingsStore.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2015 Wind River Systems, Inc. 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 http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tcf.te.ui.terminals.internal;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.tm.internal.terminal.provisional.api.ISettingsStore;
-
-/**
- * Simple default Terminal settings store implementation keeping the settings
- * within memory.
- */
-@SuppressWarnings("restriction")
-public class SettingsStore implements ISettingsStore {
- private final Map<String, Object> settings = new HashMap<String, Object>();
-
- /**
- * Constructor.
- */
- public SettingsStore() {
- }
-
- /**
- * Returns the map containing the settings.
- *
- * @return The map containing the settings.
- */
- public final Map<String, Object> getSettings() {
- return settings;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tcf.internal.terminal.provisional.api.ISettingsStore#get(java.lang.String, java.lang.String)
- */
- @Override
- public final String get(String key, String defaultValue) {
- Assert.isNotNull(key);
- String value = settings.get(key) instanceof String ? (String) settings.get(key) : null;
- return value != null ? value : defaultValue;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tcf.internal.terminal.provisional.api.ISettingsStore#get(java.lang.String)
- */
- @Override
- public final String get(String key) {
- Assert.isNotNull(key);
- return settings.get(key) instanceof String ? (String) settings.get(key) : null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tcf.internal.terminal.provisional.api.ISettingsStore#put(java.lang.String, java.lang.String)
- */
- @Override
- public final void put(String key, String value) {
- Assert.isNotNull(key);
- if (value == null) settings.remove(key);
- else settings.put(key, value);
- }
-}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/streams/StreamsLauncherDelegate.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/streams/StreamsLauncherDelegate.java
index 6d492e7ba..038c34b4c 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/streams/StreamsLauncherDelegate.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/streams/StreamsLauncherDelegate.java
@@ -21,10 +21,10 @@ import org.eclipse.tcf.te.core.terminals.interfaces.ITerminalServiceOutputStream
import org.eclipse.tcf.te.core.terminals.interfaces.constants.ITerminalsConnectorConstants;
import org.eclipse.tcf.te.ui.terminals.interfaces.IConfigurationPanel;
import org.eclipse.tcf.te.ui.terminals.interfaces.IConfigurationPanelContainer;
-import org.eclipse.tcf.te.ui.terminals.internal.SettingsStore;
import org.eclipse.tcf.te.ui.terminals.launcher.AbstractLauncherDelegate;
import org.eclipse.tm.internal.terminal.provisional.api.ISettingsStore;
import org.eclipse.tm.internal.terminal.provisional.api.ITerminalConnector;
+import org.eclipse.tm.internal.terminal.provisional.api.SettingsStore;
import org.eclipse.tm.internal.terminal.provisional.api.TerminalConnectorExtension;
/**
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/streams/StreamsSettings.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/streams/StreamsSettings.java
index dcaaac457..f94083a50 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/streams/StreamsSettings.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/streams/StreamsSettings.java
@@ -14,7 +14,6 @@ import java.io.OutputStream;
import org.eclipse.core.runtime.Assert;
import org.eclipse.tcf.te.core.terminals.interfaces.ITerminalServiceOutputStreamMonitorListener;
-import org.eclipse.tcf.te.ui.terminals.internal.SettingsStore;
import org.eclipse.tm.internal.terminal.provisional.api.ISettingsStore;
/**
@@ -171,15 +170,13 @@ public class StreamsSettings {
*/
public void load(ISettingsStore store) {
Assert.isNotNull(store);
- localEcho = Boolean.parseBoolean(store.get("LocalEcho", Boolean.FALSE.toString())); //$NON-NLS-1$
- lineSeparator = store.get("LineSeparator", null); //$NON-NLS-1$
- if (store instanceof SettingsStore) {
- stdin = (OutputStream)((SettingsStore)store).getSettings().get("stdin"); //$NON-NLS-1$
- stdout = (InputStream)((SettingsStore)store).getSettings().get("stdout"); //$NON-NLS-1$
- stderr = (InputStream)((SettingsStore)store).getSettings().get("stderr"); //$NON-NLS-1$
- stdoutListeners = (ITerminalServiceOutputStreamMonitorListener[])((SettingsStore)store).getSettings().get("StdOutListeners"); //$NON-NLS-1$
- stderrListeners = (ITerminalServiceOutputStreamMonitorListener[])((SettingsStore)store).getSettings().get("StdErrListeners"); //$NON-NLS-1$
- }
+ localEcho = store.getBooleanProperty("LocalEcho"); //$NON-NLS-1$
+ lineSeparator = store.getStringProperty("LineSeparator"); //$NON-NLS-1$
+ stdin = (OutputStream)store.getProperty("stdin"); //$NON-NLS-1$
+ stdout = (InputStream)store.getProperty("stdout"); //$NON-NLS-1$
+ stderr = (InputStream)store.getProperty("stderr"); //$NON-NLS-1$
+ stdoutListeners = (ITerminalServiceOutputStreamMonitorListener[])store.getProperty("StdOutListeners"); //$NON-NLS-1$
+ stderrListeners = (ITerminalServiceOutputStreamMonitorListener[])store.getProperty("StdErrListeners"); //$NON-NLS-1$
}
/**
@@ -189,14 +186,12 @@ public class StreamsSettings {
*/
public void save(ISettingsStore store) {
Assert.isNotNull(store);
- store.put("LocalEcho", Boolean.toString(localEcho)); //$NON-NLS-1$
- store.put("LineSeparator", lineSeparator); //$NON-NLS-1$
- if (store instanceof SettingsStore) {
- ((SettingsStore)store).getSettings().put("stdin", stdin); //$NON-NLS-1$
- ((SettingsStore)store).getSettings().put("stdout", stdout); //$NON-NLS-1$
- ((SettingsStore)store).getSettings().put("stderr", stderr); //$NON-NLS-1$
- ((SettingsStore)store).getSettings().put("StdOutListeners", stdoutListeners); //$NON-NLS-1$
- ((SettingsStore)store).getSettings().put("StdErrListeners", stderrListeners); //$NON-NLS-1$
- }
+ store.setProperty("LocalEcho", localEcho); //$NON-NLS-1$
+ store.setProperty("LineSeparator", lineSeparator); //$NON-NLS-1$
+ store.setProperty("stdin", stdin); //$NON-NLS-1$
+ store.setProperty("stdout", stdout); //$NON-NLS-1$
+ store.setProperty("stderr", stderr); //$NON-NLS-1$
+ store.setProperty("StdOutListeners", stdoutListeners); //$NON-NLS-1$
+ store.setProperty("StdErrListeners", stderrListeners); //$NON-NLS-1$
}
}

Back to the top