private static void processModuleSourceRoots(@NotNull Module module, Processor<VirtualFile> processor) {
    for (VirtualFile root : ModuleRootManager.getInstance(module).getSourceRoots(JavaResourceRootType.RESOURCE)) {
      if (!processor.process(root)) return;
    }
    for (VirtualFile root : ModuleRootManager.getInstance(module).getSourceRoots(JavaSourceRootType.SOURCE)) {
      if (!processor.process(root)) return;
    }
  }
private static void processModuleSourceRoots(@NotNull Module module, Processor<VirtualFile> processor)