eclipse-jdt / eclipse-jdt/eclipse.jdt.ui
"Use lambda where possible" clean up doesn't indent properly sometimes
- Dominant language
- Java
- Stars
- 59
- Forks
- 127
- Avg merge
- 23h 30m
- Merged PRs (30d)
- 35
Description
To reproduce:
1. Enable the "Use lambda where possible" save action (Preferences > Java > Editor > Save Actions > Additional actions > Configure > Java Feature > Java 8, then check "Convert functional interface instances")
2. Open `ErrorParticipantLanguageServiceTest.java` from `eclipse/lemminx` at `13fce878` https://github.com/eclipse/lemminx/blob/de9c702be26f5380be84b3a38d6d16f6913011df/org.eclipse.lemminx/src/test/java/org/eclipse/lemminx/services/extensions/ErrorParticipantLanguageServiceTest.java (I couldn't figure out a more minimal example, sorry)
3. Save the file to trigger the clean up
4. The indentation of the 2nd, 3rd, 4th... lines of the generated lambdas is incorrect
Contributor guide
Research direction
Open ErrorParticipantLanguageServiceTest.java at the referenced commit and reproduce the issue with the Eclipse save-action settings described. Start by tracing the "Use lambda where possible" cleanup and its formatting behavior; done means the second and later lines of generated lambdas have correct indentation after saving.
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