mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 15:27:45 +07:00
replace duplicates when pull methods up
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
class A {}
|
||||
class AImpl1 extends A{
|
||||
void f<caret>oo() {
|
||||
System.out.println("hello");
|
||||
System.out.println("hello");
|
||||
System.out.println("hello");
|
||||
System.out.println("hello");
|
||||
}
|
||||
}
|
||||
|
||||
class AImpl2 extends A {
|
||||
void bar() {
|
||||
System.out.println("hello");
|
||||
System.out.println("hello");
|
||||
System.out.println("hello");
|
||||
System.out.println("hello");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
class A {
|
||||
void foo() {
|
||||
System.out.println("hello");
|
||||
System.out.println("hello");
|
||||
System.out.println("hello");
|
||||
System.out.println("hello");
|
||||
}
|
||||
}
|
||||
class AImpl1 extends A{
|
||||
}
|
||||
|
||||
class AImpl2 extends A {
|
||||
void bar() {
|
||||
foo();
|
||||
}
|
||||
}
|
||||
@@ -94,6 +94,10 @@ public class PullUpTest extends LightCodeInsightTestCase {
|
||||
doTest(new RefactoringTestUtil.MemberDescriptor("method", PsiMethod.class, true));
|
||||
}
|
||||
|
||||
public void testReplaceDuplicatesInInheritors() throws Exception {
|
||||
doTest(new RefactoringTestUtil.MemberDescriptor("foo", PsiMethod.class, false));
|
||||
}
|
||||
|
||||
public void testGenericsInImplements() throws Exception {
|
||||
doTest(false, new RefactoringTestUtil.MemberDescriptor("I", PsiClass.class));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user