List<TestDataFile> (@NotNull PsiMethod method, boolean collectByExistingFiles) { myContainingClass = ReadAction.compute(() -> method.getContainingClass()); List<TestDataFile> result = collectTestDataReferences(method, new HashMap<>(), new HashSet<>()); if (!myFoundTestDataParameters) { myLogMessages.add("Found no parameters annotated with @TestDataFile"); //NON-NLS } if (collectByExistingFiles && result.isEmpty()) { result = new ArrayList<>(); result.addAll(TestDataGuessByExistingFilesUtil.collectTestDataByExistingFiles(method, myTestDataPath)); result.addAll(TestDataGuessByTestDiscoveryUtil.collectTestDataByExistingFiles(method)); } return result; }