matthiasblaesing commented on PR #8834: URL: https://github.com/apache/netbeans/pull/8834#issuecomment-3703956051
@jherkel I stared at `TreeUtils#pathFor` and this method lacks documentation about the special cases it tries to cover. I agree that that the range checks are at least partially of from what I would expect, but then there is more black magic there. There would be huge risk in changing `pathFor`, so I looked at the core of the method and it is surprisingly simple. I came up with this: https://github.com/matthiasblaesing/netbeans/tree/pr-8834-2 The idea here is to implement a simple TreePathScanner inline and use that to find the right TreePath. I added some more tests and them come out correctly. Would you please have a look? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
