This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Summary: | PathFinder in TreeUtilities doesn't work | ||
---|---|---|---|
Product: | javafx | Reporter: | Alexey Butenko <alexeybutenko> |
Component: | Editor | Assignee: | David Strupl <dstrupl> |
Status: | VERIFIED FIXED | ||
Severity: | blocker | ||
Priority: | P1 | ||
Version: | 6.x | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: | |
Bug Depends on: | 132199 | ||
Bug Blocks: | |||
Attachments: | Test |
Description
Alexey Butenko
2008-04-09 15:03:34 UTC
Marking as invalid. Please show me the code from where you call it and where it fails - after you supply this (preferable as a reproducible test case) please reopen the issue. Please note that I have not finished this as this is currently not called from anywhere (in the sources that I have) besides the code that I work on (code completion). I don't say I will not finish it just that I need to have a proper test case to work with. As to what it not implemented - I have not copied the code for "findNameSpan" as I was not sure what it does and whether we need it here. Maybe it would be just ok to call sourcePositions.getStartPosition(getCurrentPath().getCompilationUnit(), node) and similarly getEndPosition. The other alternative is to copy the findNameSpan methods from java but that would require some more checking whether that works ok in JFX case. Created attachment 59963 [details]
Test
I've attached example of source code which can reproduce the problem. Without this code I'm not able to submit breakpoints during debug session, because class name is always null and other info is not correct Ok, looking at it .. Unfortunatelly I cannot move forward with this one without #132199 being solved first. The positions in the tree we are getting from javafxc are not correct ... Also I've noticed that in TreeUtilities all calls of path.getLeaf().getKind() it is Java kinds trees, then Kind.OTHER will be returned for all instances of JavaFXTree, so getJavaFXKind should be used to get JavaFX kind. Thanks for the catch - I will try to fix that but with the wrong positions we will not get much further ;-( Hello, I have just pushed 12047:57e8679aa451 it includes updated test + some change in the pathfinder. Can you give it a try please? I am closing this issue and if something more is needed please reopen or create a new one. Br, David PS: I did not touch the kind as the code is used to fine tune the position on braces etc. Maybe we could improve that also but please test first whether this will be ok for you ... It seems like the method is working ok |