Replace manual activateProxyService() with declarative Require-Capability on IProxyService?
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 48/100
Hướng nghiên cứu
Read IDEWorkbenchAdvisor in org.eclipse.ui.ide.application and its META-INF/MANIFEST.MF. Compare the EventAdmin Require-Capability declarations in org.eclipse.e4.ui.workbench and org.eclipse.e4.ui.services, then check the relevant startup tests. Done means the imperative activation method and call are removed, the manifest declares IProxyService, and startup still resolves correctly.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
IDEWorkbenchAdvisor.activateProxyService() (in org.eclipse.ui.ide.application) eagerly fetches IProxyService via OSGi BundleContext.getService(...) purely to force activation of org.eclipse.core.net.
The returned service is never used; the variable exists only to trigger the side effect.
If the lookup fails, the result is a logged warning that is easy to miss.
The same activation can be expressed declaratively in META-INF/MANIFEST.MF:
Require-Capability: osgi.service;
filter:="(objectClass=org.eclipse.core.net.proxy.IProxyService)";
effective:="active"
This is the modern OSGi pattern and is already used in this repository for EventAdmin in org.eclipse.e4.ui.workbench and org.eclipse.e4.ui.services.
Benefits
- Removes ~15 lines of imperative activation code (activateProxyService() and its call site in postStartup()), including the awkward Object proxyService assigned-but-unused variable.
- Dependency becomes visible in the manifest alongside other declared capabilities.
- A missing IProxyService provider becomes a hard resolution failure at startup instead of a runtime log line, which is the more useful failure mode for the IDE.
- No measurable runtime cost change — both paths end up activating org.eclipse.core.net in the same way.
- Ngôn ngữ chính
- Java
- Star
- 124
- Fork
- 269
- Merge trung bình
- 2 ngày 2 giờ
- Pull request đã merge (30 ngày)
- 70
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc 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.
Issue khác của eclipse-platform/eclipse.platform.ui
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
eclipse-platform/eclipse.platform.ui#4125 · 4 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
eclipse-platform/eclipse.platform.ui#4016 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
eclipse-platform/eclipse.platform.ui#3892 · 4 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
eclipse-platform/eclipse.platform.ui#2687 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
eclipse-platform/eclipse.platform.ui#4487 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của eclipse-platform/eclipse.platform.ui
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug new windows
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
Maintainer thường phản hồi trong vòng 1 ngày
-
iOS podspec depends on `React-Codegen`, which resolves to an unrelated pod on CocoaPods trunkĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
GantMan/jail-monkey#380 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
objectionary/jucs#145 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
objectionary/lints#1559 ·
Maintainer thường phản hồi trong vòng 2 ngày