Bug 211488

Summary: [override method] Allow Override/Implement of inherited interfaces
Product: [Eclipse Project] JDT Reporter: Mike M <gubespam>
Component: UIAssignee: JDT-UI-Inbox <jdt-ui-inbox>
Status: NEW --- QA Contact:
Severity: enhancement    
Priority: P5 CC: martinae
Version: 3.3   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Mike M CLA 2007-11-29 14:05:14 EST
Currently, you cannot use the Source -> Implement/Override feature on interfaces.  Enable this feature on interfaces, because the following use cases are possible:

1. Narrow return types of methods.  I believe this has been allowed since Java 1.5
2. Add a "throws" declaration of a RuntimeException
3. Remove declaration of Exceptions

The two interfaces below demonstrate these cases:

--
import java.awt.AWTException;
public interface Interface
{
    public Interface method() throws IllegalArgumentException, AWTException [3];
}
--
public interface SubInterface extends Interface
{
    public SubInterface [1] method() throws UnsupportedOperationException [2];
}

It is arguable about how useful 2 and 3 are, but 1 is definitely useful.
Comment 1 Jerome Lanneluc CLA 2007-11-30 11:01:17 EST
Moving to JDT/UI
Comment 2 Martin Aeschlimann CLA 2007-11-30 11:06:53 EST
So it would become the Override/Implement/Redefine wizard! ;-)