| Summary: | [refactoring] Pull up refactoring doesn't allow pulling up to an abstract method declaration | ||
|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Bill Wake <william.wake> |
| Component: | Core | Assignee: | JDT-Core-Inbox <jdt-core-inbox> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | ||
| Version: | 4.10 | ||
| Target Milestone: | --- | ||
| Hardware: | Macintosh | ||
| OS: | Mac OS X | ||
| Whiteboard: | stalebug | ||
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. If you have further information on the current state of the bug, please add it. 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. Works in Eclipse 2020-12 (4.18.0) |
When applying Pull Up on a method, if you select the action to pull it up as abstract, it pulls up the whole method (as if you'd used the "pull up" action) rather than just the abstract declaration. To reproduce: Parent.java: public class Parent {} Child.java: public class Child extends Parent { public void speak() { System.out.println("Hello"); } } * Right-click on "speak", then select Refactor > Pull Up... * In the dialog, click on the "pull up" action and change it to "declare abstract in destination" * Click Finish What you get: public class Parent { public void speak() { System.out.println("Hello"); } } public class Child extends Parent { } What I expected (as earlier versions did): public abstract class Parent { public abstract void speak(); } public class Child extends Parent { public void speak() { System.out.println("Hello"); } }