]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.graph/src/org/simantics/graph/refactoring/PrintReferencesTool.java
(refs #7216) Removed OldTransferableGraph1 and all referring code
[simantics/platform.git] / bundles / org.simantics.graph / src / org / simantics / graph / refactoring / PrintReferencesTool.java
diff --git a/bundles/org.simantics.graph/src/org/simantics/graph/refactoring/PrintReferencesTool.java b/bundles/org.simantics.graph/src/org/simantics/graph/refactoring/PrintReferencesTool.java
deleted file mode 100644 (file)
index d980692..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-package org.simantics.graph.refactoring;
-
-import gnu.trove.map.hash.THashMap;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Collections;
-
-import org.simantics.databoard.Files;
-import org.simantics.graph.query.TransferableGraphConversion;
-import org.simantics.graph.representation.old.OldTransferableGraph1;
-import org.simantics.graph.store.IdentityStore;
-import org.simantics.graph.store.IdentityStore.ConsistsOf;
-
-public class PrintReferencesTool {
-
-    public static void main(String[] args) throws Exception {
-        print(new File(args[0]));
-    }
-    
-    public static void print(File input) throws IOException {
-        OldTransferableGraph1 tg = (OldTransferableGraph1)
-                Files.readFile(input, OldTransferableGraph1.BINDING);
-        GraphRefactoringUtils.fixIncorrectRoot(tg.identities);
-        IdentityStore idStore = TransferableGraphConversion.extractIdentities(tg);
-        printExternals(idStore, idStore.getRoot(""), 0);
-    }
-
-    private static void printExternals(IdentityStore idStore, int cur, int indentation) {
-        THashMap<String, ConsistsOf> map = idStore.getChildMap(cur);
-        if(map == null)
-            return;
-        ArrayList<String> names = new ArrayList<String>(map.keySet());
-        Collections.sort(names);
-        for(String name : names) {
-            ConsistsOf co = map.get(name);
-            if(!idStore.isNewResource(co.child)) {
-                for(int i=0;i<indentation;++i)
-                    System.out.print("    ");
-                System.out.println(name);
-                printExternals(idStore, co.child, indentation+1);
-            }
-        }
-    }
-    
-}