eclipse-jdt / eclipse-jdt/eclipse.jdt.ui

Extended folding does not fold records

Open
#2,570 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
59
Forks
127
Avg merge
23h 30m
Merged PRs (30d)
35

Description

The extended folding feature does not add folding regions for records.

Extracted from #2439

### Steps to reproduce
Create the following class:
```java
package test;

public class RecordTest {
record A() {

}

record B(
int a,
String b) {

public B(int a, String b) {
this.a = a;
this.b = b;
}

}
}
```

### Expected result
If Window > Preferences > Java > Editor > Folding > Extended Folding is disabled, there are folding regions for both records:

Image

This should also be the case if this preference is enabled

### Actual result

If Window > Preferences > Java > Editor > Folding > Extended Folding is enabled, these folding regions are missing:

Image

Contributor guide

Open the contributing guide

Research direction

Reproduce the issue with the provided RecordTest class and compare Java Editor folding with Extended Folding disabled and enabled. Start by tracing the Java editor folding behavior controlled by Window > Preferences > Java > Editor > Folding > Extended Folding. Done means both record declarations have folding regions when Extended Folding is enabled, as they do when it is disabled.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.