void (@NotNull File sourcesJar, @NotNull List<? extends LibraryOrderEntry> orderEntries) { ApplicationManager.getApplication() .invokeLater(() -> { final Set<Library> libraries = new HashSet<>(); for (LibraryOrderEntry orderEntry : orderEntries) { ContainerUtil.addIfNotNull(libraries, orderEntry.getLibrary()); } attachSourceJar(sourcesJar, libraries); }); }