WorkspaceEntity (@NotNull MutableEntityStorage diff, @NotNull EntitySource source, @NotNull Project project) { WorkspaceEntity existingEntity = this.getExistingEntity(diff); if (existingEntity != null) return existingEntity; List<PackagingElementEntity> children = ContainerUtil.map(this.getChildren(), o -> { return (PackagingElementEntity)o.getOrAddEntity(diff, source, project); }); Objects.requireNonNull(myArchiveFileName, "archiveFileName is not specified"); var entity = diff.addEntity(ArchivePackagingElementEntity.create(myArchiveFileName, source, entityBuilder -> { entityBuilder.setChildren(children); return Unit.INSTANCE; })); diff.getMutableExternalMapping("intellij.artifacts.packaging.elements").addMapping(entity, this); return entity; }