redhat-developer / redhat-developer/vscode-java

Imports are not included in the document symbols returned from "getDocumentSymbols" API

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

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

API help wanted
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ả

Hi

I am writing a vscode extension and I want to get the symbols of a JAVA file.

Environment
Operating System: windows 10
Visual Studio Code version: 1.50.0

Steps To Reproduce
If I run this sample code :

`const vscodeCDSExtension = extensions.getExtension("redhat.java");
const javaDocParams : DocumentSymbolParams = {
textDocument: {
uri: Uri.file(filePath).toString()
}
};

if (vscodeCDSExtension && vscodeCDSExtension.isActive) {
const symbols = await vscodeCDSExtension.exports.getDocumentSymbols(javaDocParams);
console.log(symbols.length);
}`

Current Result
The "imports" of the file are not included in the returned symbols (only "package", classes and methods are returned)

Expected Result
The "imports" also should be included in the result

The JAVA file is attached

CatalogServiceHandler.zip

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 lệnh gọi API getDocumentSymbols từ issue bằng tệp Java CatalogServiceHandler.zip được đính kèm. Theo dõi cách các package, class và method được trả về, sau đó xác minh rằng các khai báo import được bao gồm trong kết quả symbols và thêm hoặc cập nhật coverage nếu repository cung cấp một test tương ứng.

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
api, developer-experience, tooling
Loại issue
Lỗi
Độ khó
3/5
Thời gian dự kiến
1-2 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
38/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.