Code completion does not offer overriding toString() when a super interface has declared it
- 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
Within a Java class that implements an interface which declares the standard `toString()` method (like for example the `java.lang.CharSequence` interface does), code completion does not offer overriding `Object::toString()`.
### Language / Project Type / NetBeans Component
Java, Code completion
### How to reproduce
```java
class Example
{
interface Interface { public String toString(); }
static class Impl implements Interface { }
}
```
Within the `Impl` class, invoke code completion => overriding `toString()` is not offered.
Remove either `toString()` in `Interface`, or remove `implements Interface` from `Impl` => overriding `toString()` is now offered.
### Did this work correctly in an earlier version?
No / Don't know
### Operating System
Windows
### JDK
17
### 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 code-completion entry point and reproduce the example with Interface and Impl, then compare completion with and without the super-interface declaration. Trace why overriding Object::toString() is omitted in the first case. Done means the completion list offers toString() for Impl while preserving the existing behavior in the comparison cases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- developer-experience
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 64/100