Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 368917

Summary: [refactoring] Java IDE should provide a "Delete method along with all implementations" refactoring
Product: [Eclipse Project] JDT Reporter: Tobias Gierke <tobias.gierke>
Component: UIAssignee: JDT-UI-Inbox <jdt-ui-inbox>
Status: CLOSED DUPLICATE QA Contact:
Severity: enhancement    
Priority: P3 CC: amj87.iitr, daniel_megert
Version: 3.8   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Tobias Gierke CLA 2012-01-18 03:48:43 EST
Build Identifier: 20110615-0604

When cleaning up code and I often need to delete unused methods. Deleting a method using the outline just deletes the current implementation/definition without affecting subclasses/implementing types.

A hack for deleting concrete methods (shamelessly stolen from http://stackoverflow.com/questions/4700015/i-cant-delete-a-method-using-eclipse-refactoring) is to perform the "Inline method" refactoring after deleting the method body manually - but this does not work for abstract methods since inlining those obviously is not possible.

Since the "Change method signature" refactoring is already able to locate all call sites for a given method, implementing this should not be too hard (i guess).

Reproducible: Always
Comment 1 Ayushman Jain CLA 2012-01-18 04:29:35 EST
Moving to JDT/UI.
Comment 2 Dani Megert CLA 2012-01-18 04:34:57 EST

*** This bug has been marked as a duplicate of bug 25097 ***