MPS-27804 - change incorrect dependencies to "Extends"
[mps/mps.git] / convert.sh
1 #!/bin/bash
2 for fl in $(find ./ -type f -iname "*.java")
3 do
4   echo $fl
5   sed -i '' \
6      -e 's/import jetbrains\.mps\.smodel\.SNode;/import org\.jetbrains\.mps\.openapi\.model\.SNode;/g' \
7      -e 's/import jetbrains\.mps\.smodel\.\*;/import org\.jetbrains\.mps\.openapi\.model\.SNode;import jetbrains\.mps\.smodel\.\*;/g' \
8      -e 's/package jetbrains\.mps\.smodel;/package jetbrains\.mps\.smodel;import org\.jetbrains\.mps\.openapi\.model\.SNode;/g' \
9      -e 's/new SNode(/new jetbrains\.mps\.smodel\.SNode(/g' \
10 \
11      -e 's/import jetbrains\.mps\.smodel\.SNodeId;/import org\.jetbrains\.mps\.openapi\.model\.SNodeId;/g' \
12      -e 's/import jetbrains\.mps\.smodel\.\*;/import org\.jetbrains\.mps\.openapi\.model\.SNodeId;import jetbrains\.mps\.smodel\.\*;/g' \
13      -e 's/package jetbrains\.mps\.smodel;/package jetbrains\.mps\.smodel;import org\.jetbrains\.mps\.openapi\.model\.SNodeId;/g' \
14      -e 's/\([^\.]\)SNodeId\.Regular/\1jetbrains\.mps\.smodel\.SNodeId\.Regular/g' \
15      -e 's/\([^\.]\)SNodeId\.Foreign/\1jetbrains\.mps\.smodel\.SNodeId\.Foreign/g' \
16      -e 's/SNodeId\.fromString(/jetbrains\.mps\.smodel\.SNodeId\.fromString(/g' \
17      -e 's/SNodeId\.toString(/jetbrains\.mps\.smodel\.SNodeId\.toString(/g' \
18 \
19      -e 's/import jetbrains\.mps\.smodel\.SNodePointer;/import org\.jetbrains\.mps\.openapi\.model\.SNodeReference;/g' \
20      -e 's/import jetbrains\.mps\.smodel\.\*;/import org\.jetbrains\.mps\.openapi\.model\.SNodeReference;import jetbrains\.mps\.smodel\.\*;/g' \
21      -e 's/package jetbrains\.mps\.smodel;/package jetbrains\.mps\.smodel;import org\.jetbrains\.mps\.openapi\.model\.SNodeReference;/g' \
22      -e 's/SNodePointer\.serialize(/jetbrains\.mps\.smodel\.SNodePointer\.serialize(/g' \
23      -e 's/SNodePointer\.deserialize(/jetbrains\.mps\.smodel\.SNodePointer\.deserialize(/g' \
24      -e 's/new SNodePointer(/new jetbrains\.mps\.smodel\.SNodePointer(/g' \
25      -e 's/\([^\.a-zA-Z]\)SNodePointer/\1SNodeReference/g' \
26 \
27      -e 's/import jetbrains\.mps\.smodel\.SReference;/import org\.jetbrains\.mps\.openapi\.model\.SReference;/g' \
28      -e 's/import jetbrains\.mps\.smodel\.\*;/import org\.jetbrains\.mps\.openapi\.model\.SReference;import jetbrains\.mps\.smodel\.\*;/g' \
29      -e 's/package jetbrains\.mps\.smodel;/package jetbrains\.mps\.smodel;import org\.jetbrains\.mps\.openapi\.model\.SReference;/g' \
30      -e 's/SReference\.enableLogging(/jetbrains\.mps\.smodel\.SReference\.enableLogging(/g' \
31      -e 's/SReference\.disableLogging(/jetbrains\.mps\.smodel\.SReference\.disableLogging(/g' \
32      -e 's/SReference\.create(/jetbrains\.mps\.smodel\.SReference\.create(/g' \
33      -e 's/\([^\.]\)SReference\.ProblemDescription/\1jetbrains\.mps\.smodel\.SReference\.ProblemDescription/g' \
34 \
35      -e 's/import jetbrains\.mps\.smodel\.SModelId;/import org\.jetbrains\.mps\.openapi\.model\.SModelId;/g' \
36      -e 's/import jetbrains\.mps\.smodel\.\*;/import org\.jetbrains\.mps\.openapi\.model\.SModelId;import jetbrains\.mps\.smodel\.\*;/g' \
37      -e 's/package jetbrains\.mps\.smodel;/package jetbrains\.mps\.smodel;import org\.jetbrains\.mps\.openapi\.model\.SModelId;/g' \
38      -e 's/\([^\.]\)SModelId\.RegularSModelId/\1jetbrains\.mps\.smodel\.SModelId\.RegularSModelId/g' \
39      -e 's/\([^\.]\)SModelId\.ForeignSModelId/\1jetbrains\.mps\.smodel\.SModelId\.ForeignSModelId/g' \
40      -e 's/SModelId\.fromString(/jetbrains\.mps\.smodel\.SModelId\.fromString(/g' \
41      -e 's/SModelId\.foreign(/jetbrains\.mps\.smodel\.SModelId\.foreign(/g' \
42      -e 's/SModelId\.regular(/jetbrains\.mps\.smodel\.SModelId\.regular(/g' \
43      -e 's/SModelId\.generate(/jetbrains\.mps\.smodel\.SModelId\.generate(/g' \
44 \
45      -e 's/import jetbrains\.mps\.smodel\.SModel;/import org\.jetbrains\.mps\.openapi\.model\.SModel;/g' \
46      -e 's/import jetbrains\.mps\.smodel\.\*;/import org\.jetbrains\.mps\.openapi\.model\.SModel;import jetbrains\.mps\.smodel\.\*;/g' \
47      -e 's/package jetbrains\.mps\.smodel;/package jetbrains\.mps\.smodel;import org\.jetbrains\.mps\.openapi\.model\.SModel;/g' \
48      -e 's/new SModel(/new jetbrains\.mps\.smodel\.SModel(/g' \
49      -e 's/\([^\.]\)SModel\.ImportElement/\1jetbrains\.mps\.smodel\.SModel\.ImportElement/g' \
50      -e 's/(ABCDE)/(jetbrains\.mps\.smodel\.SModel)/g' \
51 \
52      -e 's/import jetbrains\.mps\.smodel\.SModelDescriptor;/import org\.jetbrains\.mps\.openapi\.model\.SModel;/g' \
53      -e 's/import jetbrains\.mps\.smodel\.\*;/import org\.jetbrains\.mps\.openapi\.model\.SModel;import jetbrains\.mps\.smodel\.\*;/g' \
54      -e 's/package jetbrains\.mps\.smodel;/package jetbrains\.mps\.smodel;import org\.jetbrains\.mps\.openapi\.model\.SModel;/g' \
55      -e 's/implements SModelDescriptor/implements jetbrains\.mps\.smodel\.SModelDescriptor/g' \
56      -e 's/\([^a-zA-Z\.]\)SModelDescriptor\([^a-zA-Z]\)/\1SModel\2/g' \
57 \
58      -e 's/import jetbrains\.mps\.smodel\.SModelReference;/import org\.jetbrains\.mps\.openapi\.model\.SModelReference;/g' \
59      -e 's/import jetbrains\.mps\.smodel\.\*;/import org\.jetbrains\.mps\.openapi\.model\.SModelReference;import jetbrains\.mps\.smodel\.\*;/g' \
60      -e 's/package jetbrains\.mps\.smodel;/package jetbrains\.mps\.smodel;import org\.jetbrains\.mps\.openapi\.model\.SModelReference;/g' \
61      -e 's/SModelReference\.fromString(/jetbrains\.mps\.smodel\.SModelReference\.fromString(/g' \
62      -e 's/SModelReference\.fromPath(/jetbrains\.mps\.smodel\.SModelReference\.fromPath(/g' \
63      -e 's/new SModelReference(/new jetbrains\.mps\.smodel\.SModelReference(/g' \
64 \
65      -e 's/import jetbrains\.mps\.project\.structure\.modules\.ModuleReference;/import org\.jetbrains\.mps\.openapi\.module\.SModuleReference;/g' \
66      -e 's/import jetbrains\.mps\.project\.structure\.modules\.\*;/import org\.jetbrains\.mps\.openapi\.module\.SModuleReference;import jetbrains\.mps\.project\.structure\.modules\.\*;/g' \
67      -e 's/package jetbrains\.mps\.project\.structure\.modules;/package jetbrains\.mps\.project\.structure\.modules;import org\.jetbrains\.mps\.openapi\.module\.SModuleReference;/g' \
68      -e 's/ModuleReference\.fromString(/jetbrains\.mps\.project\.structure\.modules\.ModuleReference\.fromString(/g' \
69      -e 's/ModuleReference\.create(/jetbrains\.mps\.project\.structure\.modules\.ModuleReference\.create(/g' \
70      -e 's/ModuleReference\.differs(/jetbrains\.mps\.project\.structure\.modules\.ModuleReference\.differs(/g' \
71      -e 's/ModuleReference\.update(/jetbrains\.mps\.project\.structure\.modules\.ModuleReference\.update(/g' \
72      -e 's/new ModuleReference(/new jetbrains\.mps\.project\.structure\.modules\.ModuleReference(/g' \
73      -e 's/\([^\.a-zA-Z]\)ModuleReference/\1SModuleReference/g' \
74 \
75      -e 's/import jetbrains\.mps\.project\.IModule;/import org\.jetbrains\.mps\.openapi\.module\.SModule;/g' \
76      -e 's/import jetbrains\.mps\.project\.\*;/import org\.jetbrains\.mps\.openapi\.module\.SModule;import jetbrains\.mps\.project\.\*;/g' \
77      -e 's/package jetbrains\.mps\.project;/package jetbrains\.mps\.project;import org\.jetbrains\.mps\.openapi\.module\.SModule;/g' \
78      -e 's/\([^\.a-zA-Z]\)IModule/\1SModule/g' \
79 $fl
80 done