mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-06 03:21:12 +07:00
[Workspace Model] Inlined extension functions related to creation of the ArtifactEntity
GitOrigin-RevId: 33dcf6ce88be7cf4e7f803ac4be94f35b7c860b5
This commit is contained in:
committed by
intellij-monorepo-bot
parent
f04417445d
commit
4ade3683be
@@ -6,13 +6,13 @@ import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.util.JDOMUtil;
|
||||
import com.intellij.packaging.ui.ArtifactEditorContext;
|
||||
import com.intellij.packaging.ui.PackagingElementPresentation;
|
||||
import com.intellij.util.containers.ContainerUtil;
|
||||
import com.intellij.util.xmlb.XmlSerializer;
|
||||
import com.intellij.platform.workspaceModel.storage.*;
|
||||
import com.intellij.platform.workspaceModel.storage.bridgeEntities.CustomPackagingElementEntity;
|
||||
import com.intellij.platform.workspaceModel.storage.bridgeEntities.ExtensionsKt;
|
||||
import com.intellij.platform.workspaceModel.storage.bridgeEntities.PackagingElementEntity;
|
||||
import com.intellij.platform.workspaceModel.storage.impl.VersionedEntityStorageOnBuilder;
|
||||
import com.intellij.util.containers.ContainerUtil;
|
||||
import com.intellij.util.xmlb.XmlSerializer;
|
||||
import kotlin.Unit;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@@ -80,7 +80,10 @@ public abstract class PackagingElement<S> implements PersistentStateComponent<S>
|
||||
}
|
||||
|
||||
CustomPackagingElementEntity addedEntity =
|
||||
ExtensionsKt.addCustomPackagingElementEntity(diff, this.getType().getId(), xmlTag, children, source);
|
||||
diff.addEntity(CustomPackagingElementEntity.create(this.getType().getId(), xmlTag, source, builder -> {
|
||||
builder.setChildren(children);
|
||||
return Unit.INSTANCE;
|
||||
}));
|
||||
|
||||
diff.getMutableExternalMapping("intellij.artifacts.packaging.elements").addMapping(addedEntity, this);
|
||||
return addedEntity;
|
||||
|
||||
Reference in New Issue
Block a user