redhat-developer / redhat-developer/vscode-java

Reference other unmanaged folders as dependencies

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

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

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ả

[provide a description of the issue]

Environment
  • Operating System: ANY
  • JDK version: 11
  • Visual Studio Code version: 1.74.2
  • Java extension version: Any
Steps To Reproduce
  1. Create a javaproject 0, a package and a class
  2. Create other project 1 a package and a class where you use class of project 0.

Suppose I have 4 independent Java projects: project0, project1, project2, and project3.

Inside each project, I have the src folder, and inside some packages and classes. Project 1, 2, and 3 use classes from project0.

In Eclipse, I can indicate in a section that the sources of project 0 are used. When I try something similar in VScode, I go to configure the classpath of project one and see that it includes its src folder. When I add the src folder of project0, I get the following error: "The source path must be contained in the project root folder."

I can solve this by creating the .jar of project 0 and adding it to the other projects, but this is very inconvenient when making quick tests.

I know there are tools like Maven or Ant to do these things, but I would like to know if there is any way to indicate in vscode that one project uses classes from another without having to include the .jar as a dependency.

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

Không có tệp nguồn, bài kiểm thử hoặc điểm vào nào được nêu. Hãy bắt đầu bằng cách tái hiện thiết lập gồm bốn project và theo dõi cấu hình classpath của tiện ích mở rộng Java, đặc biệt là việc xác thực đường dẫn nguồn. Công việc được xem là hoàn tất khi project1, project2 và project3 có thể tham chiếu đến các nguồn không được quản lý của project0 mà không cần xây dựng JAR hoặc kích hoạt lỗi thư mục gốc của project.

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, vscode
Lĩnh vực
developer-experience
Loại issue
Tính năng
Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Cần làm rõ
Mức phù hợp với người mới
25/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.