boolean (ModuleSourceSet set, ModulesProvider modulesProvider) { JavaSourceRootType type = set.getType().isTest()? JavaSourceRootType.TEST_SOURCE : JavaSourceRootType.SOURCE; ModuleRootModel rootModel = modulesProvider.getRootModel(set.getModule()); for (ContentEntry entry : rootModel.getContentEntries()) { if (!entry.getSourceFolders(type).isEmpty()) { return false; } } return true; }