private void update(@NotNull AbstractTreeNode<?> node, boolean structure) {
    model.onValidThread(() -> {
      boolean updated = node.update();
      boolean changed = structure || !(node instanceof Node);
      if (!updated && !changed) return;
      TreePath path = TreePathUtil.pathToCustomNode(node, AbstractTreeNode::getParent);
      if (path == null || root != path.getPathComponent(0)) return;
      if (changed) {
        LOG.debug("structure changed: ", node);
        treeStructureChanged(path, null, null);
      }
      else {
        LOG.debug("node updated: ", node);
        treeNodesChanged(path, null, null);
      }
    });
  }
private void update(@NotNull AbstractTreeNode<?> node, boolean structure)