X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.graph%2Fsrc%2Forg%2Fsimantics%2Fgraph%2Frefactoring%2FGraphRefactoringUtils.java;h=90b134e33762b5f991baa5288a2974906f2bad7b;hp=9f8eca398f139c10a5a18801522230427fa29f08;hb=1cc487c3f6cf4b46b1fdd727183a9483e3bc05bb;hpb=91ba8d0c58a5dbcaa5d17ca9f8e00b74ad5740e9 diff --git a/bundles/org.simantics.graph/src/org/simantics/graph/refactoring/GraphRefactoringUtils.java b/bundles/org.simantics.graph/src/org/simantics/graph/refactoring/GraphRefactoringUtils.java index 9f8eca398..90b134e33 100644 --- a/bundles/org.simantics.graph/src/org/simantics/graph/refactoring/GraphRefactoringUtils.java +++ b/bundles/org.simantics.graph/src/org/simantics/graph/refactoring/GraphRefactoringUtils.java @@ -128,6 +128,22 @@ public class GraphRefactoringUtils { return; + } else if (ext.type.startsWith("http://")) { + String first = "http://Projects/Development Project"; + Identity path = recursePath(tg, first); + id.definition = new Internal(path.resource, ext.name); + + GraphStore store = TransferableGraphConversion.convert(tg); + int rootId = store.identities.createPathToId(UriUtils.uriToPath(first + "/" + ext.name)); + propagateNewMarks(store.identities, rootId); + + TransferableGraph1 tgNew = TransferableGraphConversion.convert(store); + + tg.resourceCount = tgNew.resourceCount; + tg.identities = tgNew.identities; + tg.values = tgNew.values; + tg.statements = tgNew.statements; + } } }