List<T> (Collection<PsiElement> foundClasses, Project project) { final List<RunConfiguration> configurations = RunManager.getInstance(project).getConfigurationsList(getConfigurationType()); final List<T> foundConfigurations = new ArrayList<>(); for (RunConfiguration configuration : configurations) { if (isPatternBasedConfiguration((T)configuration)) { if (foundClasses.size() > 1 || foundClasses.size() == 1 && !getPatterns((T)configuration).contains(getPatternBasedProducer().getQName(ContainerUtil.getFirstItem(foundClasses)))) { foundConfigurations.add((T)configuration); } } } return foundConfigurations; }