redhat-developer / redhat-developer/vscode-java
Alternative equals code generation
Đang mở
@testforstephen đang làm issue này rồi.
Từ ngày 18/4/2019.
code action
enhancement
- Ngôn ngữ chính
- TypeScript
- Star
- 2.3k
- Fork
- 546
- Merge trung bình
- 20 giờ 1 phút
- Pull request đã merge (30 ngày)
- 11
Mô tả
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
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Đánh giá
Issue này chưa được đánh giá.