]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.graph/src/org/simantics/graph/refactoring/GraphRefactoringUtils.java
Make prettyPrintTG available via SCL from Simantics/DB-module
[simantics/platform.git] / bundles / org.simantics.graph / src / org / simantics / graph / refactoring / GraphRefactoringUtils.java
index 9f8eca398f139c10a5a18801522230427fa29f08..90b134e33762b5f991baa5288a2974906f2bad7b 100644 (file)
@@ -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;
+
                 }
             }
         }