Skip to content

Comment formatting not consistent with Eclipse with same xml profile #1399

@ronakg

Description

@ronakg

I'm using an Eclipse format XML profile to indent/format my java code in VS Code. For comments, the same profile is generating different results.

Environment
  • Operating System: macOS Catalina 10.15.4
  • JDK version: OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_252-b09)
  • Visual Studio Code version: 1.44.2
  • Java extension version: 0.60.0 (April 16, 2020)
Steps To Reproduce

Settings for Java format:

Screen Shot 2020-04-17 at 8 37 21 PM

Eclipse formatting profile from the settings above (unzip to get the XML profile):

eclipse-java-formatter.xml.zip

  1. Paste the following code snippet in a Java file.
/**
 * Javadoc headline describing the method
 * 
 * Detailed description:
 * - point 1
 * - point 2
 * - point 3
 *
 * @param param1
 * @param param2
 * 
 * @return something
 */
  1. Select the code snippet and run Format Selection from the command palette.
Current Result

Screen Shot 2020-04-17 at 8 29 25 PM

Expected Result

Screen Shot 2020-04-17 at 8 41 10 PM

Eclipse output with the same profile:

Screen Shot 2020-04-17 at 8 30 19 PM

Additional Informations

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions