| Summary: | [change method signature] should allow modification of all methods overloaded with same name | ||
|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Luke Hutchison <luke.hutch> |
| Component: | UI | Assignee: | JDT-UI-Inbox <jdt-ui-inbox> |
| Status: | CLOSED INVALID | QA Contact: | |
| Severity: | enhancement | ||
| Priority: | P5 | CC: | martinae |
| Version: | 3.4 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| Whiteboard: | |||
|
Description
Luke Hutchison
Hmm, this is the first time I hear this suggestion; I also haven't had this scenario where this would have come handy. The example I hit yesterday was as follows: I had two constructors
public Relationship(String childId, String parentId, String relationshipType) {}
public Relationship(Term child, Term parent, RelType relationshipType) {}
I refactored the first one as follows:
public Relationship(String childId, String relationshipType, String parentId) {}
I then noticed a call somewhere:
x = new Relationship(child, parent, relType);
which I thought had been missed by the refactoring. I spent a lot of time trying to duplicate the bug in a simple testcase, but couldn't, then I realized that this call was actually a call to the second constructor, which I didn't notice the existence of.
It would be great if the refactor display just displayed both calls:
public Relationship : constructor
String childId
String parentId
String relationshipType
public Relationship : constructor
Term child
Term parent
RelType relationshipType
It makes sense to do this because there are a lot of cases where overloaded functions should have parameters in approximately the same order, so that the calling conventions make sense.
|