@Override
  public void onMachineRunning(MachineStateEvent event) {
    workspaceAgent.setActivePart(this);

    machineService
        .getMachine(event.getMachineId())
        .then(
            new Operation<MachineDto>() {
              @Override
              public void apply(MachineDto machine) throws OperationException {
                addMachineToConsoles(machine);
              }
            });
  }
  @Override
  public void onMachineDestroyed(MachineStateEvent event) {
    String destroyedMachineId = event.getMachineId();

    ProcessTreeNode destroyedMachineNode = machineNodes.get(destroyedMachineId);
    if (destroyedMachineNode == null) {
      return;
    }

    rootChildren.remove(destroyedMachineNode);
    onCloseTerminal(destroyedMachineNode);
    onStopCommandProcess(destroyedMachineNode);

    view.setProcessesData(rootNode);
  }