List<TestTasksToRun> ( @NotNull ConfigurationContext context, @NotNull PsiPackage element, @NotNull List<? extends PsiPackage> chosenElements ) { Project project = Objects.requireNonNull(context.getProject()); Module module = Objects.requireNonNull(context.getModule()); PsiElement psiLocation = Objects.requireNonNull(context.getPsiLocation()); PsiElement sourceElement = Objects.requireNonNull(getSourceElement(module, psiLocation)); VirtualFile source = Objects.requireNonNull(getSourceFile(sourceElement)); List<TasksToRun> allTasksToRuns = findAllTestsTaskToRun(source, project); String testFilter = createTestFilterFrom(element); return ContainerUtil.map(allTasksToRuns, it -> new TestTasksToRun(it, testFilter)); }