redhat-developer / redhat-developer/vscode-java

Alternative equals code generation

オープン
#890 コメント 0 件 リアクション 0 件 担当者 1 名 GitHub で見る

@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

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。