IPackageFragmentRoot testSourceFragmentRoot = handleTestSourceFolder(javaProject);
IPackageFragment elementPackage = handleTestPackage(element, testSourceFragmentRoot);
// handle class under test
IType classUnderTestType = (IType) element.getAncestor(IJavaElement.TYPE);
if (classUnderTestType == null) {
ICompilationUnit compilationUnit =
(ICompilationUnit) element.getAncestor(IJavaElement.COMPILATION_UNIT);
if (compilationUnit != null) {
classUnderTestType = compilationUnit.findPrimaryType();
}
}
if (classUnderTestType == null) {
setErrorState();
} else {