IDEA and Eclipse : How to automatic generate method when extends a class

不羁岁月 提交于 2019-12-01 04:41:50

问题


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.



来源:https://stackoverflow.com/questions/9425338/idea-and-eclipse-how-to-automatic-generate-method-when-extends-a-class

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!