X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.graph%2Fsrc%2Forg%2Fsimantics%2Fgraph%2Frefactoring%2FFixExportedOntology.java;h=27c4b9195522d82291c6374586c0db985d1bfe4b;hb=refs%2Fchanges%2F98%2F1998%2F2;hp=ffe174eb943b236be72e4d1a8f26808070828608;hpb=277b1c7fb3fdd8effb4bf2b447358d0e4ef0e302;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.graph/src/org/simantics/graph/refactoring/FixExportedOntology.java b/bundles/org.simantics.graph/src/org/simantics/graph/refactoring/FixExportedOntology.java index ffe174eb9..27c4b9195 100644 --- a/bundles/org.simantics.graph/src/org/simantics/graph/refactoring/FixExportedOntology.java +++ b/bundles/org.simantics.graph/src/org/simantics/graph/refactoring/FixExportedOntology.java @@ -45,13 +45,14 @@ public class FixExportedOntology { } public static void createTGAndPGraph(Path input) throws Exception { - Path output1 = input.getParent().resolve("graph.tg"); - TransferableGraph1 tg = convertExportedSharedOntologyIntoBundleOntology(input, output1); - String listing = PrettyPrintTG.print(tg, false); String newName = input.getFileName().toString(); if (newName.contains(".")) newName = newName.split("\\.")[0]; - Path output2 = input.getParent().resolve(newName + ".pgraph"); + Path parent = input.getParent(); + Path output1 = parent.resolve(newName + ".tg"); + TransferableGraph1 tg = convertExportedSharedOntologyIntoBundleOntology(input, output1); + String listing = PrettyPrintTG.print(tg, false); + Path output2 = parent.resolve(newName + ".pgraph"); Files.write(output2, listing.getBytes(),StandardOpenOption.CREATE); }