On Wed, 20 Dec 2023 09:28:47 GMT, Artem Semenov <[email protected]> wrote:
> NSAccessibility Outline is an accessibility representation of trees.
> This representation requires that the visible children be represented as a
> flat array.
> The child linearization algorithm available in
> ```CAccessibility.getChildrenAndRolesRecursive()``` is universal, i.e.
> suitable for any object with the role of a tree, but is not efficient, since
> it traverses the entire tree and selects suitable children.
> For JTree, this algorithm can be optimized by using TreePath, but the old
> algorithm will have to be retained to maintain versatility.
src/java.desktop/macosx/classes/sun/lwawt/macosx/CAccessibility.java line 799:
> 797: for (int i = 0; i < count; i++) {
> 798: TreePath path = tree.getPathForRow(i);
> 799: Accessible an =
> createAccessibleTreeNode(tree, path);
I see that you are creating the accessible tree node with reflection calling
its constructor. Can you just elaborate if it is the only way to get hold of it
and why getting a tree.getAccessible().getAccessibleChild(i) does not work or
what kind of problem getting the tree node this way creates?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/17165#discussion_r1434518050