X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.project%2Fsrc%2Forg%2Fsimantics%2Fproject%2Fmanagement%2FGraphBundleEx.java;fp=bundles%2Forg.simantics.project%2Fsrc%2Forg%2Fsimantics%2Fproject%2Fmanagement%2FGraphBundleEx.java;h=450d7808f36d89c19c035eeb5cf369fc1daeecc8;hp=f90896fa1d939ba459cd42c785c7cad1de1aabd6;hb=b913419ca9037bf9734c56a5f079024c3a1cd177;hpb=a8d030f7db1f59a5b51cdc34f18de7c0a0ee8549 diff --git a/bundles/org.simantics.project/src/org/simantics/project/management/GraphBundleEx.java b/bundles/org.simantics.project/src/org/simantics/project/management/GraphBundleEx.java index f90896fa1..450d7808f 100644 --- a/bundles/org.simantics.project/src/org/simantics/project/management/GraphBundleEx.java +++ b/bundles/org.simantics.project/src/org/simantics/project/management/GraphBundleEx.java @@ -13,6 +13,7 @@ package org.simantics.project.management; import java.text.SimpleDateFormat; import java.util.Date; +import java.util.function.Supplier; import org.eclipse.equinox.p2.metadata.IVersionedId; import org.eclipse.equinox.p2.metadata.Version; @@ -60,6 +61,7 @@ public class GraphBundleEx extends GraphBundle implements IVersionedId { VersionedId vid; GraphBundleEx(GraphBundle e) { + this.graphSource = e.graphSource; this.graph = e.graph; this.resource = e.resource; this.hashcode = e.hashcode; @@ -106,6 +108,14 @@ public class GraphBundleEx extends GraphBundle implements IVersionedId { this.immutable = isImmutable; } + public GraphBundleEx(String name, Supplier source, int hashValue, IVersionedId vid, boolean isImmutable) + throws RuntimeBindingException + { + super(name, source, hashValue, vid.getId(), vid.getVersion().getSegment(0).toString()+"."+vid.getVersion().getSegment(1).toString()+"."+vid.getVersion().getSegment(2).toString()+"."+vid.getVersion().getSegment(3).toString()); + this.vid = new VersionedId(id, vid.getVersion()); + this.immutable = isImmutable; + } + public GraphBundleEx(String name, TransferableGraph1 data, IVersionedId vid) throws RuntimeBindingException {