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

Sort Members doesn't sort methods of record classes

Open
#1,113 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
59
Forks
127
Avg merge
1d 8h
Merged PRs (30d)
37

Description

Create a record class for e.g. like this:
```
public record MyRecord() {
public void methodB() {
}
public void methodA() {
}
public void methodC() {
}
}
```
Then select `Source` > `Sort Members...` > `Sort all members` > `OK` in the menu.

Result:

Nothing happens. The Methods are not sorted as configured in the "Member Sort Order" preference page.

Expected result:

Methods are sorted as configured in the "Member Sort Order" preference page.

Contributor guide

Open the contributing guide

Research direction

Reproduce the issue with the record-class example and the Source > Sort Members > Sort all members flow. Trace the Sort Members handling for record classes and compare it with the Member Sort Order preferences. Done means the methods are reordered according to the configured preference.

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
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.