run all tests in abstract class inheritors

This commit is contained in:
anna
2012-02-14 18:54:08 +01:00
parent 281a692bff
commit 24054464f0
6 changed files with 62 additions and 12 deletions
@@ -102,7 +102,7 @@ public class InheritorChooser {
}
});
JBPopupFactory.getInstance().createListPopupBuilder(list)
.setTitle("Choose executable classes to run " + psiMethod.getName())
.setTitle("Choose executable classes to run " + (psiMethod != null ? psiMethod.getName() : containingClass.getName()))
.setMovable(false)
.setResizable(false)
.setRequestFocus(true)
@@ -275,7 +275,7 @@ public class JUnitUtil {
public static PsiClass getTestClass(final Location<?> location) {
for (Iterator<Location<PsiClass>> iterator = location.getAncestors(PsiClass.class, false); iterator.hasNext();) {
final Location<PsiClass> classLocation = iterator.next();
if (isTestClass(classLocation)) return classLocation.getPsiElement();
if (isTestClass(classLocation.getPsiElement(), false, true)) return classLocation.getPsiElement();
}
PsiElement element = location.getPsiElement();
if (element instanceof PsiClassOwner) {