redhat-developer / redhat-developer/vscode-java
Alternative equals code generation
オープン
@testforstephen がすでに取り組んでいます。
2019年4月18日 から。
code action
enhancement
- 主要言語
- TypeScript
- スター
- 2.3k
- フォーク
- 546
- 平均マージ
- 20時間 1分
- マージ済み PR(30日)
- 11
説明
Currently, the first part of an equals method is generated as:
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (getClass() != obj.getClass()) {
return false;
}
// ...
However, I'd prefer to have it as:
if (this == obj) {
return true;
} else if (obj == null || getClass() != obj.getClass()) {
return false;
}
// ...
condensing + adding a blank line after it.
If the current generation should be retained, it would be great to have a configuration option to set the preferred style, analog to what is available for toString generation already.
Environment
- Visual Studio Code version: 1.33.1
- Java extension version: 0.43.0
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
評価
この issue はまだ評価されていません。