Community
Participate
Working Groups
Build Identifier: 2.1.0.v201101042155 Please look at SshSettings.java:37. Instead of appending the port to the settings summary string, the port value is being added to the ':' char's value, and that value is added to the string. The result is that the Terminal window's title is incorrect, when connecting to an SSH port other than 22. Therefore, Instead of... SSH: (username@172.28.40.220:28873 ...I get... SSH: (username@172.28.40.22028931 The connection, however, is correct. It's just the aesthetic System Summary, used in the view's title, that is incorrect. I believe the solution is to use double-quotes in the building of the string, instead of the ':' char directly, in the method SshSettings.getSummary(). public String getSummary() { String settings = getUser()+'@'+getHost(); if(getPort()!=22) { settings += ":" + getPort(); } return settings; } Cheers, Dan. Reproducible: Always Steps to Reproduce: Simply connect a TM Terminal view to an SSH port that is anything other than the default port 22.
Created attachment 198507 [details] Patch calls getPortString() instead of getPort() could fix the problem.
Fixed with TM Terminal 4.0
Looking at the description of the issue in comment 0, and at line 39 here: http://git.eclipse.org/c/tm/org.eclipse.tm.terminal.git/tree/plugins/org.eclipse.tm.terminal.connector.ssh/src/org/eclipse/tm/terminal/connector/ssh/connector/SshSettings.java I think that the issue is _not_ fixed yet. It might be an implementation detail of the JVM being used how the expression is actually evaluated.
Well, for the sake of consistency I've changed that single line. See the latest version of SshSettings.java. Nonetheless, the issue WAS FIXED without that change. The connector getSettingSummary() method is NOT USED to make the terminal title anymore. Therefore, the terminal title is correct even without that change. The settings summary string is internal only now. In fact, the getSettingsSummary()/getSummary() API is obsolete and it would be much better if the settings would implement proper equals() methods, because the getSettingsSummary()/getSummary() API is used only to compare two sets of settings.