void (Project project, List<? extends VirtualFile> files, Artifact[] artifacts, final @NotNull Runnable onFinishedInAwt) { startPackagingFiles(project, files, artifacts, true).doWhenProcessed( () -> ApplicationManager.getApplication().invokeLater(onFinishedInAwt)); }