Community
Participate
Working Groups
Build ID: I20090528-2000 Steps To Reproduce: 1. Class A, subclass B. Try to pull up an "abstract" declaration of a method from B to A. 2. Result is that it pulls up entire method from B to A, when it should leave B method intact, and just show an abstract version of method in A. This was working fine until Eclipse 3.4.2 busted it. More information: To me, this is a LARGE bug. It needs to be fixed before the final release of Galileo!!
Move to JDT/UI
From your comment 0 it is not clear whether A and/or B are abstract. Also, is your method in B abstract? Please provide a concrete example.
public class ClassA { } public class ClassB extends ClassA { public void MyMethod() { // this is a method to pull up } protected void PullUpMethodAsAbstractInClassA() { // when pulled up, this should become abstract in ClassA and remain here in ClassB. } } When performing a Pull Up of a method from ClassB to ClassA, one can set the Action to say "declare abstract in destination." That means that the method will REMAIN on the subclass, ClassB, and you'll see an abstract declaration of the method on ClassA. If you try that on the above code in Eclipse 3.4.2. or higher, it is broken! It pulls up the entire method to ClassA and doesn't declare anything as abstract. In other words, the "declare as abstract in destination" feature in the Pull Up refactoring is totally and utterly broken in 3.4.2 and the very very latest Galileo. This MUST be fixed.
(In reply to comment #3) That works for me exactly as you expected (in 3.4.2 and with http://download.eclipse.org/eclipse/downloads/drops/I20090605-1444/download.php?dropFile=eclipse-SDK-I20090605-1444-win32.zip ). Does it work for you in a new workspace or with a new install?
Odd. I just got Galileo RC3 and it worked (on WinXP). But yesterday I got RC2 on OSX and it did not work! I'm confused. I've also seen this fail on Eclipse 3.4.2. I will have to do some more experiments. Thanks for your help so far.
Works for me using 3.4.2 and 3.5 RC4. Please reopen if you can provide steps.