List<String> () { List<String> excluded = new ArrayList<>(); for (JpsExcludeFolder folder : myExcludeFolders) { excluded.add(folder.getUrl()); } for (DirectoryIndexExcludePolicy excludePolicy : DirectoryIndexExcludePolicy.EP_NAME.getExtensions(myRootModel.getProject())) { for (VirtualFilePointer pointer : excludePolicy.getExcludeRootsForModule(myRootModel)) { excluded.add(pointer.getUrl()); } } return excluded; }