IDEA and Eclipse : How to automatic generate metho

2020-03-24 05:03发布

问题:

My question is extremely easy when you implement a class. (because Eclipse and IDEA can generate for us).

But, I don't know how to do the same when you extends a class. (Of course this work is not must, but I want to be sure what to do in my code, so this option will be helpful).

thanks :)

回答1:

For Eclipse, go into the Source menu (Alt+Shift+s) -> Override/Implement Methods... and this should give you a list of all the methods that can be @overriden.



回答2:

In IntelliJ : CTRLo shows the list of methods to override/implement



回答3:

In IntelliJ: AltInsert generates all kinds of code, including overriding methods, implementing methods, constructors, getters, setters, delegators and so on.