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