Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to implement unimplemented methods to all child classes in eclipse

Tags:

java

eclipse

As you know, eclipse provides with a nice way to implement unimplemented methods if a child class does not have them implemented. Is there any way to apply this to all child classes?

My problem is that I have to do this for each child class when there are 50 of them. I would appreciate any help.

like image 435
Tae-Sung Shin Avatar asked Nov 11 '11 21:11

Tae-Sung Shin


1 Answers

select the top level package in your package explorer. Go to the 'Problems' view. There should be the list of errors of "The type Foo must implement the inherited abstract method Parent.foo()" (for given class/method names). Right click on the error, select "Quick Fix". You can select the "Add unimplemented methods" option and click the "Select All Button" to select all the child classes.

EDIT: This works even for multiple methods per parent class.

like image 67
Kane Avatar answered Oct 11 '22 15:10

Kane