1058 RBTransformationRule isNil ifTrue:[ |
1058 RBTransformationRule isNil ifTrue:[ |
1059 Smalltalk loadPackage:'stx:goodies/refactoryBrowser/lint'. |
1059 Smalltalk loadPackage:'stx:goodies/refactoryBrowser/lint'. |
1060 ]. |
1060 ]. |
1061 |
1061 |
1062 rules isNil ifTrue:[ |
1062 rules isNil ifTrue:[ |
1063 |knownRules separator1 separator2 separator3| |
1063 |knownRules separator1 separator2 separator3 veryLightRed veryLightGreen| |
|
1064 |
|
1065 veryLightRed := Color red lightened lightened lightened. |
|
1066 veryLightGreen := Color green lightened lightened lightened. |
1064 |
1067 |
1065 "/ construct a pseudo list from existing transformation rules |
1068 "/ construct a pseudo list from existing transformation rules |
1066 separator1 := '----------- search for:' withColor:Color grey. |
1069 separator1 := '----------- search for:' allGray. |
1067 separator2 := '----------- replace by:' withColor:Color grey. |
1070 separator2 := '----------- replace by:' allGray. |
1068 separator3 := '\=================================================================================\' withCRs withColor:Color grey. |
1071 separator3 := '\=================================================================================\' withCRs allGray. |
1069 |
1072 |
1070 knownRules := OrderedCollection new. |
1073 knownRules := OrderedCollection new. |
1071 (RBTransformationRule allSubclasses asNewOrderedCollection sort:[:a :b | a basicNew name < b basicNew name]) |
1074 (RBTransformationRule allSubclasses asNewOrderedCollection sort:[:a :b | a basicNew name < b basicNew name]) |
1072 do:[:each | |
1075 do:[:each | |
1073 |rule | |
1076 |rule| |
1074 |
1077 |
1075 rule := each new. |
1078 rule := each new. |
1076 knownRules add:{ rule . |
1079 knownRules add:{ rule . |
1077 (rule rewriteRule searches |
1080 (rule rewriteRule searches |
1078 collectAll:[:each | |
1081 collectAll:[:each | |
1079 { |
1082 { |
1080 separator1. |
1083 separator1. |
1081 each searchString |
1084 each searchString |
1082 asText backgroundColorizeAllWith:(Color red lightened lightened lightened) . |
1085 asText backgroundColorizeAllWith:veryLightRed . |
1083 separator2. |
1086 separator2. |
1084 each replaceString asText |
1087 each replaceString asText |
1085 asText backgroundColorizeAllWith:(Color green lightened lightened lightened) . |
1088 asText backgroundColorizeAllWith:veryLightGreen . |
1086 separator3 |
1089 separator3 |
1087 } |
1090 } |
1088 ] |
1091 ] |
1089 ) asStringCollection asString. |
1092 ) asStringCollection asString. |
1090 } |
1093 } |