Replace manual activateProxyService() with declarative Require-Capability on IProxyService?
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
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.
由索引模型根据 Issue 内容生成。
描述
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.
- 主要语言
- Java
- 星标
- 124
- 派生
- 269
- 平均合并
- 1 天 19 小时
- 30 天内合并 PR
- 63
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
eclipse-platform/eclipse.platform.ui 的其他 Issue
-
enhancement
难度 2/5 1-3 小时 新手友好度 76/100
eclipse-platform/eclipse.platform.ui#4125 · 4 条评论 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 72/100
eclipse-platform/eclipse.platform.ui#4016 · 3 条评论 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 72/100
eclipse-platform/eclipse.platform.ui#3892 · 4 条评论 ·
维护者通常 1 天内回复
-
enhancement
难度 2/5 1-3 小时 新手友好度 70/100
eclipse-platform/eclipse.platform.ui#2687 · 2 条评论 ·
维护者通常 1 天内回复
-
Default background color changed for "welcome" area content可能已有人在做 @vogella 今天认领。 未关闭bug regression
难度 2/5 1-3 小时 新手友好度 53/100
eclipse-platform/eclipse.platform.ui#4484 · 4 条评论 ·
维护者通常 1 天内回复
查看 eclipse-platform/eclipse.platform.ui 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 62/100
维护者通常 4 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
objectionary/lints#1556 ·
维护者通常 3 天内回复
-
难度 2/5 1-3 小时 新手友好度 65/100
wildfly/wildfly-launcher#99 ·
-
难度 2/5 1-3 小时 新手友好度 65/100
apache/rocketmq#11427 · 2 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 70/100
维护者通常 1 天内回复