X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;ds=sidebyside;f=bundles%2Forg.simantics.graph%2Fsrc%2Forg%2Fsimantics%2Fgraph%2Frepresentation%2FTransferableGraphUtils.java;h=8ee29cc953a3eacc745edb77ad1854ce6ac3b56c;hb=687435a49e86496511f8e92ff743211cb191838a;hp=10637ad65caf0d861d52e3d1adfffdee66d5f2ca;hpb=a3eb5a6a3c7732b953c57558cdff8e82ae743227;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.graph/src/org/simantics/graph/representation/TransferableGraphUtils.java b/bundles/org.simantics.graph/src/org/simantics/graph/representation/TransferableGraphUtils.java index 10637ad65..8ee29cc95 100644 --- a/bundles/org.simantics.graph/src/org/simantics/graph/representation/TransferableGraphUtils.java +++ b/bundles/org.simantics.graph/src/org/simantics/graph/representation/TransferableGraphUtils.java @@ -57,6 +57,10 @@ public class TransferableGraphUtils { External ext = (External)id.definition; if(ext.name.equals(name) && ext.parent == parent) return id; } + else if(id.definition instanceof Optional) { + Optional ext = (Optional)id.definition; + if(ext.name.equals(name) && ext.parent == parent) return id; + } } return null; @@ -309,6 +313,9 @@ public class TransferableGraphUtils { } else if (definition instanceof Internal) { Internal def = (Internal)definition; return getURI(identities, def.parent) + "/" + def.name; + } else if (definition instanceof Optional) { + Optional def = (Optional)definition; + return getURI(identities, def.parent) + "/" + def.name; } else { return ""; } @@ -344,6 +351,9 @@ public class TransferableGraphUtils { } else if (definition instanceof Internal) { Internal def = (Internal)definition; return getURI(resourceCount, identities, def.parent) + "/" + URIStringUtils.escape(def.name); + } else if (definition instanceof Optional) { + Optional def = (Optional)definition; + return getURI(resourceCount, identities, def.parent) + "/" + URIStringUtils.escape(def.name); } else { return ""; }