X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.graph%2Ftests%2Forg%2Fsimantics%2Fgraph%2Ftests%2Frefactoring%2FTestRefactoring.java;h=f7c7cb172b60b695ddc8c3ac523b867a36cc2173;hp=53dd2df9944608c3766a7bc99518d7331c8d8c4e;hb=a51d73068762e87d514532103bd13ff4e67347e7;hpb=969bd23cab98a79ca9101af33334000879fb60c5 diff --git a/bundles/org.simantics.graph/tests/org/simantics/graph/tests/refactoring/TestRefactoring.java b/bundles/org.simantics.graph/tests/org/simantics/graph/tests/refactoring/TestRefactoring.java index 53dd2df99..f7c7cb172 100644 --- a/bundles/org.simantics.graph/tests/org/simantics/graph/tests/refactoring/TestRefactoring.java +++ b/bundles/org.simantics.graph/tests/org/simantics/graph/tests/refactoring/TestRefactoring.java @@ -1,29 +1,29 @@ -package org.simantics.graph.tests.refactoring; - -import java.io.File; -import java.net.URLDecoder; - -import org.simantics.graph.refactoring.PrintReferencesTool; -import org.simantics.graph.refactoring.RefactoringTool; - -public class TestRefactoring { - - public static void main(String[] args) throws Exception { - File dir = new File(URLDecoder.decode(TestRefactoring.class.getResource(".").getPath(), "UTF-8")).getAbsoluteFile();// new File(TestRefactoring.class.getResource(".").getFile()); - System.out.println(dir); - File input = new File(dir, "xor5.aprosSymbol"); - File mappingSpec = new File(dir, "mappingSpec.txt"); - File output = new File(dir, "xor5_refactored.aprosSymbol"); - - System.out.println("-- Before refactoring"); - System.out.println("------------------------------------------"); - PrintReferencesTool.print(input); - - RefactoringTool.refactor(mappingSpec, input, output); - - System.out.println("-- After refactoring"); - System.out.println("------------------------------------------"); - PrintReferencesTool.print(output); - } - -} +package org.simantics.graph.tests.refactoring; + +import java.io.File; +import java.net.URLDecoder; + +import org.simantics.graph.refactoring.PrintReferencesTool; +import org.simantics.graph.refactoring.RefactoringTool; + +public class TestRefactoring { + + public static void main(String[] args) throws Exception { + File dir = new File(URLDecoder.decode(TestRefactoring.class.getResource(".").getPath(), "UTF-8")).getAbsoluteFile();// new File(TestRefactoring.class.getResource(".").getFile()); + System.out.println(dir); + File input = new File(dir, "xor5.aprosSymbol"); + File mappingSpec = new File(dir, "mappingSpec.txt"); + File output = new File(dir, "xor5_refactored.aprosSymbol"); + + System.out.println("-- Before refactoring"); + System.out.println("------------------------------------------"); + PrintReferencesTool.print(input); + + RefactoringTool.refactor(mappingSpec, input, output); + + System.out.println("-- After refactoring"); + System.out.println("------------------------------------------"); + PrintReferencesTool.print(output); + } + +}