FabricPlugin.getLogger().error("Unable to open the terminal view!");
return;
}
// get the view
final SshView connectorView = (SshView)vp;
connectorView.setPartName(id);
// add a connection listener
connectorView.addConnectionListener(new ITerminalConnectionListener() {
@Override
public void onDisconnect() {
}
@Override
public void onConnect() {
connectorView.setFocus();
}
});
// create the connection
try {
FabricPlugin.getLogger().debug("Creating the connection if it doesn't exist for host: " + host + " port " + port + " user " + user);
// TODO set the title? open a new view if there's not one already etc?
connectorView.createConnectionIfNotExists(host,
port,
user,
password);
} catch (Exception ex) {
FabricPlugin.getLogger().error("Unable to connect via SSH", ex);