1 package org.simantics.graph.tests.refactoring;
\r
4 import java.net.URLDecoder;
\r
6 import org.simantics.graph.refactoring.PrintReferencesTool;
\r
7 import org.simantics.graph.refactoring.RefactoringTool;
\r
9 public class TestRefactoring {
\r
11 public static void main(String[] args) throws Exception {
\r
12 File dir = new File(URLDecoder.decode(TestRefactoring.class.getResource(".").getPath(), "UTF-8")).getAbsoluteFile();// new File(TestRefactoring.class.getResource(".").getFile());
\r
13 System.out.println(dir);
\r
14 File input = new File(dir, "xor5.aprosSymbol");
\r
15 File mappingSpec = new File(dir, "mappingSpec.txt");
\r
16 File output = new File(dir, "xor5_refactored.aprosSymbol");
\r
18 System.out.println("-- Before refactoring");
\r
19 System.out.println("------------------------------------------");
\r
20 PrintReferencesTool.print(input);
\r
22 RefactoringTool.refactor(mappingSpec, input, output);
\r
24 System.out.println("-- After refactoring");
\r
25 System.out.println("------------------------------------------");
\r
26 PrintReferencesTool.print(output);
\r