From 699b4f63992502331d77c066a66b8a1ce61762d6 Mon Sep 17 00:00:00 2001 From: Denys Almazov Date: Mon, 28 Jul 2025 14:10:45 +0300 Subject: [PATCH 1/9] fix: applied correct formatting --- .../serial/connector/SerialConnector.java | 42 ++++++++++++------- .../serial/connector/SerialSettings.java | 33 ++++++++++----- .../serial/controls/SerialConfigPanel.java | 39 +++++++++++------ .../launcher/SerialLauncherDelegate.java | 27 ++++++++---- 4 files changed, 94 insertions(+), 47 deletions(-) diff --git a/bundles/com.espressif.idf.terminal.connector.serial/src/com/espressif/idf/terminal/connector/serial/connector/SerialConnector.java b/bundles/com.espressif.idf.terminal.connector.serial/src/com/espressif/idf/terminal/connector/serial/connector/SerialConnector.java index 07691b62f..6461d8377 100644 --- a/bundles/com.espressif.idf.terminal.connector.serial/src/com/espressif/idf/terminal/connector/serial/connector/SerialConnector.java +++ b/bundles/com.espressif.idf.terminal.connector.serial/src/com/espressif/idf/terminal/connector/serial/connector/SerialConnector.java @@ -28,7 +28,8 @@ import com.espressif.idf.core.util.StringUtil; import com.espressif.idf.terminal.connector.serial.activator.Activator; -public class SerialConnector extends TerminalConnectorImpl { +public class SerialConnector extends TerminalConnectorImpl +{ private SerialSettings settings = new SerialSettings(); protected Process process; @@ -40,43 +41,51 @@ public class SerialConnector extends TerminalConnectorImpl { private static Set openPorts = new HashSet<>(); - public static boolean isOpen(String portName) { + public static boolean isOpen(String portName) + { return openPorts.contains(portName); } @Override - public OutputStream getTerminalToRemoteStream() { + public OutputStream getTerminalToRemoteStream() + { return process.getOutputStream(); } - public SerialSettings getSettings() { + public SerialSettings getSettings() + { return settings; } @Override - public String getSettingsSummary() { + public String getSettingsSummary() + { return settings.getSummary(); } @Override - public void load(ISettingsStore store) { + public void load(ISettingsStore store) + { settings.load(store); } @Override - public void save(ISettingsStore store) { + public void save(ISettingsStore store) + { settings.save(store); } @Override - public void connect(ITerminalControl control) { + public void connect(ITerminalControl control) + { super.connect(control); this.control = control; - //Get selected project - which is required for IDF Monitor + // Get selected project - which is required for IDF Monitor project = settings.getProject(); - if (project == null) { + if (project == null) + { String message = "project can't be null. Make sure you select a project before launch a serial monitor"; //$NON-NLS-1$ Activator.log(new Status(IStatus.ERROR, Activator.getUniqueIdentifier(), message, null)); return; @@ -94,13 +103,18 @@ public void connect(ITerminalControl control) { } @Override - protected void doDisconnect() { + protected void doDisconnect() + { - if (serialPort != null && serialPort.isOpen()) { + if (serialPort != null && serialPort.isOpen()) + { openPorts.remove(serialPort.getPortName()); - try { + try + { serialPort.close(); - } catch (IOException e) { + } + catch (IOException e) + { Activator.log(e); } } diff --git a/bundles/com.espressif.idf.terminal.connector.serial/src/com/espressif/idf/terminal/connector/serial/connector/SerialSettings.java b/bundles/com.espressif.idf.terminal.connector.serial/src/com/espressif/idf/terminal/connector/serial/connector/SerialSettings.java index 3ab791dc4..806db3d4b 100644 --- a/bundles/com.espressif.idf.terminal.connector.serial/src/com/espressif/idf/terminal/connector/serial/connector/SerialSettings.java +++ b/bundles/com.espressif.idf.terminal.connector.serial/src/com/espressif/idf/terminal/connector/serial/connector/SerialSettings.java @@ -19,7 +19,8 @@ import com.espressif.idf.core.util.StringUtil; -public class SerialSettings { +public class SerialSettings +{ public static final String PORT_NAME_ATTR = "cdtserial.portName"; //$NON-NLS-1$ public static final String MONITOR_FILTER = "idf.monitor.filter"; //$NON-NLS-1$ @@ -32,7 +33,8 @@ public class SerialSettings { /** * Load information into the RemoteSettings object. */ - public void load(ISettingsStore store) { + public void load(ISettingsStore store) + { portName = store.get(PORT_NAME_ATTR, ""); //$NON-NLS-1$ filterText = store.get(MONITOR_FILTER, ""); //$NON-NLS-1$ selectedProject = store.get(SELECTED_PROJECT_ATTR, ""); //$NON-NLS-1$ @@ -41,44 +43,53 @@ public void load(ISettingsStore store) { /** * Extract information from the RemoteSettings object. */ - public void save(ISettingsStore store) { + public void save(ISettingsStore store) + { store.put(PORT_NAME_ATTR, portName); store.put(MONITOR_FILTER, filterText); store.put(SELECTED_PROJECT_ATTR, selectedProject); } - public String getPortName() { + public String getPortName() + { return portName; } - public String getFilterText() { + public String getFilterText() + { return filterText; } - public String getProjectName() { + public String getProjectName() + { return selectedProject; } - public IProject getProject() { + public IProject getProject() + { return !StringUtil.isEmpty(selectedProject) ? ResourcesPlugin.getWorkspace().getRoot().getProject(selectedProject) : null; } - public void setPortName(String portName) { + public void setPortName(String portName) + { this.portName = portName; } - public void setFilterText(String filterText) { + public void setFilterText(String filterText) + { this.filterText = filterText; } - public String getSummary() { + public String getSummary() + { return portName; } - public void setProject(String projectName) { + public void setProject(String projectName) + { this.selectedProject = projectName; } diff --git a/bundles/com.espressif.idf.terminal.connector.serial/src/com/espressif/idf/terminal/connector/serial/controls/SerialConfigPanel.java b/bundles/com.espressif.idf.terminal.connector.serial/src/com/espressif/idf/terminal/connector/serial/controls/SerialConfigPanel.java index 1d3858486..ca2c158d9 100644 --- a/bundles/com.espressif.idf.terminal.connector.serial/src/com/espressif/idf/terminal/connector/serial/controls/SerialConfigPanel.java +++ b/bundles/com.espressif.idf.terminal.connector.serial/src/com/espressif/idf/terminal/connector/serial/controls/SerialConfigPanel.java @@ -26,17 +26,20 @@ import com.espressif.idf.terminal.connector.serial.connector.SerialConnector; import com.espressif.idf.terminal.connector.serial.connector.SerialSettings; -public class SerialConfigPanel extends AbstractExtendedConfigurationPanel { +public class SerialConfigPanel extends AbstractExtendedConfigurationPanel +{ private SerialSettings settings; private SerialSettingsPage page; - public SerialConfigPanel(IConfigurationPanelContainer container) { + public SerialConfigPanel(IConfigurationPanelContainer container) + { super(container); } @Override - public void setupPanel(Composite parent) { + public void setupPanel(Composite parent) + { Composite panel = new Composite(parent, SWT.NONE); panel.setLayout(new GridLayout()); GridData data = new GridData(SWT.FILL, SWT.FILL, true, true); @@ -53,8 +56,10 @@ public void setupPanel(Composite parent) { } @Override - public void extractData(Map data) { - if (data == null) { + public void extractData(Map data) + { + if (data == null) + { return; } @@ -63,14 +68,17 @@ public void extractData(Map data) { data.put(SerialSettings.MONITOR_FILTER, settings.getFilterText()); data.put(SerialSettings.SELECTED_PROJECT_ATTR, settings.getProjectName()); - if (getEncoding() != null) { + if (getEncoding() != null) + { data.put(ITerminalsConnectorConstants.PROP_ENCODING, getEncoding()); } } @Override - public void setupData(Map data) { - if (data == null) { + public void setupData(Map data) + { + if (data == null) + { return; } @@ -78,22 +86,27 @@ public void setupData(Map data) { settings.setFilterText((String) data.get(SerialSettings.MONITOR_FILTER)); String encoding = (String) data.get(ITerminalsConnectorConstants.PROP_ENCODING); - if (encoding != null) { + if (encoding != null) + { setEncoding(encoding); } } @Override - protected void saveSettingsForHost(boolean add) { + protected void saveSettingsForHost(boolean add) + { } @Override - protected void fillSettingsForHost(String host) { + protected void fillSettingsForHost(String host) + { } @Override - protected String getHostFromSettings() { - if (page != null) { + protected String getHostFromSettings() + { + if (page != null) + { page.saveSettings(); return settings.getPortName(); } diff --git a/bundles/com.espressif.idf.terminal.connector.serial/src/com/espressif/idf/terminal/connector/serial/launcher/SerialLauncherDelegate.java b/bundles/com.espressif.idf.terminal.connector.serial/src/com/espressif/idf/terminal/connector/serial/launcher/SerialLauncherDelegate.java index fdb5e48af..2afa0e0a8 100644 --- a/bundles/com.espressif.idf.terminal.connector.serial/src/com/espressif/idf/terminal/connector/serial/launcher/SerialLauncherDelegate.java +++ b/bundles/com.espressif.idf.terminal.connector.serial/src/com/espressif/idf/terminal/connector/serial/launcher/SerialLauncherDelegate.java @@ -30,25 +30,30 @@ import com.espressif.idf.terminal.connector.serial.connector.SerialSettings; import com.espressif.idf.terminal.connector.serial.controls.SerialConfigPanel; -public class SerialLauncherDelegate extends AbstractLauncherDelegate { +public class SerialLauncherDelegate extends AbstractLauncherDelegate +{ @Override - public boolean needsUserConfiguration() { + public boolean needsUserConfiguration() + { return true; } @Override - public IConfigurationPanel getPanel(IConfigurationPanelContainer container) { + public IConfigurationPanel getPanel(IConfigurationPanelContainer container) + { return new SerialConfigPanel(container); } @Override - public ITerminalConnector createTerminalConnector(Map properties) { + public ITerminalConnector createTerminalConnector(Map properties) + { Assert.isNotNull(properties); // Check for the terminal connector id String connectorId = (String) properties.get(ITerminalsConnectorConstants.PROP_TERMINAL_CONNECTOR_ID); - if (connectorId == null) { + if (connectorId == null) + { connectorId = "com.espressif.idf.terminal.connector.serial.SerialConnector"; //$NON-NLS-1$ } @@ -63,7 +68,8 @@ public ITerminalConnector createTerminalConnector(Map properties // Construct the terminal connector instance ITerminalConnector connector = TerminalConnectorExtension.makeTerminalConnector(connectorId); - if (connector != null) { + if (connector != null) + { // Apply default settings connector.setDefaultSettings(); // And load the real settings @@ -74,7 +80,8 @@ public ITerminalConnector createTerminalConnector(Map properties } @Override - public void execute(Map properties, Done done) { + public void execute(Map properties, Done done) + { Assert.isNotNull(properties); // Set the terminal tab title @@ -83,14 +90,16 @@ public void execute(Map properties, Done done) { // Force a new terminal tab each time it is launched, if not set otherwise from outside // TODO need a command shell service routing to get this - if (!properties.containsKey(ITerminalsConnectorConstants.PROP_FORCE_NEW)) { + if (!properties.containsKey(ITerminalsConnectorConstants.PROP_FORCE_NEW)) + { properties.put(ITerminalsConnectorConstants.PROP_FORCE_NEW, Boolean.TRUE); } // Get the terminal service ITerminalService terminal = TerminalServiceFactory.getService(); // If not available, we cannot fulfill this request - if (terminal != null) { + if (terminal != null) + { terminal.openConsole(properties, done); } } From 8fcbc86e2455d2d50a3199161f30d993a282c9f7 Mon Sep 17 00:00:00 2001 From: Denys Almazov Date: Mon, 28 Jul 2025 14:15:55 +0300 Subject: [PATCH 2/9] feat: adding the encryption option --- .../idf/serial/monitor/core/IDFMonitor.java | 9 ++++++++- .../monitor/handlers/SerialMonitorHandler.java | 8 ++++++-- .../serial/connector/SerialConnector.java | 3 ++- .../serial/connector/SerialPortHandler.java | 14 ++------------ .../connector/serial/connector/SerialSettings.java | 14 ++++++++++++++ .../serial/controls/SerialConfigPanel.java | 3 ++- .../serial/controls/SerialSettingsPage.java | 12 ++++++++++++ .../serial/launcher/SerialLauncherDelegate.java | 1 + 8 files changed, 47 insertions(+), 17 deletions(-) diff --git a/bundles/com.espressif.idf.serial.monitor/src/com/espressif/idf/serial/monitor/core/IDFMonitor.java b/bundles/com.espressif.idf.serial.monitor/src/com/espressif/idf/serial/monitor/core/IDFMonitor.java index ce8f17126..0e0c31c5b 100644 --- a/bundles/com.espressif.idf.serial.monitor/src/com/espressif/idf/serial/monitor/core/IDFMonitor.java +++ b/bundles/com.espressif.idf.serial.monitor/src/com/espressif/idf/serial/monitor/core/IDFMonitor.java @@ -40,13 +40,16 @@ public class IDFMonitor private IProject project; private String filterOptions; private int serverPort; + private boolean encryptionOption; - public IDFMonitor(IProject project, String port, String filterOptions, String pythonBinPath, int serverPort) + public IDFMonitor(IProject project, String port, String filterOptions, boolean encryptionOption, + String pythonBinPath, int serverPort) { this.project = project; this.port = port; this.pythonBinPath = pythonBinPath; this.filterOptions = filterOptions; + this.encryptionOption = encryptionOption; this.serverPort = serverPort; } @@ -71,6 +74,10 @@ private List commandArgsWithSocketServer() args.add(port); args.add("-b"); //$NON-NLS-1$ args.add(getMonitorBaudRate()); + if (encryptionOption) + { + args.add("--encrypted"); //$NON-NLS-1$ + } args.add("--ws"); //$NON-NLS-1$ args.add("ws://localhost:".concat(String.valueOf(serverPort))); //$NON-NLS-1$ args.add(getElfFilePath(project).toString()); diff --git a/bundles/com.espressif.idf.serial.monitor/src/com/espressif/idf/serial/monitor/handlers/SerialMonitorHandler.java b/bundles/com.espressif.idf.serial.monitor/src/com/espressif/idf/serial/monitor/handlers/SerialMonitorHandler.java index f2fdf797e..dd4c2375f 100644 --- a/bundles/com.espressif.idf.serial.monitor/src/com/espressif/idf/serial/monitor/handlers/SerialMonitorHandler.java +++ b/bundles/com.espressif.idf.serial.monitor/src/com/espressif/idf/serial/monitor/handlers/SerialMonitorHandler.java @@ -17,13 +17,16 @@ public class SerialMonitorHandler private String serialPort; private String filterOptions; private int serverPort; + private boolean encryptionOption; - public SerialMonitorHandler(IProject project, String serialPort, String filterOptions, int serverPort) + public SerialMonitorHandler(IProject project, String serialPort, String filterOptions, boolean encryptionOption, + int serverPort) { this.project = project; this.serialPort = serialPort; this.filterOptions = filterOptions; this.serverPort = serverPort; + this.encryptionOption = encryptionOption; } public Process invokeIDFMonitor() @@ -31,7 +34,8 @@ public Process invokeIDFMonitor() // python path String pythonPath = IDFUtil.getIDFPythonEnvPath(); - IDFMonitor monitor = new IDFMonitor(project, serialPort, filterOptions, pythonPath, serverPort); + IDFMonitor monitor = new IDFMonitor(project, serialPort, filterOptions, encryptionOption, pythonPath, + serverPort); try { return monitor.start(); diff --git a/bundles/com.espressif.idf.terminal.connector.serial/src/com/espressif/idf/terminal/connector/serial/connector/SerialConnector.java b/bundles/com.espressif.idf.terminal.connector.serial/src/com/espressif/idf/terminal/connector/serial/connector/SerialConnector.java index 6461d8377..2f5eac321 100644 --- a/bundles/com.espressif.idf.terminal.connector.serial/src/com/espressif/idf/terminal/connector/serial/connector/SerialConnector.java +++ b/bundles/com.espressif.idf.terminal.connector.serial/src/com/espressif/idf/terminal/connector/serial/connector/SerialConnector.java @@ -36,6 +36,7 @@ public class SerialConnector extends TerminalConnectorImpl protected Thread thread; protected IProject project; protected String filterOptions; + protected boolean encryptionOption; protected ITerminalControl control; private SerialPortHandler serialPort; @@ -94,7 +95,7 @@ public void connect(ITerminalControl control) String portName = settings.getPortName(); filterOptions = settings.getFilterText(); filterOptions = StringUtil.isEmpty(filterOptions) ? StringUtil.EMPTY : filterOptions; - + encryptionOption = settings.getExtraMonitorOptions(); serialPort = new SerialPortHandler(portName, this, project); serialPort.open(); diff --git a/bundles/com.espressif.idf.terminal.connector.serial/src/com/espressif/idf/terminal/connector/serial/connector/SerialPortHandler.java b/bundles/com.espressif.idf.terminal.connector.serial/src/com/espressif/idf/terminal/connector/serial/connector/SerialPortHandler.java index 17d7875fb..3fda8468b 100644 --- a/bundles/com.espressif.idf.terminal.connector.serial/src/com/espressif/idf/terminal/connector/serial/connector/SerialPortHandler.java +++ b/bundles/com.espressif.idf.terminal.connector.serial/src/com/espressif/idf/terminal/connector/serial/connector/SerialPortHandler.java @@ -24,8 +24,6 @@ public class SerialPortHandler private boolean isOpen; private boolean isPaused; private Object pauseMutex = new Object(); - private IProject project; - private static final Map>> openPorts = new HashMap<>(); private Process process; @@ -37,14 +35,7 @@ public class SerialPortHandler private static String adjustPortName(String portName) { - if (System.getProperty("os.name").startsWith("Windows") && !portName.startsWith("\\\\.\\")) //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ - { - return portName; // $NON-NLS-1$ - } - else - { - return portName; - } + return portName; } /** @@ -88,7 +79,6 @@ public SerialPortHandler(String portName, SerialConnector serialConnector, IProj { this.portName = adjustPortName(portName); this.serialConnector = serialConnector; - this.project = project; this.serverMessageHandler = new SocketServerMessageHandler(serialConnector, project); } @@ -123,7 +113,7 @@ public synchronized void open() // Hook IDF Monitor with the CDT serial monitor SerialMonitorHandler serialMonitorHandler = new SerialMonitorHandler(serialConnector.project, portName, - serialConnector.filterOptions, serverPort); + serialConnector.filterOptions, serialConnector.encryptionOption, serverPort); process = serialMonitorHandler.invokeIDFMonitor(); serialConnector.process = process; thread = new Thread() diff --git a/bundles/com.espressif.idf.terminal.connector.serial/src/com/espressif/idf/terminal/connector/serial/connector/SerialSettings.java b/bundles/com.espressif.idf.terminal.connector.serial/src/com/espressif/idf/terminal/connector/serial/connector/SerialSettings.java index 806db3d4b..8bb804a4f 100644 --- a/bundles/com.espressif.idf.terminal.connector.serial/src/com/espressif/idf/terminal/connector/serial/connector/SerialSettings.java +++ b/bundles/com.espressif.idf.terminal.connector.serial/src/com/espressif/idf/terminal/connector/serial/connector/SerialSettings.java @@ -25,10 +25,12 @@ public class SerialSettings public static final String PORT_NAME_ATTR = "cdtserial.portName"; //$NON-NLS-1$ public static final String MONITOR_FILTER = "idf.monitor.filter"; //$NON-NLS-1$ public static final String SELECTED_PROJECT_ATTR = "idf.monitor.project"; //$NON-NLS-1$ + public static final String ENCRYPTION_ATTR = "idf.monitor.extraOptions"; //$NON-NLS-1$ private String portName; private String filterText; private String selectedProject; + private boolean extraMonitorOpts; /** * Load information into the RemoteSettings object. @@ -38,6 +40,7 @@ public void load(ISettingsStore store) portName = store.get(PORT_NAME_ATTR, ""); //$NON-NLS-1$ filterText = store.get(MONITOR_FILTER, ""); //$NON-NLS-1$ selectedProject = store.get(SELECTED_PROJECT_ATTR, ""); //$NON-NLS-1$ + extraMonitorOpts = Boolean.parseBoolean(store.get(ENCRYPTION_ATTR, "false")); //$NON-NLS-1$ } /** @@ -48,6 +51,7 @@ public void save(ISettingsStore store) store.put(PORT_NAME_ATTR, portName); store.put(MONITOR_FILTER, filterText); store.put(SELECTED_PROJECT_ATTR, selectedProject); + store.put(ENCRYPTION_ATTR, Boolean.toString(extraMonitorOpts)); } public String getPortName() @@ -65,6 +69,11 @@ public String getProjectName() return selectedProject; } + public boolean getExtraMonitorOptions() + { + return extraMonitorOpts; + } + public IProject getProject() { @@ -93,4 +102,9 @@ public void setProject(String projectName) this.selectedProject = projectName; } + public void setExtraOptions(boolean extraOptions) + { + this.extraMonitorOpts = extraOptions; + } + } diff --git a/bundles/com.espressif.idf.terminal.connector.serial/src/com/espressif/idf/terminal/connector/serial/controls/SerialConfigPanel.java b/bundles/com.espressif.idf.terminal.connector.serial/src/com/espressif/idf/terminal/connector/serial/controls/SerialConfigPanel.java index ca2c158d9..c175783bf 100644 --- a/bundles/com.espressif.idf.terminal.connector.serial/src/com/espressif/idf/terminal/connector/serial/controls/SerialConfigPanel.java +++ b/bundles/com.espressif.idf.terminal.connector.serial/src/com/espressif/idf/terminal/connector/serial/controls/SerialConfigPanel.java @@ -67,6 +67,7 @@ public void extractData(Map data) data.put(SerialSettings.PORT_NAME_ATTR, settings.getPortName()); data.put(SerialSettings.MONITOR_FILTER, settings.getFilterText()); data.put(SerialSettings.SELECTED_PROJECT_ATTR, settings.getProjectName()); + data.put(SerialSettings.ENCRYPTION_ATTR, settings.getExtraMonitorOptions()); if (getEncoding() != null) { @@ -84,7 +85,7 @@ public void setupData(Map data) settings.setPortName((String) data.get(SerialSettings.PORT_NAME_ATTR)); settings.setFilterText((String) data.get(SerialSettings.MONITOR_FILTER)); - + settings.setExtraOptions((boolean) data.get(SerialSettings.ENCRYPTION_ATTR)); String encoding = (String) data.get(ITerminalsConnectorConstants.PROP_ENCODING); if (encoding != null) { diff --git a/bundles/com.espressif.idf.terminal.connector.serial/src/com/espressif/idf/terminal/connector/serial/controls/SerialSettingsPage.java b/bundles/com.espressif.idf.terminal.connector.serial/src/com/espressif/idf/terminal/connector/serial/controls/SerialSettingsPage.java index 78628829b..968ef39ab 100644 --- a/bundles/com.espressif.idf.terminal.connector.serial/src/com/espressif/idf/terminal/connector/serial/controls/SerialSettingsPage.java +++ b/bundles/com.espressif.idf.terminal.connector.serial/src/com/espressif/idf/terminal/connector/serial/controls/SerialSettingsPage.java @@ -28,6 +28,7 @@ import org.eclipse.swt.events.SelectionEvent; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.layout.GridLayout; +import org.eclipse.swt.widgets.Button; import org.eclipse.swt.widgets.Combo; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Label; @@ -60,6 +61,8 @@ public class SerialSettingsPage extends AbstractSettingsPage private String lastUsedSerialPort; private Text filterText; private String filterConfig; + private Button encryptionCheckbox; + private boolean encryptionOption; public SerialSettingsPage(SerialSettings settings, IConfigurationPanel panel) { @@ -71,6 +74,7 @@ public SerialSettingsPage(SerialSettings settings, IConfigurationPanel panel) this.getClass().getSimpleName()); dialogSettings.get(SerialSettings.PORT_NAME_ATTR); filterConfig = dialogSettings.get(SerialSettings.MONITOR_FILTER); + encryptionOption = Boolean.parseBoolean(dialogSettings.get(SerialSettings.ENCRYPTION_ATTR)); lastUsedSerialPort = getLastUsedSerialPort(); @@ -152,6 +156,10 @@ public void widgetSelected(SelectionEvent e) filterText = new Text(comp, SWT.SINGLE | SWT.BORDER); filterText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); + encryptionCheckbox = new Button(comp, SWT.CHECK); + encryptionCheckbox.setText("Enable Encryption"); + encryptionCheckbox.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); + loadSettings(); } @@ -192,6 +200,8 @@ else if (portCombo.getItemCount() > 0) { this.filterText.setText(filterConfig); } + + this.encryptionCheckbox.setSelection(encryptionOption); } @Override @@ -200,10 +210,12 @@ public void saveSettings() settings.setPortName(portCombo.getText()); settings.setFilterText(filterText.getText().trim()); settings.setProject(projectCombo.getText()); + settings.setExtraOptions(encryptionCheckbox.getSelection()); dialogSettings.put(SerialSettings.SELECTED_PROJECT_ATTR, projectCombo.getText()); dialogSettings.put(SerialSettings.PORT_NAME_ATTR, portCombo.getText()); dialogSettings.put(SerialSettings.MONITOR_FILTER, filterText.getText().trim()); + dialogSettings.put(SerialSettings.ENCRYPTION_ATTR, encryptionCheckbox.getSelection()); } @Override diff --git a/bundles/com.espressif.idf.terminal.connector.serial/src/com/espressif/idf/terminal/connector/serial/launcher/SerialLauncherDelegate.java b/bundles/com.espressif.idf.terminal.connector.serial/src/com/espressif/idf/terminal/connector/serial/launcher/SerialLauncherDelegate.java index 2afa0e0a8..f98b95048 100644 --- a/bundles/com.espressif.idf.terminal.connector.serial/src/com/espressif/idf/terminal/connector/serial/launcher/SerialLauncherDelegate.java +++ b/bundles/com.espressif.idf.terminal.connector.serial/src/com/espressif/idf/terminal/connector/serial/launcher/SerialLauncherDelegate.java @@ -62,6 +62,7 @@ public ITerminalConnector createTerminalConnector(Map properties settings.setPortName((String) properties.get(SerialSettings.PORT_NAME_ATTR)); settings.setFilterText((String) properties.get(SerialSettings.MONITOR_FILTER)); settings.setProject((String) properties.get(SerialSettings.SELECTED_PROJECT_ATTR)); + settings.setExtraOptions((boolean) properties.get(SerialSettings.ENCRYPTION_ATTR)); // Construct the terminal settings store ISettingsStore store = new SettingsStore(); settings.save(store); From 8c9768ad6271bbb4b0f27399eedbdef585f1b3a8 Mon Sep 17 00:00:00 2001 From: Denys Almazov Date: Mon, 28 Jul 2025 14:18:45 +0300 Subject: [PATCH 3/9] feat: moved checkbox name to the nls --- .../terminal/connector/serial/controls/SerialSettingsPage.java | 2 +- .../espressif/idf/terminal/connector/serial/nls/Messages.java | 1 + .../idf/terminal/connector/serial/nls/Messages.properties | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/bundles/com.espressif.idf.terminal.connector.serial/src/com/espressif/idf/terminal/connector/serial/controls/SerialSettingsPage.java b/bundles/com.espressif.idf.terminal.connector.serial/src/com/espressif/idf/terminal/connector/serial/controls/SerialSettingsPage.java index 968ef39ab..da01c1ec4 100644 --- a/bundles/com.espressif.idf.terminal.connector.serial/src/com/espressif/idf/terminal/connector/serial/controls/SerialSettingsPage.java +++ b/bundles/com.espressif.idf.terminal.connector.serial/src/com/espressif/idf/terminal/connector/serial/controls/SerialSettingsPage.java @@ -157,7 +157,7 @@ public void widgetSelected(SelectionEvent e) filterText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); encryptionCheckbox = new Button(comp, SWT.CHECK); - encryptionCheckbox.setText("Enable Encryption"); + encryptionCheckbox.setText(Messages.SerialSettingsPage_EncryptionOption); encryptionCheckbox.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); loadSettings(); diff --git a/bundles/com.espressif.idf.terminal.connector.serial/src/com/espressif/idf/terminal/connector/serial/nls/Messages.java b/bundles/com.espressif.idf.terminal.connector.serial/src/com/espressif/idf/terminal/connector/serial/nls/Messages.java index f8d6b9ef0..96ab1430a 100644 --- a/bundles/com.espressif.idf.terminal.connector.serial/src/com/espressif/idf/terminal/connector/serial/nls/Messages.java +++ b/bundles/com.espressif.idf.terminal.connector.serial/src/com/espressif/idf/terminal/connector/serial/nls/Messages.java @@ -34,6 +34,7 @@ public class Messages extends NLS // **** Declare externalized string id's down here ***** + public static String SerialSettingsPage_EncryptionOption; public static String SerialSettingsPage_FilterOptions; public static String SerialSettingsPage_ProjectName; public static String SerialTerminalSettingsPage_SerialPort; diff --git a/bundles/com.espressif.idf.terminal.connector.serial/src/com/espressif/idf/terminal/connector/serial/nls/Messages.properties b/bundles/com.espressif.idf.terminal.connector.serial/src/com/espressif/idf/terminal/connector/serial/nls/Messages.properties index f04f18d51..cc7838ff8 100644 --- a/bundles/com.espressif.idf.terminal.connector.serial/src/com/espressif/idf/terminal/connector/serial/nls/Messages.properties +++ b/bundles/com.espressif.idf.terminal.connector.serial/src/com/espressif/idf/terminal/connector/serial/nls/Messages.properties @@ -11,6 +11,7 @@ # QNX Software Systems - Initial API and implementation ############################################################################### +SerialSettingsPage_EncryptionOption=Enable Encryption SerialSettingsPage_FilterOptions=Filter Options: SerialSettingsPage_ProjectName=Project name: SerialTerminalSettingsPage_SerialPort=Serial port: From dd35b546f26ef0afd8e2ae8d5649c026f9a9c7e1 Mon Sep 17 00:00:00 2001 From: Denys Almazov Date: Mon, 28 Jul 2025 16:48:23 +0300 Subject: [PATCH 4/9] fix: added safer casting to Boolean --- .../terminal/connector/serial/controls/SerialConfigPanel.java | 3 ++- .../connector/serial/launcher/SerialLauncherDelegate.java | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/bundles/com.espressif.idf.terminal.connector.serial/src/com/espressif/idf/terminal/connector/serial/controls/SerialConfigPanel.java b/bundles/com.espressif.idf.terminal.connector.serial/src/com/espressif/idf/terminal/connector/serial/controls/SerialConfigPanel.java index c175783bf..f7fae7e5e 100644 --- a/bundles/com.espressif.idf.terminal.connector.serial/src/com/espressif/idf/terminal/connector/serial/controls/SerialConfigPanel.java +++ b/bundles/com.espressif.idf.terminal.connector.serial/src/com/espressif/idf/terminal/connector/serial/controls/SerialConfigPanel.java @@ -85,7 +85,8 @@ public void setupData(Map data) settings.setPortName((String) data.get(SerialSettings.PORT_NAME_ATTR)); settings.setFilterText((String) data.get(SerialSettings.MONITOR_FILTER)); - settings.setExtraOptions((boolean) data.get(SerialSettings.ENCRYPTION_ATTR)); + Boolean encryptionValue = (Boolean) data.get(SerialSettings.ENCRYPTION_ATTR); + settings.setExtraOptions(encryptionValue != null ? encryptionValue : false); String encoding = (String) data.get(ITerminalsConnectorConstants.PROP_ENCODING); if (encoding != null) { diff --git a/bundles/com.espressif.idf.terminal.connector.serial/src/com/espressif/idf/terminal/connector/serial/launcher/SerialLauncherDelegate.java b/bundles/com.espressif.idf.terminal.connector.serial/src/com/espressif/idf/terminal/connector/serial/launcher/SerialLauncherDelegate.java index f98b95048..1d4546acf 100644 --- a/bundles/com.espressif.idf.terminal.connector.serial/src/com/espressif/idf/terminal/connector/serial/launcher/SerialLauncherDelegate.java +++ b/bundles/com.espressif.idf.terminal.connector.serial/src/com/espressif/idf/terminal/connector/serial/launcher/SerialLauncherDelegate.java @@ -62,7 +62,8 @@ public ITerminalConnector createTerminalConnector(Map properties settings.setPortName((String) properties.get(SerialSettings.PORT_NAME_ATTR)); settings.setFilterText((String) properties.get(SerialSettings.MONITOR_FILTER)); settings.setProject((String) properties.get(SerialSettings.SELECTED_PROJECT_ATTR)); - settings.setExtraOptions((boolean) properties.get(SerialSettings.ENCRYPTION_ATTR)); + Boolean encryptionOption = (Boolean) properties.get(SerialSettings.ENCRYPTION_ATTR); + settings.setExtraOptions(encryptionOption != null ? encryptionOption : false); // Construct the terminal settings store ISettingsStore store = new SettingsStore(); settings.save(store); From 1661ed5a276203941187d75de407144dcae621a0 Mon Sep 17 00:00:00 2001 From: Denys Almazov Date: Tue, 29 Jul 2025 11:31:18 +0300 Subject: [PATCH 5/9] feat: simplifying the expression for setting extra options --- .../terminal/connector/serial/controls/SerialConfigPanel.java | 2 +- .../connector/serial/launcher/SerialLauncherDelegate.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bundles/com.espressif.idf.terminal.connector.serial/src/com/espressif/idf/terminal/connector/serial/controls/SerialConfigPanel.java b/bundles/com.espressif.idf.terminal.connector.serial/src/com/espressif/idf/terminal/connector/serial/controls/SerialConfigPanel.java index f7fae7e5e..d73deb56d 100644 --- a/bundles/com.espressif.idf.terminal.connector.serial/src/com/espressif/idf/terminal/connector/serial/controls/SerialConfigPanel.java +++ b/bundles/com.espressif.idf.terminal.connector.serial/src/com/espressif/idf/terminal/connector/serial/controls/SerialConfigPanel.java @@ -86,7 +86,7 @@ public void setupData(Map data) settings.setPortName((String) data.get(SerialSettings.PORT_NAME_ATTR)); settings.setFilterText((String) data.get(SerialSettings.MONITOR_FILTER)); Boolean encryptionValue = (Boolean) data.get(SerialSettings.ENCRYPTION_ATTR); - settings.setExtraOptions(encryptionValue != null ? encryptionValue : false); + settings.setExtraOptions(encryptionValue != null && encryptionValue); String encoding = (String) data.get(ITerminalsConnectorConstants.PROP_ENCODING); if (encoding != null) { diff --git a/bundles/com.espressif.idf.terminal.connector.serial/src/com/espressif/idf/terminal/connector/serial/launcher/SerialLauncherDelegate.java b/bundles/com.espressif.idf.terminal.connector.serial/src/com/espressif/idf/terminal/connector/serial/launcher/SerialLauncherDelegate.java index 1d4546acf..a66caf982 100644 --- a/bundles/com.espressif.idf.terminal.connector.serial/src/com/espressif/idf/terminal/connector/serial/launcher/SerialLauncherDelegate.java +++ b/bundles/com.espressif.idf.terminal.connector.serial/src/com/espressif/idf/terminal/connector/serial/launcher/SerialLauncherDelegate.java @@ -63,7 +63,7 @@ public ITerminalConnector createTerminalConnector(Map properties settings.setFilterText((String) properties.get(SerialSettings.MONITOR_FILTER)); settings.setProject((String) properties.get(SerialSettings.SELECTED_PROJECT_ATTR)); Boolean encryptionOption = (Boolean) properties.get(SerialSettings.ENCRYPTION_ATTR); - settings.setExtraOptions(encryptionOption != null ? encryptionOption : false); + settings.setExtraOptions(encryptionOption != null && encryptionOption); // Construct the terminal settings store ISettingsStore store = new SettingsStore(); settings.save(store); From 970e030b5f48cb7d4354225644c8c53b8674948e Mon Sep 17 00:00:00 2001 From: Denys Almazov Date: Tue, 29 Jul 2025 12:43:31 +0300 Subject: [PATCH 6/9] fix: fixing incorrect naming for encryption --- .../serial/connector/SerialConnector.java | 2 +- .../connector/serial/connector/SerialSettings.java | 14 +++++++------- .../serial/controls/SerialConfigPanel.java | 4 ++-- .../serial/controls/SerialSettingsPage.java | 2 +- .../serial/launcher/SerialLauncherDelegate.java | 2 +- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/bundles/com.espressif.idf.terminal.connector.serial/src/com/espressif/idf/terminal/connector/serial/connector/SerialConnector.java b/bundles/com.espressif.idf.terminal.connector.serial/src/com/espressif/idf/terminal/connector/serial/connector/SerialConnector.java index 2f5eac321..afa0ce315 100644 --- a/bundles/com.espressif.idf.terminal.connector.serial/src/com/espressif/idf/terminal/connector/serial/connector/SerialConnector.java +++ b/bundles/com.espressif.idf.terminal.connector.serial/src/com/espressif/idf/terminal/connector/serial/connector/SerialConnector.java @@ -95,7 +95,7 @@ public void connect(ITerminalControl control) String portName = settings.getPortName(); filterOptions = settings.getFilterText(); filterOptions = StringUtil.isEmpty(filterOptions) ? StringUtil.EMPTY : filterOptions; - encryptionOption = settings.getExtraMonitorOptions(); + encryptionOption = settings.getEncryptionOption(); serialPort = new SerialPortHandler(portName, this, project); serialPort.open(); diff --git a/bundles/com.espressif.idf.terminal.connector.serial/src/com/espressif/idf/terminal/connector/serial/connector/SerialSettings.java b/bundles/com.espressif.idf.terminal.connector.serial/src/com/espressif/idf/terminal/connector/serial/connector/SerialSettings.java index 8bb804a4f..c035c21b6 100644 --- a/bundles/com.espressif.idf.terminal.connector.serial/src/com/espressif/idf/terminal/connector/serial/connector/SerialSettings.java +++ b/bundles/com.espressif.idf.terminal.connector.serial/src/com/espressif/idf/terminal/connector/serial/connector/SerialSettings.java @@ -30,7 +30,7 @@ public class SerialSettings private String portName; private String filterText; private String selectedProject; - private boolean extraMonitorOpts; + private boolean encryptionOption; /** * Load information into the RemoteSettings object. @@ -40,7 +40,7 @@ public void load(ISettingsStore store) portName = store.get(PORT_NAME_ATTR, ""); //$NON-NLS-1$ filterText = store.get(MONITOR_FILTER, ""); //$NON-NLS-1$ selectedProject = store.get(SELECTED_PROJECT_ATTR, ""); //$NON-NLS-1$ - extraMonitorOpts = Boolean.parseBoolean(store.get(ENCRYPTION_ATTR, "false")); //$NON-NLS-1$ + encryptionOption = Boolean.parseBoolean(store.get(ENCRYPTION_ATTR, "false")); //$NON-NLS-1$ } /** @@ -51,7 +51,7 @@ public void save(ISettingsStore store) store.put(PORT_NAME_ATTR, portName); store.put(MONITOR_FILTER, filterText); store.put(SELECTED_PROJECT_ATTR, selectedProject); - store.put(ENCRYPTION_ATTR, Boolean.toString(extraMonitorOpts)); + store.put(ENCRYPTION_ATTR, Boolean.toString(encryptionOption)); } public String getPortName() @@ -69,9 +69,9 @@ public String getProjectName() return selectedProject; } - public boolean getExtraMonitorOptions() + public boolean getEncryptionOption() { - return extraMonitorOpts; + return encryptionOption; } public IProject getProject() @@ -102,9 +102,9 @@ public void setProject(String projectName) this.selectedProject = projectName; } - public void setExtraOptions(boolean extraOptions) + public void setEncryptionOption(boolean encryptionOption) { - this.extraMonitorOpts = extraOptions; + this.encryptionOption = encryptionOption; } } diff --git a/bundles/com.espressif.idf.terminal.connector.serial/src/com/espressif/idf/terminal/connector/serial/controls/SerialConfigPanel.java b/bundles/com.espressif.idf.terminal.connector.serial/src/com/espressif/idf/terminal/connector/serial/controls/SerialConfigPanel.java index d73deb56d..6fd72517a 100644 --- a/bundles/com.espressif.idf.terminal.connector.serial/src/com/espressif/idf/terminal/connector/serial/controls/SerialConfigPanel.java +++ b/bundles/com.espressif.idf.terminal.connector.serial/src/com/espressif/idf/terminal/connector/serial/controls/SerialConfigPanel.java @@ -67,7 +67,7 @@ public void extractData(Map data) data.put(SerialSettings.PORT_NAME_ATTR, settings.getPortName()); data.put(SerialSettings.MONITOR_FILTER, settings.getFilterText()); data.put(SerialSettings.SELECTED_PROJECT_ATTR, settings.getProjectName()); - data.put(SerialSettings.ENCRYPTION_ATTR, settings.getExtraMonitorOptions()); + data.put(SerialSettings.ENCRYPTION_ATTR, settings.getEncryptionOption()); if (getEncoding() != null) { @@ -86,7 +86,7 @@ public void setupData(Map data) settings.setPortName((String) data.get(SerialSettings.PORT_NAME_ATTR)); settings.setFilterText((String) data.get(SerialSettings.MONITOR_FILTER)); Boolean encryptionValue = (Boolean) data.get(SerialSettings.ENCRYPTION_ATTR); - settings.setExtraOptions(encryptionValue != null && encryptionValue); + settings.setEncryptionOption(encryptionValue != null && encryptionValue); String encoding = (String) data.get(ITerminalsConnectorConstants.PROP_ENCODING); if (encoding != null) { diff --git a/bundles/com.espressif.idf.terminal.connector.serial/src/com/espressif/idf/terminal/connector/serial/controls/SerialSettingsPage.java b/bundles/com.espressif.idf.terminal.connector.serial/src/com/espressif/idf/terminal/connector/serial/controls/SerialSettingsPage.java index da01c1ec4..c5c7c296e 100644 --- a/bundles/com.espressif.idf.terminal.connector.serial/src/com/espressif/idf/terminal/connector/serial/controls/SerialSettingsPage.java +++ b/bundles/com.espressif.idf.terminal.connector.serial/src/com/espressif/idf/terminal/connector/serial/controls/SerialSettingsPage.java @@ -210,7 +210,7 @@ public void saveSettings() settings.setPortName(portCombo.getText()); settings.setFilterText(filterText.getText().trim()); settings.setProject(projectCombo.getText()); - settings.setExtraOptions(encryptionCheckbox.getSelection()); + settings.setEncryptionOption(encryptionCheckbox.getSelection()); dialogSettings.put(SerialSettings.SELECTED_PROJECT_ATTR, projectCombo.getText()); dialogSettings.put(SerialSettings.PORT_NAME_ATTR, portCombo.getText()); diff --git a/bundles/com.espressif.idf.terminal.connector.serial/src/com/espressif/idf/terminal/connector/serial/launcher/SerialLauncherDelegate.java b/bundles/com.espressif.idf.terminal.connector.serial/src/com/espressif/idf/terminal/connector/serial/launcher/SerialLauncherDelegate.java index a66caf982..28e3277eb 100644 --- a/bundles/com.espressif.idf.terminal.connector.serial/src/com/espressif/idf/terminal/connector/serial/launcher/SerialLauncherDelegate.java +++ b/bundles/com.espressif.idf.terminal.connector.serial/src/com/espressif/idf/terminal/connector/serial/launcher/SerialLauncherDelegate.java @@ -63,7 +63,7 @@ public ITerminalConnector createTerminalConnector(Map properties settings.setFilterText((String) properties.get(SerialSettings.MONITOR_FILTER)); settings.setProject((String) properties.get(SerialSettings.SELECTED_PROJECT_ATTR)); Boolean encryptionOption = (Boolean) properties.get(SerialSettings.ENCRYPTION_ATTR); - settings.setExtraOptions(encryptionOption != null && encryptionOption); + settings.setEncryptionOption(encryptionOption != null && encryptionOption); // Construct the terminal settings store ISettingsStore store = new SettingsStore(); settings.save(store); From 99d4da9c9262dcf07ac0102f5cb38146c73e49c6 Mon Sep 17 00:00:00 2001 From: Denys Almazov Date: Tue, 29 Jul 2025 12:46:12 +0300 Subject: [PATCH 7/9] fix: fixed the ENCRYPTION_ATTR string --- .../idf/terminal/connector/serial/connector/SerialSettings.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bundles/com.espressif.idf.terminal.connector.serial/src/com/espressif/idf/terminal/connector/serial/connector/SerialSettings.java b/bundles/com.espressif.idf.terminal.connector.serial/src/com/espressif/idf/terminal/connector/serial/connector/SerialSettings.java index c035c21b6..444571157 100644 --- a/bundles/com.espressif.idf.terminal.connector.serial/src/com/espressif/idf/terminal/connector/serial/connector/SerialSettings.java +++ b/bundles/com.espressif.idf.terminal.connector.serial/src/com/espressif/idf/terminal/connector/serial/connector/SerialSettings.java @@ -25,7 +25,7 @@ public class SerialSettings public static final String PORT_NAME_ATTR = "cdtserial.portName"; //$NON-NLS-1$ public static final String MONITOR_FILTER = "idf.monitor.filter"; //$NON-NLS-1$ public static final String SELECTED_PROJECT_ATTR = "idf.monitor.project"; //$NON-NLS-1$ - public static final String ENCRYPTION_ATTR = "idf.monitor.extraOptions"; //$NON-NLS-1$ + public static final String ENCRYPTION_ATTR = "idf.monitor.encryption"; //$NON-NLS-1$ private String portName; private String filterText; From fea55a8c9cee5143231f1faa4e362cbc8a9a58e7 Mon Sep 17 00:00:00 2001 From: Denys Almazov Date: Wed, 13 Aug 2025 12:51:57 +0300 Subject: [PATCH 8/9] fix: added tooltip and changed the checkbox lable name --- .../terminal/connector/serial/controls/SerialSettingsPage.java | 1 + .../espressif/idf/terminal/connector/serial/nls/Messages.java | 1 + .../idf/terminal/connector/serial/nls/Messages.properties | 3 ++- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/bundles/com.espressif.idf.terminal.connector.serial/src/com/espressif/idf/terminal/connector/serial/controls/SerialSettingsPage.java b/bundles/com.espressif.idf.terminal.connector.serial/src/com/espressif/idf/terminal/connector/serial/controls/SerialSettingsPage.java index c5c7c296e..878abcf03 100644 --- a/bundles/com.espressif.idf.terminal.connector.serial/src/com/espressif/idf/terminal/connector/serial/controls/SerialSettingsPage.java +++ b/bundles/com.espressif.idf.terminal.connector.serial/src/com/espressif/idf/terminal/connector/serial/controls/SerialSettingsPage.java @@ -158,6 +158,7 @@ public void widgetSelected(SelectionEvent e) encryptionCheckbox = new Button(comp, SWT.CHECK); encryptionCheckbox.setText(Messages.SerialSettingsPage_EncryptionOption); + encryptionCheckbox.setToolTipText(Messages.SerialSettingsPage_EncryptionOptionTooltip); encryptionCheckbox.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); loadSettings(); diff --git a/bundles/com.espressif.idf.terminal.connector.serial/src/com/espressif/idf/terminal/connector/serial/nls/Messages.java b/bundles/com.espressif.idf.terminal.connector.serial/src/com/espressif/idf/terminal/connector/serial/nls/Messages.java index 96ab1430a..8f35b8e62 100644 --- a/bundles/com.espressif.idf.terminal.connector.serial/src/com/espressif/idf/terminal/connector/serial/nls/Messages.java +++ b/bundles/com.espressif.idf.terminal.connector.serial/src/com/espressif/idf/terminal/connector/serial/nls/Messages.java @@ -35,6 +35,7 @@ public class Messages extends NLS // **** Declare externalized string id's down here ***** public static String SerialSettingsPage_EncryptionOption; + public static String SerialSettingsPage_EncryptionOptionTooltip; public static String SerialSettingsPage_FilterOptions; public static String SerialSettingsPage_ProjectName; public static String SerialTerminalSettingsPage_SerialPort; diff --git a/bundles/com.espressif.idf.terminal.connector.serial/src/com/espressif/idf/terminal/connector/serial/nls/Messages.properties b/bundles/com.espressif.idf.terminal.connector.serial/src/com/espressif/idf/terminal/connector/serial/nls/Messages.properties index cc7838ff8..039617cc8 100644 --- a/bundles/com.espressif.idf.terminal.connector.serial/src/com/espressif/idf/terminal/connector/serial/nls/Messages.properties +++ b/bundles/com.espressif.idf.terminal.connector.serial/src/com/espressif/idf/terminal/connector/serial/nls/Messages.properties @@ -11,7 +11,8 @@ # QNX Software Systems - Initial API and implementation ############################################################################### -SerialSettingsPage_EncryptionOption=Enable Encryption +SerialSettingsPage_EncryptionOption=Enable Flash Encryption +SerialSettingsPage_EncryptionOptionTooltip=Enable Flash Encryption. Ctrl+F and Ctrl+A will trigger the encrypted-flash and encrypted-app-flash commands. To use encrypted flash, make sure flash encryption is enabled in sdkconfig. SerialSettingsPage_FilterOptions=Filter Options: SerialSettingsPage_ProjectName=Project name: SerialTerminalSettingsPage_SerialPort=Serial port: From c5b5f3920bedd182590cd4ea6abb8a07a24200e0 Mon Sep 17 00:00:00 2001 From: Denys Almazov Date: Wed, 13 Aug 2025 18:12:15 +0300 Subject: [PATCH 9/9] fix: make tooltip more readable by adding line separator --- .../terminal/connector/serial/controls/SerialSettingsPage.java | 3 ++- .../espressif/idf/terminal/connector/serial/nls/Messages.java | 3 ++- .../idf/terminal/connector/serial/nls/Messages.properties | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/bundles/com.espressif.idf.terminal.connector.serial/src/com/espressif/idf/terminal/connector/serial/controls/SerialSettingsPage.java b/bundles/com.espressif.idf.terminal.connector.serial/src/com/espressif/idf/terminal/connector/serial/controls/SerialSettingsPage.java index 878abcf03..1917980dd 100644 --- a/bundles/com.espressif.idf.terminal.connector.serial/src/com/espressif/idf/terminal/connector/serial/controls/SerialSettingsPage.java +++ b/bundles/com.espressif.idf.terminal.connector.serial/src/com/espressif/idf/terminal/connector/serial/controls/SerialSettingsPage.java @@ -158,7 +158,8 @@ public void widgetSelected(SelectionEvent e) encryptionCheckbox = new Button(comp, SWT.CHECK); encryptionCheckbox.setText(Messages.SerialSettingsPage_EncryptionOption); - encryptionCheckbox.setToolTipText(Messages.SerialSettingsPage_EncryptionOptionTooltip); + encryptionCheckbox.setToolTipText(Messages.SerialSettingsPage_EncryptionOptionTooltip1 + System.lineSeparator() + + Messages.SerialSettingsPage_EncryptionOptionTooltip2); encryptionCheckbox.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); loadSettings(); diff --git a/bundles/com.espressif.idf.terminal.connector.serial/src/com/espressif/idf/terminal/connector/serial/nls/Messages.java b/bundles/com.espressif.idf.terminal.connector.serial/src/com/espressif/idf/terminal/connector/serial/nls/Messages.java index 8f35b8e62..6fe96948b 100644 --- a/bundles/com.espressif.idf.terminal.connector.serial/src/com/espressif/idf/terminal/connector/serial/nls/Messages.java +++ b/bundles/com.espressif.idf.terminal.connector.serial/src/com/espressif/idf/terminal/connector/serial/nls/Messages.java @@ -35,7 +35,8 @@ public class Messages extends NLS // **** Declare externalized string id's down here ***** public static String SerialSettingsPage_EncryptionOption; - public static String SerialSettingsPage_EncryptionOptionTooltip; + public static String SerialSettingsPage_EncryptionOptionTooltip1; + public static String SerialSettingsPage_EncryptionOptionTooltip2; public static String SerialSettingsPage_FilterOptions; public static String SerialSettingsPage_ProjectName; public static String SerialTerminalSettingsPage_SerialPort; diff --git a/bundles/com.espressif.idf.terminal.connector.serial/src/com/espressif/idf/terminal/connector/serial/nls/Messages.properties b/bundles/com.espressif.idf.terminal.connector.serial/src/com/espressif/idf/terminal/connector/serial/nls/Messages.properties index 039617cc8..27162ce11 100644 --- a/bundles/com.espressif.idf.terminal.connector.serial/src/com/espressif/idf/terminal/connector/serial/nls/Messages.properties +++ b/bundles/com.espressif.idf.terminal.connector.serial/src/com/espressif/idf/terminal/connector/serial/nls/Messages.properties @@ -12,7 +12,8 @@ ############################################################################### SerialSettingsPage_EncryptionOption=Enable Flash Encryption -SerialSettingsPage_EncryptionOptionTooltip=Enable Flash Encryption. Ctrl+F and Ctrl+A will trigger the encrypted-flash and encrypted-app-flash commands. To use encrypted flash, make sure flash encryption is enabled in sdkconfig. +SerialSettingsPage_EncryptionOptionTooltip1=Enable Flash Encryption. Ctrl+F and Ctrl+A will trigger the encrypted-flash and encrypted-app-flash commands. +SerialSettingsPage_EncryptionOptionTooltip2=To use encrypted flash, make sure flash encryption is enabled in sdkconfig. SerialSettingsPage_FilterOptions=Filter Options: SerialSettingsPage_ProjectName=Project name: SerialTerminalSettingsPage_SerialPort=Serial port: