private static ProcessCloseConfirmation getConfirmation(int button, boolean withDisconnect) {
    if (button == 0) return ProcessCloseConfirmation.TERMINATE;
    if (button == 1 && withDisconnect) return ProcessCloseConfirmation.DISCONNECT;
    return null;
  }
private static ProcessCloseConfirmation getConfirmation(int button, boolean withDisconnect)