mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-10 13:17:09 +07:00
move to inner: move to interface
This commit is contained in:
+6
-1
@@ -143,7 +143,12 @@ public class MoveClassToInnerProcessor extends BaseRefactoringProcessor {
|
||||
for (PsiClass classToMove : myClassesToMove) {
|
||||
ChangeContextUtil.encodeContextInfo(classToMove, true);
|
||||
PsiClass newClass = (PsiClass)myTargetClass.addBefore(classToMove, myTargetClass.getRBrace());
|
||||
PsiUtil.setModifierProperty(newClass, PsiModifier.STATIC, true);
|
||||
if (myTargetClass.isInterface()) {
|
||||
PsiUtil.setModifierProperty(newClass, PsiModifier.PACKAGE_LOCAL, true);
|
||||
}
|
||||
else {
|
||||
PsiUtil.setModifierProperty(newClass, PsiModifier.STATIC, true);
|
||||
}
|
||||
newClass = (PsiClass)ChangeContextUtil.decodeContextInfo(newClass, null, null);
|
||||
oldToNewElementsMapping.put(classToMove, newClass);
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
package pack2;
|
||||
|
||||
public interface A {
|
||||
static class Class1 {
|
||||
class Class1 {
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user