Skip to content

Java Formatter settings are not used #3020

@Artur-

Description

@Artur-

If I open the flow-server project from https://github.com/vaadin/flow/tree/main/flow-server

and have Eclipse formatter settings set to use https://raw.githubusercontent.com/vaadin/flow/main/eclipse/VaadinJavaConventions.xml which defines <setting id="org.eclipse.jdt.core.formatter.tabulation.size" value="4"/>
image

then when I open e.g. the HandlerHelperTest.java file, VS Code shows "Spaces: 8" in the bottom bar and formatting the file changes it to use indentation of 8 spaces instead of 4

The settings file should be fine because when I go back to command line and run mvn formatter:format in the project, the indentation is changed back to 4 spaces.

Environment
  • Operating System: macOs Ventura
  • JDK version: 17
  • Visual Studio Code version: 1.76.2
  • Java extension version: 1.16.0
Steps To Reproduce
  1. See above
Current Result

File is not formatted according to given settings

Expected Result

File is formatted according to given settings

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions