protected @NotNull PackagingElementEntity getThisEntity() {
    assert myStorage != null;
    EntityStorage base = myStorage.getBase();
    ExternalEntityMapping<PackagingElement<?>> externalMapping = base.getExternalMapping(PackagingExternalMapping.key);
    PackagingElementEntity entity = (PackagingElementEntity)externalMapping.getFirstEntity(this);
    if (entity == null) {
      throw new RuntimeException("Cannot find an entity");
    }
    return entity;
  }
protected @NotNull PackagingElementEntity getThisEntity()