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

trailing comma at last element of multi-line declarations like enums or arrays

Open
#1,981 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Java
Stars
59
Forks
127
Avg merge
21h 41m
Merged PRs (30d)
31

Description

It would be nice to have a code formatter option to add a [trailing comma](https://dev.to/pfilaretov42/tiny-trailing-commas-in-java-251h) to the last element of multi-line declarations like enums or arrays.

The PDT already have such an option: [521884](https://bugs.eclipse.org/bugs/show_bug.cgi?id=521884). Unfortunately, the git links in Bugzilla does not work anymore.

Contributor guide

Open the contributing guide

Research direction

Start in the Java code formatter area and trace how formatting options are defined and applied to multi-line declarations such as enums and arrays. Compare the requested behavior with PDT option 521884, then verify that the formatter can add a trailing comma only where the new option is enabled.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.