redhat-developer / redhat-developer/vscode-java

Eclipse formatter option parentheses_positions_in_method_invocation not considered regardless its value

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

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

bug formatter
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ả

Java code formatter in VSCode is not yet supporting the org.eclipse.jdt.core.formatter.parentheses_positions_in_method_invocation option. And identical issue was raised here: https://github.com/revelc/formatter-maven-plugin/issues/343.

Can it be that VSCode uses an older version of the Eclipse formatter plugin?

Environment
  • Operating System: MacOS
  • JDK version: 15
  • Java extension version: rehhat.java v0.79.2
  • Visual Studio Code version:
    Version: 1.57.0
    Commit: b4c1bd0a9b03c749ea011b06c6d2676c8091a70c
    Date: 2021-06-09T17:22:31.215Z (1 wk ago)
    Electron: 12.0.9
    Chrome: 89.0.4389.128
    Node.js: 14.16.0
    V8: 8.9.255.25-electron.0
    OS: Darwin x64 19.6.0
Steps To Reproduce
method(
    arg1,
    arg2,
    arg3
);

is always formatted to:

method(
    arg1,
    arg2,
    arg3);

regardless of the value given to the Eclipse formatter option org.eclipse.jdt.core.formatter.parentheses_positions_in_method_invocation (set to preserve_positions).

It would be nice to at least not join wrapped lines according to <setting id="org.eclipse.jdt.core.formatter.join_wrapped_lines" value="false"/>.

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

Tái hiện vấn đề trong VS Code bằng đoạn mã Java và các thiết lập formatter của Eclipse cho parentheses_positions_in_method_invocation và join_wrapped_lines. Sau đó, truy vết phần tích hợp formatter của extension và xác định tùy chọn bị mất ở đâu; hoàn tất khi giá trị đã cấu hình được tôn trọng và các dòng được ngắt không bị nối lại khi join_wrapped_lines là false.

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
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.