X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.project%2Fsrc%2Forg%2Fsimantics%2Fproject%2Fmanagement%2FGraphBundleEx.java;h=450d7808f36d89c19c035eeb5cf369fc1daeecc8;hb=5b6358d87458715cad02d51ee5cd944814d1db4a;hp=f90896fa1d939ba459cd42c785c7cad1de1aabd6;hpb=0ae2b770234dfc3cbb18bd38f324125cf0faca07;p=simantics%2Fplatform.git 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 {