Fix in MCStXSnapshotPreWriteTransformation: do not fix extension cstegory if the prefix in OK. expecco_2_7_0 expecco_2_7_0_49 expecco_2_7_5 expecco_2_7_5a
authorJan Vrany <jan.vrany@fit.cvut.cz>
Sat, 01 Nov 2014 01:21:08 +0100
changeset 936 c4564a0396b9
parent 935 5e40fb19c435
child 937 8cbc9884f0cd
Fix in MCStXSnapshotPreWriteTransformation: do not fix extension cstegory if the prefix in OK. ...otherwise package category is lost when exporting previously imported .mcz. Thanks JK for spotting this.
MCStXSnapshotPreWriteTransformation.st
--- a/MCStXSnapshotPreWriteTransformation.st	Sat Nov 01 01:05:26 2014 +0100
+++ b/MCStXSnapshotPreWriteTransformation.st	Sat Nov 01 01:21:08 2014 +0100
@@ -166,16 +166,21 @@
 
 visitMethodDefinition: definition
     (self isExtensionMethodDefinition: definition) ifTrue:[
-        extensionMethodCategoryMap add:
-            (Array 
-                with: definition className , (definition classIsMeta ifTrue:[' class'] ifFalse:[''])
-                with: definition selector
-                with: definition category).
-        definition category: '*' , self monticelloName.
+        | prefix |
+
+        prefix := '*' , self monticelloName asLowercase.
+        (definition category asLowercase startsWith: prefix) ifFalse:[
+            extensionMethodCategoryMap add:
+                (Array 
+                    with: definition className , (definition classIsMeta ifTrue:[' class'] ifFalse:[''])
+                    with: definition selector
+                    with: definition category).
+            definition category: '*' , self monticelloName.
+        ]
     ].
 
     "Created: / 30-05-2013 / 22:48:36 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-    "Modified: / 31-05-2013 / 00:18:13 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 01-11-2014 / 00:20:54 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 visitOrganizationDefinition: defintion
@@ -195,10 +200,10 @@
 !MCStXSnapshotPreWriteTransformation class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/goodies/monticello/MCStXSnapshotPreWriteTransformation.st,v 1.8 2014-10-05 00:24:12 vrany Exp $'
+    ^ '$Header: /cvs/stx/stx/goodies/monticello/MCStXSnapshotPreWriteTransformation.st,v 1.9 2014-11-01 00:21:08 vrany Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/goodies/monticello/MCStXSnapshotPreWriteTransformation.st,v 1.8 2014-10-05 00:24:12 vrany Exp $'
+    ^ '$Header: /cvs/stx/stx/goodies/monticello/MCStXSnapshotPreWriteTransformation.st,v 1.9 2014-11-01 00:21:08 vrany Exp $'
 ! !