Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Go to Implementation on interface method does not work for inherited implementations

Aperta
#9,455 1 commento 1 reazione 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
55/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
java
Ambito
devtools

Direzione di ricerca

Inizia nel Java Editor riproducendo l’esempio con B::a e B::b, quindi esamina il comando Go to Implementation e gli indicatori di implementazione nell’editor-gutter. Il lavoro è completato quando le implementazioni ereditate vengono trovate tramite il contesto dell’interfaccia e compaiono i badge corrispondenti per entrambi i metodi.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Java kind:bug needs:triage
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

Lingua principale
Java
Stelle
3.1k
Fork
939
Merge medio
4g 21h
PR unite (30g)
24

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di apache/netbeans

Tutte le issue di apache/netbeans

Issue simili

Altre issue su Java

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.