redhat-developer / redhat-developer/vscode-java
Java Formatter settings are not used
まだ誰も着手していません。
- 主要言語
- TypeScript
- スター
- 2.3k
- フォーク
- 546
- 平均マージ
- 20時間 1分
- マージ済み PR(30日)
- 11
説明
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"/>

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
- See above
Current Result
File is not formatted according to given settings
Expected Result
File is formatted according to given settings
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
VS Code で VaadinJavaConventions.xml を設定した状態で flow-server を開いて問題を再現し、HandlerHelperTest.java のフォーマットを mvn formatter:format の結果と比較します。Java 拡張機能がフォーマッターの設定をどのように読み込み、適用するかを追跡します。VS Code が Maven formatter と一貫して設定済みの 4 スペースインデントを使用すれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- java, vscode
- 領域
- developer-experience, tooling
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 42/100