@Override
  public PackagingElementEntity.Builder<? extends PackagingElementEntity> getOrAddEntityBuilder(@NotNull MutableEntityStorage diff,
                                                                                                @NotNull EntitySource source,
                                                                                                @NotNull Project project) {
    PackagingElementEntity existingEntity = (PackagingElementEntity)this.getExistingEntity(diff);
    if (existingEntity != null) return getBuilder(diff, existingEntity);

    LibraryFilesPackagingElementEntity entity;
    if (myLibraryName == null) {
      entity = diff.addEntity(LibraryFilesPackagingElementEntity.create(source));
    }
    else {
      LibraryId id;
      if (myLevel.equals("module")) {
        id = new LibraryId(myLibraryName, new LibraryTableId.ModuleLibraryTableId(new ModuleId(myModuleName)));
      }
      else if (myLevel.equals("project")) {
        id = new LibraryId(myLibraryName, LibraryTableId.ProjectLibraryTableId.INSTANCE);
      }
      else {
        id = new LibraryId(myLibraryName, new LibraryTableId.GlobalLibraryTableId(myLevel));
      }
      entity = diff.addEntity(LibraryFilesPackagingElementEntity.create(source, o -> {
        o.setLibrary(id);
        return Unit.INSTANCE;
      }));
    }
    diff.getMutableExternalMapping(PackagingExternalMapping.key).addMapping(entity, this);
    return getBuilder(diff, entity);
  }
@Override
  public PackagingElementEntity.Builder<? extends PackagingElementEntity> getOrAddEntityBuilder(@NotNull MutableEntityStorage diff,
                                                                                                @NotNull EntitySource source,
                                                                                                @NotNull Project project)