redhat-developer / redhat-developer/vscode-java
"Add throws declaration" formats entire file
まだ誰も着手していません。
- 主要言語
- TypeScript
- スター
- 2.3k
- フォーク
- 546
- 平均マージ
- 20時間 1分
- マージ済み PR(30日)
- 11
説明
When you use the "Add throws declaration" it formats the entire file instead of just adding the throws clause to the current function.
Environment
- Operating System: Windows 10
- JDK version: openjdk 11.0.4 2019-07-16
- Visual Studio Code version: 1.38.1
- Java extension version: 0.50.0
Steps To Reproduce
-
Create a java file start writing some code and have it not match the default formatter. (like indenting case under a switch)
-
write a function that calls a function that throws a checked exception (like CompletableFuture.get)
-
Use the suggestion to add throws declarations to the current function.
Current Result
Throws declarations are added but the entire file gets formatted
Expected Result
only the throws declarations should be added to the current function and the rest of the file is untouched.
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、デフォルトではないフォーマット設定の Java ファイル内で、CompletableFuture.get のような呼び出しを使って Add throws declaration の提案を再現します。提案とフォーマッターのパスを追跡して、なぜフォーマットが実行されるのかを特定します。完了条件は、現在の関数だけに throws declaration が追加され、ファイルの残りの部分が変更されないことです。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- java, typescript
- 領域
- developer-experience, tooling
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 42/100