| Summary: | [reorg] Dragging a method node should invoke move refactoring | ||
|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Missing name Mising name <wuntoy> |
| Component: | UI | Assignee: | JDT-UI-Inbox <jdt-ui-inbox> |
| Status: | CLOSED WONTFIX | QA Contact: | |
| Severity: | minor | ||
| Priority: | P3 | CC: | martinae |
| Version: | 3.2 | ||
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | stalebug | ||
Tobias, what's our rational here? Since b is a static method, the move action automatically forwards to the move static members refactoring. DND however only makes use of the Reorg Infrastructure, which correctly recognizes this as textual move. We could extend DND to perform the forwarding like the move action. That should be easy. This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug. If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie. |
Suppose the following code: class X{ public static void a() {System.out.println("a()";} public static void b() {a();} } class Y{} Selecting the method node in, for instance, the Outline view and choosing Refactor/Move on X.b() with Y as the target type correctly yields: class X{ public static void a() {System.out.println("a()";} } class Y{ public static void b() {X.a();} } However, dragging the X.b() method node onto the Y type node will simply move the text, so Y.b() attempts to call Y.a() in the expression "a()". Since this method does not exist the code is broken. Dragging a method node onto a type node should invoke the existing refactoring where it makes sense to do so, since the Outline, Package Explorer and other affected views convey the Java model and not the text structure.