Unable to unfold code block in java editor
- Dominant language
- Java
- Stars
- 3.1k
- Forks
- 935
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 17
Description
### Apache NetBeans version
Apache NetBeans 19
### What happened
When folding the if part of an if/else statement the if part becomes impossible to unfold. This only happens if the else is on the same line as the closing curly brace.


### How to reproduce
Just open a file with a if/else statement where the else is on the same line as the closing curly brace of the if.
### Did this work correctly in an earlier version?
No / Don't know
### Operating System
Fedora 38
### JDK
OpenJDK 64-Bit Server VM 11.0.20+8
### Apache NetBeans packaging
Apache NetBeans binary zip
### Anything else
_No response_
### Are you willing to submit a pull request?
Yes
Contributor guide
Research direction
Reproduce the issue in Apache NetBeans 19 using a Java if/else statement with else on the same line as the closing brace, then inspect the Java editor's code-folding behavior. Done means the folded if block can be unfolded reliably in that formatting case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100