Closed
Description
[provide a description of the issue]
When instantiating an anonymous class, I would like to use source action
to override some methods in the base class. But the methods in base class don't show up in the quick pick list.
Environment
- Operating System: Ubuntu (24.04)
- JDK version: 21
- Visual Studio Code version: 1.89.1
- Java extension version: 1.30.0
But this issue seems not related to the OS.
Steps To Reproduce
- [step 1]
Creating a Java project with the following code:
public class App {
public static void main(String[] args) throws Exception {
System.out.println("Hello, World!");
Base s = new Base(){
};
}
}
class Base{
public void hello(){
}
public void hey(){
}
}
- [step 2]
At the position of new Base()
, right click and select Source Action
and select Override/Implement Methods
. There is no hello
and hey
in the options.
Current Result
No hey
and hello
Expected Result
The two methods exist.
Additional Informations
I have already tried Eclipse and it work well for such operation.