redhat-developer / redhat-developer/vscode-java
Formatter File not respected when applying snippets
オープン
まだ誰も着手していません。
formatter
preferences
- 主要言語
- TypeScript
- スター
- 2.3k
- フォーク
- 546
- 平均マージ
- 20時間 1分
- マージ済み PR(30日)
- 11
説明
I have a format xml specified in Java > Format > Settings: Url. When I run the command "Open Java Formatter Settings" my file is opened. No settings in the file are respected, however. Consider just this setting:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<profiles version="12">
<profile kind="CodeFormatterProfile" name="BradsProfile" version="12">
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_block" value="next_line"/>
</profile>
</profiles>
In the editor after typing 'if' followed by 2 tabs, I end up with this:
if (condition:var(boolean)) {
}
I don't see any errors in "Language Support for Java."
Environment
- Operating System: Windows 10
- JDK version: 11.0.14.101
- Visual Studio Code version: 1.71.0
- Java extension version: 1.10.0
Steps To Reproduce
- Configure formatter file with contents as above
- Type if statement as above
Can be as simple as a single .java file
Current Result
if (condition:var(boolean)) {
}
Expected Result
if (condition:var(boolean))
{
}
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、提供された formatter XML と、示されている Java 拡張機能の設定を使って、単一の .java ファイルで問題を再現します。if-statement スニペットが展開されたときに、formatter ファイルがどのように読み込まれ、適用されるかを追跡します。設定された next_line のブレース位置が尊重され、提供された再現手順で現在のレイアウトが生成されなくなれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- java, vscode
- 領域
- developer-experience, tooling
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100