Bug 372568 - [refactoring] Refactoring like “change method signature” for generic type and method type parameter lists
Summary: [refactoring] Refactoring like “change method signature” for generic type and...
Status: ASSIGNED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.8   Edit
Hardware: PC Windows 7
: P3 enhancement with 6 votes (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-25 09:39 EST by Glenview Jeff CLA
Modified: 2013-04-30 03:09 EDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Glenview Jeff CLA 2012-02-25 09:39:43 EST
Build Identifier: 20110916-0149

There should be a refactoring equivalent to the "change method signature" refactoring that would allow you to modify the "signature" of a class's generic parameters.

For instance, if I wanted to remove, reorder, or introduce additional generic parameters to a class, it would change the references to the class accordingly and add default values, etc.


Reproducible: Always
Comment 1 Ayushman Jain CLA 2012-02-26 12:47:04 EST
Moving to JDT/UI
Comment 2 Markus Keller CLA 2012-03-06 06:47:34 EST
That would be interesting for types as well as for methods that have generic type parameters.
Comment 3 Glenview Jeff CLA 2012-03-06 07:56:34 EST
Definitely for types as well, thanks for the idea!
Comment 4 Glenview Jeff CLA 2012-03-06 08:05:06 EST
Actually I just realized after posting the reply that I don't actually know what you mean by it applying to "types" as a distinct concept from it applying to generic class parameters.  Could you please explain the distinction?
Comment 5 Markus Keller CLA 2012-03-06 09:17:45 EST
"type" is the general term for classes and interfaces (including enums and annotations).

The feature should not only work for generic classes, but also for interfaces:

   public interface Map<K,V> {..}

... and for methods:

   public static <T> void copy(List<? super T> dest, List<? extends T> src) {
      ..
   }
Comment 6 Glenview Jeff CLA 2012-03-27 14:19:44 EDT
FYI, out of curiosity, I tested this out in IntelliJ IDEA and it works as described in this enhancement request.