private void _applyPresentationChanges(List<AnAction> actions) {
    final long startNs = System.nanoTime();

    if (actions == null) {
      return;
    }

    final AnAction autoCloseReason = _checkAutoClose(actions);
    if (autoCloseReason != null) {
      LOG.debug("touchbar '%s' was auto-closed because of: %s | %s", myName, autoCloseReason.getTemplateText(), autoCloseReason);
      _closeSelf();
    }

    _rebuildButtons(actions);

    if (myStats != null) {
      myStats.incrementCounter(StatsCounters.applyPresentationChangesDurationNs, System.nanoTime() - startNs);
    }
  }
private void _applyPresentationChanges(List<AnAction> actions)