if (conn != null) {
// force instantiating the real connector
conn.makeSettingsPage();
sshc = (SshConnector) conn.getAdapter(SshConnector.class);
if (sshc != null) {
SshSettings settings = (SshSettings)sshc.getSshSettings();
settings.setHost(host);
if (user != null) {
settings.setUser(user);
}
if (pass != null) {
settings.setPassword(pass);
}
settings.setPort("" + port);
settings.setKeepalive("300");
settings.setTimeout("45");
try {
Method mGetStore = Objects.getMethodDescriptor(connectorView, "getPreferenceSettingsStore", TerminalView.class, null);
PreferenceSettingStore store = (PreferenceSettingStore)mGetStore.invoke(connectorView, null);
// When the settings dialog is closed, we persist the Terminal settings.