Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Replace manual activateProxyService() with declarative Require-Capability on IProxyService?

未关闭
#3,932 4 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
48/100
Issue 类型
重构
描述清晰度
描述清楚
活跃度
冷清
技术栈
java
领域
desktop

调研方向

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 内容生成。

描述

enhancement

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 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

eclipse-platform/eclipse.platform.ui 的其他 Issue

查看 eclipse-platform/eclipse.platform.ui 的全部 Issue

相似的 Issue

更多 Java Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。