redhat-developer / redhat-developer/vscode-java

Alternative equals code generation

Aperta
#890 0 commenti 0 reazioni 1 assegnatario Vedi su GitHub

@testforstephen ci sta già lavorando.

Dal 18/4/2019.

code action enhancement
Lingua principale
TypeScript
Stelle
2.3k
Fork
546
Merge medio
20h 1m
PR unite (30g)
11

Descrizione

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

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.