redhat-developer / redhat-developer/vscode-java
java.import.maven.enabled setting not honored
Chưa có ai nhận issue này.
- 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 "java.import.maven.enabled":false setting requires that the .project, .classpath files and the .settings directory be removed and the Java workspace cleaned before taking effect (see https://github.com/redhat-developer/vscode-java/issues/634#issuecomment-529466893). This is clunky and poorly-documented.
Ideally, setting the "java.import.maven.enabled":false should immediately take effect. Less ideally, there should be clear documentation around the use of this setting to instruct users to clear out the files and clean the workspace.
Truthfully, my use case is to disable the Java language features for one of the folders in my multi-root workspace. This is currently made possible by disabling the import, but one could imagine a world in which this is a different setting, which would take effect immediately.
Environment
- Operating System: Windows 10 1809
- JDK version: 1.8.0_221
- Visual Studio Code version: 1.38.0
- Java extension version: 0.48.0
Steps To Reproduce
- Open a fresh workspace in VS Code
- Open a folder containing a Java project - we'll call this Project1
- The Java extension will immediately import and start compiling the code
- Add another folder containing another Java project to the workspace - we'll call this Project2
- The Java extension will immediately import and start compiling the code
- Restart VS Code
- The Java extension will immediately start compiling the code for both projects
- Edit Project2's VS Code settings ([project2]/.vscode/settings.json) to contain the following:
{ "java.import.gradle.enabled":false, "java.import.maven.enabled":false } - Restart VS Code
- The Java extensions will immediately start compiling the code for both projects
Current Result
Immediately after setting the "java.import.maven.enabled":false property, the Java language features are still alive and active in the project.
Even after a restart of VS Code, the Java language features are still alive and active.
Expected Result
Immediately after setting the "java.import.maven.enabled":false property, the Java language features for the project should stop working.
After a restart of VS Code, the Java language features for the project should not load.
Additional Informations
This issue was based on a conversation with @snjeza in the VS Code Java Extension gitter channel.
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.
Hướng nghiên cứu
Bắt đầu bằng cách tái hiện hành vi của workspace multi-root bằng Project2/.vscode/settings.json và thiết lập java.import.maven.enabled. Kiểm tra cách các tệp .project, .classpath và .settings hiện có ảnh hưởng đến quá trình import sau khi khởi động lại; được xem là hoàn tất khi việc tắt thiết lập có hiệu lực mà không cần xóa thủ công các tệp đó, hoặc khi thao tác dọn dẹp cần thiết được ghi rõ trong tài liệu.
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
- developer-experience, 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