Supplier<MadTestingAction> (@NotNull Function<PsiFile, Generator<? extends MadTestingAction>> fileActions, @NotNull Pattern pattern) { return MadTestingUtil.actionsOnFileContents(myFixture, PathManager.getHomePath(), f -> { try { return f.getName().endsWith(".java") && pattern.matcher(FileUtil.loadFile(f)).find(); } catch (IOException e) { return false; } }, fileActions); }