Bug 24379 - [refactoring] Change interface signature
Summary: [refactoring] Change interface signature
Status: ASSIGNED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 2.0.1   Edit
Hardware: All All
: P3 enhancement with 4 votes (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 39715 (view as bug list)
Depends on:
Blocks:
 
Reported: 2002-10-04 05:19 EDT by Martin Möbius CLA
Modified: 2020-03-11 03:12 EDT (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Möbius CLA 2002-10-04 05:19:39 EDT
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.
Comment 1 Adam Kiezun CLA 2002-10-08 05:29:27 EDT
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.
Comment 2 Martin Möbius CLA 2002-10-08 05:58:05 EDT
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.
Comment 3 Martin Aeschlimann CLA 2002-10-15 12:12:56 EDT
It seems that this can be combined to a 'delete'-refactoring:
delete a field / method / class  and also remove references and/or other 
implementors.
Comment 4 Jason Bennett CLA 2005-05-03 18:16:47 EDT
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.
Comment 5 Martin Aeschlimann CLA 2006-06-16 02:23:17 EDT
a clean up that fixes all unimplemented interfaces
Comment 6 Benno Baumgartner CLA 2006-06-16 03:28:18 EDT
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).
Comment 7 Benno Baumgartner CLA 2007-06-25 04:34:05 EDT
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.
Comment 8 Benno Baumgartner CLA 2007-07-24 11:43:16 EDT
*** Bug 39715 has been marked as a duplicate of this bug. ***