Go to Implementation on interface method does not work for inherited implementations
- Dominant language
- Java
- Stars
- 3.1k
- Forks
- 935
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 17
Description
### 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
```java
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
Contributor guide
Research direction
Start in the Java Editor by reproducing the sample with B::a and B::b, then inspect the Go to Implementation command and editor-gutter implementation indicators. The work is done when inherited implementations are found through the interface context and the corresponding badges appear for both methods.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100