create subclass: for private inner classes create implementation in the same containing class (IDEA-18954); IDEA-76741

This commit is contained in:
anna
2012-01-13 21:21:38 +01:00
parent 6671490aa8
commit 4fe09fbead
4 changed files with 106 additions and 49 deletions

View File

@@ -14,6 +14,19 @@ public class CreateSubclassTest extends MultiFileTestCase {
public void testGenerics() throws Exception {
doTest();
}
public void testInnerClass() throws Exception {
doTest(new PerformAction() {
@Override
public void performAction(final VirtualFile rootDir, final VirtualFile rootAfter) throws Exception {
PsiClass superClass = myJavaFacade.findClass("Test", ProjectScope.getAllScope(myProject));
assertNotNull(superClass);
final PsiClass inner = superClass.findInnerClassByName("Inner", false);
assertNotNull(inner);
CreateSubclassAction.createInnerClass(inner);
}
});
}
private void doTest() throws Exception {
doTest(new PerformAction() {