Community
Participate
Working Groups
When adding or removing methods in interfaces it would nice to have the possibility to add or remove the method automatically in implementing classes. When adding methods it should also add a task with the note implement this method.
not sure when would that heppen. probably a separate action would be needed - you'd select the interface and then the action would add stubs to all non-abstract classes that implement the interface and do not implements all of its methods (so are broken right now) some different smarts would be needed for deleting.
For adding methods the qickfix could be handy. But deleting does not fit in. A more complex mechanism to detect changes at the method level during edit changes, seems a bit oversized.
It seems that this can be combined to a 'delete'-refactoring: delete a field / method / class and also remove references and/or other implementors.
It would be great if the Extract Interface refactor would detect an existing interface of the same name and simply synchronize the two. Right now, you have to actually delete the interface and the reference in the base class, and re-extract. This would be very helpful in Spring development, where the DAOs and facades are all interface driven.
a clean up that fixes all unimplemented interfaces
I can write a clean up to 'add unimplemented methods' (not sure if this is wise though). But the other way around (remove method from interface) can't be done by a clean up. It would require some sort of refactoring like 'change interface' similar to 'change method signature'. When adding a method to an interface through this refactoring the user could also provide a default implementation (like a default value in 'change method signature'). A clean up would not allow to do this (it would just use the method body template).
Moving back to the inbox. Changing the interface signature is clearly a refactoring. However, filed bug 194166 to make 'Add unimplemented methods' a multi quick fix.
*** Bug 39715 has been marked as a duplicate of this bug. ***