Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUwe Stieber2012-08-14 05:48:26 -0400
committerUwe Stieber2012-08-14 05:49:23 -0400
commit9a80781d4c0211572076f3d8e1c0053f4071bc3f (patch)
tree6800889d16f5dce01794a62a26932718ef4ff9a1 /target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.serial
parent92bf484c46ac1a8a2f08f07e9d080d8e99d3b767 (diff)
downloadorg.eclipse.tcf-9a80781d4c0211572076f3d8e1c0053f4071bc3f.tar.gz
org.eclipse.tcf-9a80781d4c0211572076f3d8e1c0053f4071bc3f.tar.xz
org.eclipse.tcf-9a80781d4c0211572076f3d8e1c0053f4071bc3f.zip
Target Explorer: Bug 379394 - [Terminal] Add a UI Control for setting the Terminal's encoding
Diffstat (limited to 'target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.serial')
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.serial/src/org/eclipse/tcf/te/ui/terminals/serial/controls/SerialWizardConfigurationPanel.java21
1 files changed, 18 insertions, 3 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.serial/src/org/eclipse/tcf/te/ui/terminals/serial/controls/SerialWizardConfigurationPanel.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.serial/src/org/eclipse/tcf/te/ui/terminals/serial/controls/SerialWizardConfigurationPanel.java
index bbb49ad98..6f8f7d5be 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.serial/src/org/eclipse/tcf/te/ui/terminals/serial/controls/SerialWizardConfigurationPanel.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.serial/src/org/eclipse/tcf/te/ui/terminals/serial/controls/SerialWizardConfigurationPanel.java
@@ -9,6 +9,7 @@
*******************************************************************************/
package org.eclipse.tcf.te.ui.terminals.serial.controls;
+import org.eclipse.core.runtime.Assert;
import org.eclipse.jface.dialogs.IDialogSettings;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.TypedEvent;
@@ -49,13 +50,15 @@ public class SerialWizardConfigurationPanel extends AbstractConfigurationPanel i
GridData data = new GridData(SWT.FILL, SWT.FILL, true, true);
panel.setLayoutData(data);
- if(isWithoutSelection()){
- createHostsUI(panel);
- }
+ // Create the host selection combo
+ if (isWithoutSelection()) createHostsUI(panel, true);
serialSettingsPage = new SerialLinePanel(new BaseDialogPageControl(), true, true, true);
serialSettingsPage.setupPanel(panel, toolkit);
+ // Create the encoding selection combo
+ createEncodingUI(panel, true);
+
setControl(panel);
}
@@ -87,6 +90,7 @@ public class SerialWizardConfigurationPanel extends AbstractConfigurationPanel i
data.setProperty(ITerminalsConnectorConstants.PROP_CONNECTOR_TYPE_ID, "org.eclipse.tcf.te.ui.terminals.type.serial");
serialSettingsPage.extractData(data);
+ data.setProperty(ITerminalsConnectorConstants.PROP_ENCODING, getEncoding());
}
/* (non-Javadoc)
@@ -116,7 +120,13 @@ public class SerialWizardConfigurationPanel extends AbstractConfigurationPanel i
*/
@Override
public void doSaveWidgetValues(IDialogSettings settings, String idPrefix) {
+ Assert.isNotNull(settings);
serialSettingsPage.doSaveWidgetValues(settings, idPrefix);
+
+ String encoding = getEncoding();
+ if (encoding != null) {
+ settings.put(getParentControl().prefixDialogSettingsSlotId(ITerminalsConnectorConstants.PROP_ENCODING, idPrefix), encoding);
+ }
}
/* (non-Javadoc)
@@ -124,7 +134,12 @@ public class SerialWizardConfigurationPanel extends AbstractConfigurationPanel i
*/
@Override
public void doRestoreWidgetValues(IDialogSettings settings, String idPrefix) {
+ Assert.isNotNull(settings);
serialSettingsPage.doRestoreWidgetValues(settings, idPrefix);
+ String encoding = settings.get(getParentControl().prefixDialogSettingsSlotId(ITerminalsConnectorConstants.PROP_ENCODING, idPrefix));
+ if (encoding != null && encoding.trim().length() > 0) {
+ setEncoding(encoding);
+ }
}
/* (non-Javadoc)

Back to the top