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