Ejemplo n.º 1
0
 public void onDisconnect() {
   // open the terminal view
   IViewPart vp = KarafUIPlugin.openTerminalView();
   if (vp == null) {
     KarafUIPlugin.getLogger().error("Unable to open the terminal view!");
     return;
   }
   // remove from the active connectors
   connectors.remove(server);
 }
Ejemplo n.º 2
0
  /** starts the ssh connection */
  public void start() {
    // open the terminal view
    IViewPart vp = KarafUIPlugin.openTerminalView();
    if (vp == null) {
      KarafUIPlugin.getLogger().error("Unable to open the terminal view!");
      return;
    }

    Map<String, Object> properties = new HashMap<String, Object>();
    extractData(properties);
    if (properties != null) {
      properties.put(
          ITerminalsConnectorConstants.PROP_DELEGATE_ID,
          "org.eclipse.tm.terminal.connector.ssh.launcher.ssh");
      SshLauncherDelegate delegate = new SshLauncherDelegate();
      delegate.execute(properties, null);
    }
  }
Ejemplo n.º 3
0
 public void onConnect() {
   // store the active connector
   connectors.put(server, this);
   // and open the terminal view
   KarafUIPlugin.openTerminalView().setFocus();
 }