Bug 211488 - [override method] Allow Override/Implement of inherited interfaces
Summary: [override method] Allow Override/Implement of inherited interfaces
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows XP
: P5 enhancement (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-11-29 14:05 EST by Mike M CLA
Modified: 2007-11-30 11:06 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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! ;-)