From cdfd997cc5118a9fb08a73f35c6f7306308abd86 Mon Sep 17 00:00:00 2001 From: Jussi Koskela Date: Thu, 9 Aug 2018 13:22:16 +0300 Subject: [PATCH] Use given base name when exporting tg file along with shared library gitlab #79 Change-Id: I7cec6fe1546475a40de09514d8aeb8b219b290fa --- .../simantics/graph/refactoring/FixExportedOntology.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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); } -- 2.47.1