Moving package extension methods into new package

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Moving package extension methods into new package

Sean P. DeNigris
Administrator
I wanted to move all the extension methods from a package into another package. I came up with the following. Is there a better way?

oldPackageName := 'LivingCode-bdd extensions'.
newPackageName := 'BDDExtensions'.
package := PackageInfo named: oldPackageName.
extendedClasses := package extensionMethods collect: [ :e | e methodClass ] as: Set.
extendedClasses do: [ :c | c organization renameCategory: '*', oldPackageName toBe: '*', newPackageName ].
Cheers,
Sean