mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-17 07:20:53 +07:00
34 lines
1.0 KiB
Java
34 lines
1.0 KiB
Java
package com.intellij.codeInsight.intention;
|
|
|
|
import com.intellij.openapi.vfs.VirtualFile;
|
|
import com.intellij.psi.PsiClass;
|
|
import com.intellij.psi.PsiDirectory;
|
|
import com.intellij.psi.search.ProjectScope;
|
|
import com.intellij.refactoring.MultiFileTestCase;
|
|
import com.intellij.codeInsight.intention.impl.CreateSubclassAction;
|
|
|
|
/**
|
|
* @author yole
|
|
*/
|
|
public class CreateSubclassTest extends MultiFileTestCase {
|
|
public void testGenerics() throws Exception {
|
|
doTest();
|
|
}
|
|
|
|
private void doTest() throws Exception {
|
|
doTest(new PerformAction() {
|
|
@Override
|
|
public void performAction(final VirtualFile rootDir, final VirtualFile rootAfter) throws Exception {
|
|
PsiDirectory root = myPsiManager.findDirectory(rootDir);
|
|
PsiClass superClass = myJavaFacade.findClass("Superclass", ProjectScope.getAllScope(myProject));
|
|
CreateSubclassAction.createSubclass(superClass, root, "Subclass");
|
|
}
|
|
});
|
|
}
|
|
|
|
@Override
|
|
protected String getTestRoot() {
|
|
return "/codeInsight/createSubclass/";
|
|
}
|
|
}
|