Go to Implementation on interface method does not work for inherited implementations
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
在 Java Editor 中通过复现使用 B::a 和 B::b 的示例开始,然后检查 Go to Implementation 命令和 editor-gutter 中的实现指示器。当通过接口上下文找到继承的实现,并且两个方法都显示相应的徽章时,工作就完成了。
由索引模型根据 Issue 内容生成。
描述
Apache NetBeans version
Apache NetBeans 30
What happened
Go to Implementation (Ctrl+Alt+B, or context menu > Navigate > Go to Implementation) does not work on interface methods whose implementations are inherited from classes that themselves aren't declared to implement the interface (but subclasses are). The "Ⓘ" badges in the editor gutter are correspondingly missing.
This makes it more difficult to locate method implementations from a call site that invokes the method from the interface type, and it makes it misleadingly look like there are no implementations of the method.
Language / Project Type / NetBeans Component
Java, Editor
How to reproduce
class Example
{
interface A
{
CharSequence a();
}
interface B extends A
{
@Override
String a();
String b();
String c();
}
static class AImpl implements A
{
@Override
public String a() { return "a"; }
public String b() { return "b"; }
}
static class BImpl extends AImpl implements B
{
public String c() { return "c"; }
}
}
On B::a anb B::b, Go to Implementation (Ctrl+Alt+B, or context menu > Navigate > Go to Implementation) does not work, although these methods are implemented by AImpl (in the context of BImpl).
In addition, no "Ⓘ" badge is shown on B::b, although interface B is fully implemented by BImpl.
Did this work correctly in an earlier version?
No / Don't know
Operating System
Windows
JDK
JDK 21
Apache NetBeans packaging
Apache NetBeans binary zip
Anything else
No response
Are you willing to submit a pull request?
No
- 主要语言
- Java
- 星标
- 3.1k
- 派生
- 939
- 平均合并
- 5 天 3 小时
- 30 天内合并 PR
- 22
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
apache/netbeans 的其他 Issue
-
Contribution welcome kind:feature Platform
难度 2/5 1-3 小时 新手友好度 72/100
apache/netbeans#9614 · 2 条评论 ·
维护者通常 1 天内回复
-
kind:bug LSP needs:triage
难度 2/5 1-3 小时 新手友好度 78/100
apache/netbeans#9548 · 1 条评论 ·
维护者通常 1 天内回复
-
Editor Java kind:feature needs:triage
难度 2/5 1-3 小时 新手友好度 65/100
维护者通常 1 天内回复
-
kind:bug needs:triage os:linux os:macos Platform UI
难度 1/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复
-
kind:bug needs:triage
难度 1/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 72/100
NationalSecurityAgency/ghidra#9748 ·
维护者通常 1 天内回复
-
enhancement
难度 2/5 1-3 小时 新手友好度 85/100
维护者通常 1 天内回复
-
spring-mcp-tools
难度 2/5 1-3 小时 新手友好度 85/100
explyt/spring-plugin#591 ·
维护者通常 1 天内回复
-
waiting-for-triage
难度 1/5 1 小时以内 新手友好度 72/100
spring-cloud/spring-cloud-openfeign#1443 ·
维护者通常 1 天内回复
-
难度 1/5 1-3 小时 新手友好度 84/100
ADORSYS-GIS/keycloak-oid4vp-plugin#221 ·
维护者通常 2 天内回复