pedro-w opened a new issue, #4667:
URL: https://github.com/apache/netbeans/issues/4667
### Apache NetBeans version
Apache NetBeans 15
### What happened
The Navigate | Inspect | Hierarchy menu (aka shift-alt-F12) does not always
work. It seems to fail when the class under the cursor is in a `try()` block -
it shows the hierarchy of the enclosing class instead.
### How to reproduce
Make a Java ant project with the following source
```
package javaapplication150;
import java.io.BufferedWriter;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
public class JavaApplication150 {
public static void main(String[] args) throws IOException {
try ( BufferedWriter writer = Files.newBufferedWriter(Path.of("a")))
{
writer.flush();
}
}
}
```
Move cursor to the `BufferedWriter` text on line 11. Press shift-alt-F12.
Hierarchy window will show the results for `JavaApplication150`
### Did this work correctly in an earlier version?
No / Don't know
### Operating System
Windows 11
### JDK
11.0.9.1; OpenJDK 64-Bit Server VM 11.0.9.1+1
### Apache NetBeans packaging
Apache NetBeans provided installer
### Anything else
Occurs every time the project is opened fresh. If the target class source is
open in another tab it works (sometimes, I can't see a pattern to this)
### Are you willing to submit a pull request?
No
### Code of Conduct
Yes
--
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