mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-08 15:09:39 +07:00
move member: clear qualifier in annotation inside class (IDEA-190911)
This commit is contained in:
@@ -46,7 +46,7 @@ public class RefactoringHierarchyUtil {
|
||||
while (parent != null) {
|
||||
//noinspection SuspiciousMethodCalls
|
||||
if (membersToMove.contains(parent)) return true;
|
||||
if (parent instanceof PsiModifierList) return false; //see IDEADEV-12448
|
||||
if (parent instanceof PsiModifierList && (targetClass == null || targetClass.getModifierList() == parent)) return false; //see IDEADEV-12448
|
||||
if (parent instanceof PsiClass && targetClass != null) {
|
||||
if (targetClass.equals(parent)) return true;
|
||||
if (includeSubclasses && ((PsiClass) parent).isInheritor(targetClass, true)) return true;
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
class A {
|
||||
}
|
||||
|
||||
class B {
|
||||
public static final String FOO = "foo";
|
||||
@SuppressWarnings(FOO)
|
||||
String myFoo;
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
class A {
|
||||
public static final String FOO = "foo";
|
||||
}
|
||||
|
||||
class B {
|
||||
@SuppressWarnings(A.FOO)
|
||||
String myFoo;
|
||||
}
|
||||
@@ -217,6 +217,10 @@ public class MoveMembersTest extends MultiFileTestCase {
|
||||
doTest("A", "B", 0);
|
||||
}
|
||||
|
||||
public void testClearQualifierInsideInnerAnnotation() {
|
||||
doTest("A", "B", 0);
|
||||
}
|
||||
|
||||
public void testFromNestedToOuterMethodRef() {
|
||||
final LanguageLevelProjectExtension projectExtension = LanguageLevelProjectExtension.getInstance(getProject());
|
||||
final LanguageLevel oldLevel = projectExtension.getLanguageLevel();
|
||||
|
||||
Reference in New Issue
Block a user