mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
extract super: ensure moved members order (IDEA-192850)
This commit is contained in:
@@ -161,8 +161,8 @@ public class PullUpProcessor extends BaseRefactoringProcessor implements PullUpD
|
||||
}
|
||||
|
||||
public void moveMembersToBase() throws IncorrectOperationException {
|
||||
myMovedMembers = ContainerUtil.newHashSet();
|
||||
myMembersAfterMove = ContainerUtil.newHashSet();
|
||||
myMovedMembers = ContainerUtil.newLinkedHashSet();
|
||||
myMembersAfterMove = ContainerUtil.newLinkedHashSet();
|
||||
|
||||
// build aux sets
|
||||
for (MemberInfo info : myMembersToMove) {
|
||||
|
||||
+3
-1
@@ -1,7 +1,9 @@
|
||||
public class Test {
|
||||
int a;
|
||||
int b;
|
||||
|
||||
public Test(int a) {
|
||||
public Test(int a, int b) {
|
||||
this.a = a;
|
||||
this.b = b;
|
||||
}
|
||||
}
|
||||
|
||||
+4
-4
@@ -1,7 +1,7 @@
|
||||
public class TestSubclass extends Test {
|
||||
int b;
|
||||
public TestSubclass(int a, int b) {
|
||||
super(a);
|
||||
this.b = b;
|
||||
int c;
|
||||
public TestSubclass(int a, int b, int c) {
|
||||
super(a, b);
|
||||
this.c = c;
|
||||
}
|
||||
}
|
||||
+3
-1
@@ -1,8 +1,10 @@
|
||||
public class Test {
|
||||
int a;
|
||||
int b;
|
||||
public Test(int a, int b) {
|
||||
int c;
|
||||
public Test(int a, int b, int c) {
|
||||
this.a = a;
|
||||
this.b = b;
|
||||
this.c = c;
|
||||
}
|
||||
}
|
||||
@@ -95,7 +95,7 @@ public class ExtractSuperClassTest extends RefactoringTestCase {
|
||||
}
|
||||
|
||||
public void testParameterNameEqualsFieldName() throws Exception { // IDEADEV-10629
|
||||
doTest("Test", "TestSubclass", new RefactoringTestUtil.MemberDescriptor("a", PsiField.class));
|
||||
doTest("Test", "TestSubclass", new RefactoringTestUtil.MemberDescriptor("a", PsiField.class), new RefactoringTestUtil.MemberDescriptor("b", PsiField.class));
|
||||
}
|
||||
|
||||
public void testSameTypeParameterName() throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user