redhat-developer / redhat-developer/vscode-java

Unable to suggest field name in the presence of annotation and compilation errors

Đang mở
#1,361 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

content-assist
Ngôn ngữ chính
TypeScript
Star
2.3k
Fork
547
Merge trung bình
20 giờ 1 phút
Pull request đã merge (30 ngày)
11

Mô tả

Environment
  • Operating System: Linux x64 5.4.28-1-MANJARO
  • JDK version: OpenJDK 11.0.6
  • Visual Studio Code version: 1.43.2
  • Java extension version: 0.59.0

Hello!

This issue was first reported in the wrong repo (https://github.com/MicrosoftDocs/intellicode/issues/182), but disabling IntelliCode didn't affect the issue, so it was suggested the issue could be in vscode-java. Here it is:

Steps to Reproduce / Scenario:

  1. Create a class with a method and with an annotation on it. Do some syntax typo on that method.
  2. Add a new field on the class and wait for the field name suggestion.
  3. IntelliCode will not be able to suggest the field name.

If you comment out the annotation, it will suggest the field name just fine.

  1. Create a class with a method without any annotation on it. Do some syntax typo on that method.
  2. Add a new field on the class and wait for the field name suggestion.
  3. IntelliCode will suggest the field name just fine.

Here is a gif showing the issue:

autocomplete

This issue particularly bothers when developing with Spring Boot, which uses a lot of annotation. If I try to add a new field on an existent class that has methods with annotation, I'll not get proper name suggestion because while I'm typing private MyField and wait for the name suggestion, my code will already be invalid (with compilation errors), and because of that I'll not get the myField name suggestion.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Hướng nghiên cứu

Bắt đầu bằng cách tái hiện vấn đề trong VS Code với Java extension: thêm lỗi cú pháp vào một phương thức có chú thích, sau đó thêm một trường và so sánh gợi ý tên khi đã xóa chú thích. Vấn đề được giải quyết khi các gợi ý tên trường vẫn xuất hiện trong trường hợp có chú thích, bất chấp các lỗi chú thích và biên dịch.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
java, typescript, vscode
Lĩnh vực
devtools, tooling
Loại issue
Lỗi
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
35/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.