Skip to content

Formatter: "Remove blank lines in Javadoc" is being ignored. #2122

Closed as not planned
@rhystedstone

Description

@rhystedstone

The option "Remove blank lines in Javadoc" (org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment) is being ignored. The output remains the same regardless of this setting.

Environment
  • Operating System: Windows NT 10.0
  • JDK version: 16.0.27 Hotspot
  • Visual Studio Code version: 1.60.1 (user setup)
  • Java extension version: v0.82.0
Steps To Reproduce
  1. Use a custom formatter for Java
  2. Change the option org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment to true, either in the formatter preview, or directly via the xml.
  3. Blank lines in javadocs aren't cleared.

Project:
A snippet of my project's javadoc which displays 5 blank lines
Formatter Preview:
A screenshot of the formatter preview which displays a tick next to "Remove blank lines in javadoc", yet the preview next to it displays 3 blank lines in the javadoc

log.log
The jdt_ws log is attached - The java.trace logs returned nothing.

Current Result

Currently the lines aren't removed from the javadoc.

/**
 * Some description of the method
 * 
 * 
 * 
 * 
 * @param arg1 A parameter
 * @param arg2 Another parameter
 */
Expected Result

The lines should be removed from the javadoc:

/**
 * Some description of the method
 * @param arg1 A parameter
 * @param arg2 Another parameter
 */

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions