Bug 464882 - Allow for refactoring generic type bounds of implemented interfaces / extended classes
Summary: Allow for refactoring generic type bounds of implemented interfaces / extende...
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 4.5   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-04-17 08:33 EDT by Lukas Eder CLA
Modified: 2015-04-17 08:33 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lukas Eder CLA 2015-04-17 08:33:09 EDT
Let's assume I have the following class:

------------------------------------------------------------
class X extends AbstractList<String> {
    @Override
    public String get(int index) {
        return null;
    }

    @Override
    public int size() {
        return 0;
    }
}
------------------------------------------------------------

Now, suddenly, I decide that I don't want this to be a List<String>, but a List<Integer> instead. I'd like to put my cursor on AbstractList<String>, and have an option to refactor the generic type bound <String> to <Integer>, resulting in:

------------------------------------------------------------
class X extends AbstractList<Integer> {
//                           ^^^^^^^ Change here

    @Override
    public Integer get(int index) {
//         ^^^^^^^ Change here
        return null;
    }

    @Override
    public int size() {
        return 0;
    }
}
------------------------------------------------------------