extensions.st
changeset 975 9d3047664305
parent 943 020cfc28a757
child 995 92bb466548a9
child 1041 4e3b40303d42
equal deleted inserted replaced
974:c7dccf72f591 975:9d3047664305
   165         ^ cats anElement
   165         ^ cats anElement
   166     ].
   166     ].
   167     cats isEmpty ifTrue:[
   167     cats isEmpty ifTrue:[
   168         ^ 'Misc_Changes'
   168         ^ 'Misc_Changes'
   169     ].
   169     ].
   170     longest := cats inject:cats anElement
   170     longest := cats 
       
   171             inject:cats anElement
   171             into:[:cat :each | 
   172             into:[:cat :each | 
   172                 each size > cat size ifTrue:[
   173                 each size > cat size ifTrue:[
   173                     each
   174                     each
   174                 ] ifFalse:[ cat ]
   175                 ] ifFalse:[ cat ]
   175             ].
   176             ].
       
   177 
   176     prefix := ''.
   178     prefix := ''.
   177     [
   179     [
   178         (index := longest indexOf:$- startingAt:prefix size + 2) ~~ 0
   180         (index := longest indexOf:$- startingAt:prefix size + 2) ~~ 0
   179     ] whileTrue:[
   181     ] whileTrue:[
   180         prefix := longest copyTo:index - 1.
   182         prefix := longest copyTo:index - 1.
   183         ].
   185         ].
   184     ].
   186     ].
   185     nm notNil ifTrue:[
   187     nm notNil ifTrue:[
   186         ^ nm
   188         ^ nm
   187     ].
   189     ].
   188     self 
   190     ^ self package asString copyReplaceAny:':/' with:$_.
   189         error:'Cannot infer Monticello package name from class categories. Please define #mcName explicitly'
   191 
       
   192 "/    self 
       
   193 "/        error:'Cannot infer Monticello package name from class categories. Please define #mcName explicitly'
   190 
   194 
   191     "Created: / 29-05-2013 / 01:36:48 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   195     "Created: / 29-05-2013 / 01:36:48 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   192     "Modified: / 23-06-2013 / 21:12:40 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   196     "Modified: / 23-06-2013 / 21:12:40 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   193 ! !
   197 ! !
   194 
   198 
   468 ! !
   472 ! !
   469 
   473 
   470 !stx_goodies_monticello class methodsFor:'documentation'!
   474 !stx_goodies_monticello class methodsFor:'documentation'!
   471 
   475 
   472 extensionsVersion_CVS
   476 extensionsVersion_CVS
   473     ^ '$Header: /cvs/stx/stx/goodies/monticello/extensions.st,v 1.26 2014-12-21 13:07:31 cg Exp $'
   477     ^ '$Header: /cvs/stx/stx/goodies/monticello/extensions.st,v 1.27 2015-02-25 00:14:48 cg Exp $'
   474 ! !
   478 ! !
   475 
   479