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

Java formatter Comments/Javadocs is adding blank line with extra white space

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

Description

When formatting javadoc with "Blank lines between tags of a different type", "Align descriptions, grouped by type", and "Indent wrapped @param/@throws descriptions" and you have a description that wraps, the blank lines added have trailing white space (tabs) when they should not.

Options:
![Screen Shot 2023-05-21 at 13 17 06](https://github.com/eclipse-jdt/eclipse.jdt/assets/128174603/cb28acaf-4e91-4fc4-83d7-98616ddb71b9)

How it should look:
![Screen Shot 2023-05-21 at 13 18 20](https://github.com/eclipse-jdt/eclipse.jdt/assets/128174603/4faabfac-5976-40eb-a86a-b48e7ae5c80c)

With wrapping:
![Screen Shot 2023-05-21 at 13 18 36](https://github.com/eclipse-jdt/eclipse.jdt/assets/128174603/62a5e888-04f1-4de2-a335-5dcce0562ef2)

With wrapped text removed:
![Screen Shot 2023-05-21 at 13 19 05](https://github.com/eclipse-jdt/eclipse.jdt/assets/128174603/4a9456ea-ea8a-4374-9f56-09447f56f7d1)

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the Java formatter configuration described in the issue: enable blank lines between tag types, grouped alignment, and wrapped @param/@throws descriptions. Trace the Javadoc formatting entry point and compare output with the screenshots. Done means inserted blank lines contain no trailing tabs or other whitespace, including when wrapped text is present or removed.

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
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.