private static @NotNull Collection<@NlsContexts.ConfigurableName String> getPathNames(@Nullable MyNode node) {
    if (node == null) {
      return Collections.emptyList();
    }

    ArrayDeque<String> path = new ArrayDeque<>();
    while (node != null) {
      path.push(node.myDisplayName);
      SimpleNode parent = node.getParent();
      node = parent instanceof MyNode ? (MyNode)parent : null;
    }
    return path;
  }
private static @NotNull Collection<@NlsContexts.ConfigurableName String> getPathNames(@Nullable MyNode node)