]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.graph/tests/org/simantics/graph/tests/refactoring/TestRefactoring.java
(refs #7215) Preserve identity types in NamespaceMigrationStep
[simantics/platform.git] / bundles / org.simantics.graph / tests / org / simantics / graph / tests / refactoring / TestRefactoring.java
1 package org.simantics.graph.tests.refactoring;
2
3 import java.io.File;
4 import java.net.URLDecoder;
5
6 import org.simantics.graph.refactoring.PrintReferencesTool;
7 import org.simantics.graph.refactoring.RefactoringTool;
8
9 public class TestRefactoring {
10
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");
17         
18         System.out.println("-- Before refactoring");
19         System.out.println("------------------------------------------");
20         PrintReferencesTool.print(input);
21         
22         RefactoringTool.refactor(mappingSpec, input, output);
23         
24         System.out.println("-- After refactoring");
25         System.out.println("------------------------------------------");
26         PrintReferencesTool.print(output);
27     }
28     
29 }