Location<PsiMethod> () { PsiMethod m = myTestMethodPointer.getElement(); if (m == null) return null; PsiClass c = myTestClassPointer == null ? m.getContainingClass() : myTestClassPointer.getElement(); if (c == null) return null; return MethodLocation.elementInClass(m, c); }