void (byte[] content) { try { VirtualFile existingSourcesFolder = sources; if (existingSourcesFolder == null) { existingSourcesFolder = artifactDir.createChildDirectory(this, "sources"); } VirtualFile srcFile = existingSourcesFolder.createChildData(this, sourceFileName); srcFile.setBinaryContent(content); addSourceFile(JarFileSystem.getInstance().getJarRootForLocalFile(srcFile), library); } catch (IOException e) { String message = JavaUiBundle.message("error.message.failed.to.save.0", artifactDir.getPath() + "/sources/" + sourceFileName); new Notification(myMessageGroupId, JavaUiBundle.message("notification.title.io.error"), message, NotificationType.ERROR).notify(myProject); LOG.warn(e); } }