mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-19 04:51:24 +07:00
create public inner class in interface (IDEA-70577)
This commit is contained in:
@@ -141,7 +141,11 @@ public class CreateInnerClassFromUsageFix extends CreateClassFromUsageBaseFix {
|
||||
: myKind == CLASS ? elementFactory.createClass(refName) : elementFactory.createEnum(refName);
|
||||
final PsiModifierList modifierList = created.getModifierList();
|
||||
LOG.assertTrue(modifierList != null);
|
||||
modifierList.setModifierProperty(PsiModifier.PRIVATE, true);
|
||||
if (aClass.isInterface()) {
|
||||
modifierList.setModifierProperty(PsiModifier.PACKAGE_LOCAL, true);
|
||||
} else {
|
||||
modifierList.setModifierProperty(PsiModifier.PRIVATE, true);
|
||||
}
|
||||
if (superClassName != null) {
|
||||
PsiJavaCodeReferenceElement superClass =
|
||||
elementFactory.createReferenceElementByFQClassName(superClassName, created.getResolveScope());
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
// "Create Inner Class 'Foo'" "true"
|
||||
public interface Test {
|
||||
void foo(Fo<caret>o f){}
|
||||
|
||||
class Foo {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
// "Create Inner Class 'Foo'" "true"
|
||||
public interface Test {
|
||||
void foo(Fo<caret>o f){}
|
||||
}
|
||||
Reference in New Issue
Block a user