@Override
    void applyNodeToUiTree(Node loaded) {
      Node root = tree.root;
      if (root == null && loaded == null) {
        if (LOG.isTraceEnabled()) LOG.debug("no root");
        tree.queue.done(this, null);
        return;
      }

      if (root != null && loaded != null && root.object.equals(loaded.object)) {
        tree.fixEqualButNotSame(root, loaded.object);
        if (LOG.isTraceEnabled()) LOG.debug("same root: ", root.object);
        if (!root.isLoadingRequired()) submit(new CmdGetChildren("Update root children", root, true));
        tree.queue.done(this, root);
        return;
      }

      if (root != null) {
        root.removeMapping(null, tree);
      }
      if (!tree.map.isEmpty()) {
        tree.map.values().forEach(node -> {
          node.queue.close();
          LOG.warn("remove staled node: " + node.object);
        });
        tree.map.clear();
      }

      tree.root = loaded;
      if (loaded != null) {
        tree.map.put(loaded.object, loaded);
        TreePath path = new CachingTreePath(loaded.object);
        loaded.insertPath(path);
        if (tree.cachedPresentation != null) {
          tree.cachedPresentation.rootLoaded(loaded.object);
        }
        treeStructureChanged(path, null, null);
        if (LOG.isTraceEnabled()) LOG.debug("new root: ", loaded.object);
        tree.queue.done(this, loaded);
      }
      else {
        treeStructureChanged(null, null, null);
        if (LOG.isTraceEnabled()) LOG.debug("root removed");
        tree.queue.done(this, null);
      }
    }
@Override
    void applyNodeToUiTree(Node loaded)