package restructuring

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

package restructuring

Tudor Girba
Hi,

I moved all code from Moose-MondrianScripts to Moose-
MondrianPaintings, and I removed the Moose-MondrianScripts from the  
configuration.

I would like to work slowly on package restructuring. In the  
following, I would like to rename the test packages:

Moose-LAN -> Moose-TestResources-LAN
Famix-LANTests -> Moose-Tests-SmalltalkImporter-LAN
MooseKGB-TestFamix3 -> Moose-Tests-KGB
Moose-KGB-* -> Moose-TestResources-KGB-*
Moose-SmalltalkImporterTests -> Moose-Tests-SmalltalkImporter
Moose-Test-PackageOne -> Moose-TestResources-Reference-PackageOne
Moose-Test-PackageTwo -> Moose-TestResources-Reference-PackageTwo

Cheers,
Doru


--
www.tudorgirba.com

"There are no old things, there are only old ways of looking at them."



_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: package restructuring

Alexandre Bergel
This is indeed necessary

Alexandre

On 28 Aug 2010, at 09:48, Tudor Girba wrote:

> Hi,
>
> I moved all code from Moose-MondrianScripts to Moose-MondrianPaintings, and I removed the Moose-MondrianScripts from the configuration.
>
> I would like to work slowly on package restructuring. In the following, I would like to rename the test packages:
>
> Moose-LAN -> Moose-TestResources-LAN
> Famix-LANTests -> Moose-Tests-SmalltalkImporter-LAN
> MooseKGB-TestFamix3 -> Moose-Tests-KGB
> Moose-KGB-* -> Moose-TestResources-KGB-*
> Moose-SmalltalkImporterTests -> Moose-Tests-SmalltalkImporter
> Moose-Test-PackageOne -> Moose-TestResources-Reference-PackageOne
> Moose-Test-PackageTwo -> Moose-TestResources-Reference-PackageTwo
>
> Cheers,
> Doru
>
>
> --
> www.tudorgirba.com
>
> "There are no old things, there are only old ways of looking at them."
>
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.






_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: package restructuring

Stéphane Ducasse
yes I will do the same soon in pharo.
But time time time time time time

On Aug 28, 2010, at 9:26 PM, Alexandre Bergel wrote:

> This is indeed necessary
>
> Alexandre
>
> On 28 Aug 2010, at 09:48, Tudor Girba wrote:
>
>> Hi,
>>
>> I moved all code from Moose-MondrianScripts to Moose-MondrianPaintings, and I removed the Moose-MondrianScripts from the configuration.
>>
>> I would like to work slowly on package restructuring. In the following, I would like to rename the test packages:
>>
>> Moose-LAN -> Moose-TestResources-LAN
>> Famix-LANTests -> Moose-Tests-SmalltalkImporter-LAN
>> MooseKGB-TestFamix3 -> Moose-Tests-KGB
>> Moose-KGB-* -> Moose-TestResources-KGB-*
>> Moose-SmalltalkImporterTests -> Moose-Tests-SmalltalkImporter
>> Moose-Test-PackageOne -> Moose-TestResources-Reference-PackageOne
>> Moose-Test-PackageTwo -> Moose-TestResources-Reference-PackageTwo
>>
>> Cheers,
>> Doru
>>
>>
>> --
>> www.tudorgirba.com
>>
>> "There are no old things, there are only old ways of looking at them."
>>
>>
>>
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
> --
> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
> Alexandre Bergel  http://www.bergel.eu
> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>
>
>
>
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: package restructuring

Tudor Girba
Hi,

I started to renamed these packages. All tests are green. The thing  
left to do is:
Moose-KGB-* -> Moose-TestResources-KGB-*

When you move these things, it is very tricky when you use the classic  
OB browser because you have to:
- rename the category
- find all extensions and rename the corresponding categories
- add new package
- add repository to new package
- ensure that the old package is empty (including extensions)
- save new package
- save old package

Perhaps O2 is better at this.

And then you should not forget to properly update the Metacello  
configuration :).

Cheers,
Doru


On 29 Aug 2010, at 09:16, Stéphane Ducasse wrote:

> yes I will do the same soon in pharo.
> But time time time time time time
>
> On Aug 28, 2010, at 9:26 PM, Alexandre Bergel wrote:
>
>> This is indeed necessary
>>
>> Alexandre
>>
>> On 28 Aug 2010, at 09:48, Tudor Girba wrote:
>>
>>> Hi,
>>>
>>> I moved all code from Moose-MondrianScripts to Moose-
>>> MondrianPaintings, and I removed the Moose-MondrianScripts from  
>>> the configuration.
>>>
>>> I would like to work slowly on package restructuring. In the  
>>> following, I would like to rename the test packages:
>>>
>>> Moose-LAN -> Moose-TestResources-LAN
>>> Famix-LANTests -> Moose-Tests-SmalltalkImporter-LAN
>>> MooseKGB-TestFamix3 -> Moose-Tests-KGB
>>> Moose-KGB-* -> Moose-TestResources-KGB-*
>>> Moose-SmalltalkImporterTests -> Moose-Tests-SmalltalkImporter
>>> Moose-Test-PackageOne -> Moose-TestResources-Reference-PackageOne
>>> Moose-Test-PackageTwo -> Moose-TestResources-Reference-PackageTwo
>>>
>>> Cheers,
>>> Doru
>>>
>>>
>>> --
>>> www.tudorgirba.com
>>>
>>> "There are no old things, there are only old ways of looking at  
>>> them."
>>>
>>>
>>>
>>> _______________________________________________
>>> Moose-dev mailing list
>>> [hidden email]
>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>
>> --
>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>> Alexandre Bergel  http://www.bergel.eu
>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>
>>
>>
>>
>>
>>
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

--
www.tudorgirba.com

"Reasonable is what we are accustomed with."


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: package restructuring

Stéphane Ducasse
Yes boring

Stef

On Aug 29, 2010, at 9:44 AM, Tudor Girba wrote:

> Hi,
>
> I started to renamed these packages. All tests are green. The thing left to do is:
> Moose-KGB-* -> Moose-TestResources-KGB-*
>
> When you move these things, it is very tricky when you use the classic OB browser because you have to:
> - rename the category
> - find all extensions and rename the corresponding categories
> - add new package
> - add repository to new package
> - ensure that the old package is empty (including extensions)
> - save new package
> - save old package
>
> Perhaps O2 is better at this.
>
> And then you should not forget to properly update the Metacello configuration :).
>
> Cheers,
> Doru
>
>
> On 29 Aug 2010, at 09:16, Stéphane Ducasse wrote:
>
>> yes I will do the same soon in pharo.
>> But time time time time time time
>>
>> On Aug 28, 2010, at 9:26 PM, Alexandre Bergel wrote:
>>
>>> This is indeed necessary
>>>
>>> Alexandre
>>>
>>> On 28 Aug 2010, at 09:48, Tudor Girba wrote:
>>>
>>>> Hi,
>>>>
>>>> I moved all code from Moose-MondrianScripts to Moose-MondrianPaintings, and I removed the Moose-MondrianScripts from the configuration.
>>>>
>>>> I would like to work slowly on package restructuring. In the following, I would like to rename the test packages:
>>>>
>>>> Moose-LAN -> Moose-TestResources-LAN
>>>> Famix-LANTests -> Moose-Tests-SmalltalkImporter-LAN
>>>> MooseKGB-TestFamix3 -> Moose-Tests-KGB
>>>> Moose-KGB-* -> Moose-TestResources-KGB-*
>>>> Moose-SmalltalkImporterTests -> Moose-Tests-SmalltalkImporter
>>>> Moose-Test-PackageOne -> Moose-TestResources-Reference-PackageOne
>>>> Moose-Test-PackageTwo -> Moose-TestResources-Reference-PackageTwo
>>>>
>>>> Cheers,
>>>> Doru
>>>>
>>>>
>>>> --
>>>> www.tudorgirba.com
>>>>
>>>> "There are no old things, there are only old ways of looking at them."
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> Moose-dev mailing list
>>>> [hidden email]
>>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>>
>>> --
>>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>>> Alexandre Bergel  http://www.bergel.eu
>>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>>
>>>
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> Moose-dev mailing list
>>> [hidden email]
>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>
>>
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
> --
> www.tudorgirba.com
>
> "Reasonable is what we are accustomed with."
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: package restructuring

Lukas Renggli
Not if you have a script:

renamePackage: oldPackageName to: newPackageName
        "self renamePackage: 'Seaside-Squeak-Development-Core' to:
'Seaside-Pharo-Development-Core'"
       
        | oldPackage newPackage oldWorkingCopy newWorkingCopy |
        oldPackage := PackageInfo named: oldPackageName.
        newPackage := PackageInfo named: newPackageName.
       
        " rename system categories "
        oldPackage systemCategories do: [ :oldCategory |
                | newCategory |
                newCategory := oldCategory allButFirst: oldPackage systemCategoryPrefix size.
                Smalltalk organization renameCategory: oldCategory toBe: newPackage
systemCategoryPrefix , newCategory ].
       
        " rename method categories "
        oldPackage extensionClasses do: [ :extensionClass |
                (oldPackage extensionCategoriesForClass: extensionClass) do: [ :oldProtocol |
                        | newProtocol |
                        newProtocol := oldProtocol allButFirst: oldPackage methodCategoryPrefix size.
                        extensionClass organization renameCategory: oldProtocol toBe:
newPackage methodCategoryPrefix , newProtocol ] ].
       
        " update monticello packages "
        oldWorkingCopy := MCWorkingCopy forPackage: (MCPackage named: oldPackageName).
        newWorkingCopy := MCWorkingCopy forPackage: (MCPackage named: newPackageName).
        newWorkingCopy repositoryGroup: oldWorkingCopy repositoryGroup; modified: true.
       
        " test is all methos have been caught "
        oldPackage methods isEmpty
                ifTrue: [ oldWorkingCopy unload. PackageOrganizer default
unregisterPackage: oldPackage ]
                ifFalse: [ self error: 'Some code entities remain in the old
package, please migrate manually.' ]

On 29 August 2010 10:35, Stéphane Ducasse <[hidden email]> wrote:

> Yes boring
>
> Stef
>
> On Aug 29, 2010, at 9:44 AM, Tudor Girba wrote:
>
>> Hi,
>>
>> I started to renamed these packages. All tests are green. The thing left to do is:
>> Moose-KGB-* -> Moose-TestResources-KGB-*
>>
>> When you move these things, it is very tricky when you use the classic OB browser because you have to:
>> - rename the category
>> - find all extensions and rename the corresponding categories
>> - add new package
>> - add repository to new package
>> - ensure that the old package is empty (including extensions)
>> - save new package
>> - save old package
>>
>> Perhaps O2 is better at this.
>>
>> And then you should not forget to properly update the Metacello configuration :).
>>
>> Cheers,
>> Doru
>>
>>
>> On 29 Aug 2010, at 09:16, Stéphane Ducasse wrote:
>>
>>> yes I will do the same soon in pharo.
>>> But time time time time time time
>>>
>>> On Aug 28, 2010, at 9:26 PM, Alexandre Bergel wrote:
>>>
>>>> This is indeed necessary
>>>>
>>>> Alexandre
>>>>
>>>> On 28 Aug 2010, at 09:48, Tudor Girba wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> I moved all code from Moose-MondrianScripts to Moose-MondrianPaintings, and I removed the Moose-MondrianScripts from the configuration.
>>>>>
>>>>> I would like to work slowly on package restructuring. In the following, I would like to rename the test packages:
>>>>>
>>>>> Moose-LAN -> Moose-TestResources-LAN
>>>>> Famix-LANTests -> Moose-Tests-SmalltalkImporter-LAN
>>>>> MooseKGB-TestFamix3 -> Moose-Tests-KGB
>>>>> Moose-KGB-* -> Moose-TestResources-KGB-*
>>>>> Moose-SmalltalkImporterTests -> Moose-Tests-SmalltalkImporter
>>>>> Moose-Test-PackageOne -> Moose-TestResources-Reference-PackageOne
>>>>> Moose-Test-PackageTwo -> Moose-TestResources-Reference-PackageTwo
>>>>>
>>>>> Cheers,
>>>>> Doru
>>>>>
>>>>>
>>>>> --
>>>>> www.tudorgirba.com
>>>>>
>>>>> "There are no old things, there are only old ways of looking at them."
>>>>>
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> Moose-dev mailing list
>>>>> [hidden email]
>>>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>>>
>>>> --
>>>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>>>> Alexandre Bergel  http://www.bergel.eu
>>>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> Moose-dev mailing list
>>>> [hidden email]
>>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>>
>>>
>>> _______________________________________________
>>> Moose-dev mailing list
>>> [hidden email]
>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>
>> --
>> www.tudorgirba.com
>>
>> "Reasonable is what we are accustomed with."
>>
>>
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>



--
Lukas Renggli
www.lukas-renggli.ch

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: package restructuring

Tudor Girba
Thanks Lukas!

I used it successfully, so now we should have a better package naming  
for the moose tests and test resources.

Some more todos:
- Rename the two Glamour test packages
- Rename the SmallDude test packages
- Rename DSM packages with the same scheme
- Split Mondrian categories into own packages

I also started to slowly rename a bit the classes to have proper  
prefixes. This will probably take longer :).

Cheers,
Doru


On 29 Aug 2010, at 10:39, Lukas Renggli wrote:

> Not if you have a script:
>
> renamePackage: oldPackageName to: newPackageName
> "self renamePackage: 'Seaside-Squeak-Development-Core' to:
> 'Seaside-Pharo-Development-Core'"
>
> | oldPackage newPackage oldWorkingCopy newWorkingCopy |
> oldPackage := PackageInfo named: oldPackageName.
> newPackage := PackageInfo named: newPackageName.
>
> " rename system categories "
> oldPackage systemCategories do: [ :oldCategory |
> | newCategory |
> newCategory := oldCategory allButFirst: oldPackage  
> systemCategoryPrefix size.
> Smalltalk organization renameCategory: oldCategory toBe: newPackage
> systemCategoryPrefix , newCategory ].
>
> " rename method categories "
> oldPackage extensionClasses do: [ :extensionClass |
> (oldPackage extensionCategoriesForClass: extensionClass) do:  
> [ :oldProtocol |
> | newProtocol |
> newProtocol := oldProtocol allButFirst: oldPackage  
> methodCategoryPrefix size.
> extensionClass organization renameCategory: oldProtocol toBe:
> newPackage methodCategoryPrefix , newProtocol ] ].
>
> " update monticello packages "
> oldWorkingCopy := MCWorkingCopy forPackage: (MCPackage named:  
> oldPackageName).
> newWorkingCopy := MCWorkingCopy forPackage: (MCPackage named:  
> newPackageName).
> newWorkingCopy repositoryGroup: oldWorkingCopy repositoryGroup;  
> modified: true.
>
> " test is all methos have been caught "
> oldPackage methods isEmpty
> ifTrue: [ oldWorkingCopy unload. PackageOrganizer default
> unregisterPackage: oldPackage ]
> ifFalse: [ self error: 'Some code entities remain in the old
> package, please migrate manually.' ]
>
> On 29 August 2010 10:35, Stéphane Ducasse  
> <[hidden email]> wrote:
>> Yes boring
>>
>> Stef
>>
>> On Aug 29, 2010, at 9:44 AM, Tudor Girba wrote:
>>
>>> Hi,
>>>
>>> I started to renamed these packages. All tests are green. The  
>>> thing left to do is:
>>> Moose-KGB-* -> Moose-TestResources-KGB-*
>>>
>>> When you move these things, it is very tricky when you use the  
>>> classic OB browser because you have to:
>>> - rename the category
>>> - find all extensions and rename the corresponding categories
>>> - add new package
>>> - add repository to new package
>>> - ensure that the old package is empty (including extensions)
>>> - save new package
>>> - save old package
>>>
>>> Perhaps O2 is better at this.
>>>
>>> And then you should not forget to properly update the Metacello  
>>> configuration :).
>>>
>>> Cheers,
>>> Doru
>>>
>>>
>>> On 29 Aug 2010, at 09:16, Stéphane Ducasse wrote:
>>>
>>>> yes I will do the same soon in pharo.
>>>> But time time time time time time
>>>>
>>>> On Aug 28, 2010, at 9:26 PM, Alexandre Bergel wrote:
>>>>
>>>>> This is indeed necessary
>>>>>
>>>>> Alexandre
>>>>>
>>>>> On 28 Aug 2010, at 09:48, Tudor Girba wrote:
>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> I moved all code from Moose-MondrianScripts to Moose-
>>>>>> MondrianPaintings, and I removed the Moose-MondrianScripts from  
>>>>>> the configuration.
>>>>>>
>>>>>> I would like to work slowly on package restructuring. In the  
>>>>>> following, I would like to rename the test packages:
>>>>>>
>>>>>> Moose-LAN -> Moose-TestResources-LAN
>>>>>> Famix-LANTests -> Moose-Tests-SmalltalkImporter-LAN
>>>>>> MooseKGB-TestFamix3 -> Moose-Tests-KGB
>>>>>> Moose-KGB-* -> Moose-TestResources-KGB-*
>>>>>> Moose-SmalltalkImporterTests -> Moose-Tests-SmalltalkImporter
>>>>>> Moose-Test-PackageOne -> Moose-TestResources-Reference-PackageOne
>>>>>> Moose-Test-PackageTwo -> Moose-TestResources-Reference-PackageTwo
>>>>>>
>>>>>> Cheers,
>>>>>> Doru
>>>>>>
>>>>>>
>>>>>> --
>>>>>> www.tudorgirba.com
>>>>>>
>>>>>> "There are no old things, there are only old ways of looking at  
>>>>>> them."
>>>>>>
>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> Moose-dev mailing list
>>>>>> [hidden email]
>>>>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>>>>
>>>>> --
>>>>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>>>>> Alexandre Bergel  http://www.bergel.eu
>>>>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> Moose-dev mailing list
>>>>> [hidden email]
>>>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>>>
>>>>
>>>> _______________________________________________
>>>> Moose-dev mailing list
>>>> [hidden email]
>>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>>
>>> --
>>> www.tudorgirba.com
>>>
>>> "Reasonable is what we are accustomed with."
>>>
>>>
>>> _______________________________________________
>>> Moose-dev mailing list
>>> [hidden email]
>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>
>>
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>
>
>
>
> --
> Lukas Renggli
> www.lukas-renggli.ch
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

--
www.tudorgirba.com

"Next time you see your life passing by, say 'hi' and get to know her."




_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: package restructuring

Lukas Renggli
On 29 August 2010 12:14, Tudor Girba <[hidden email]> wrote:

> Thanks Lukas!
>
> I used it successfully, so now we should have a better package naming for
> the moose tests and test resources.
>
> Some more todos:
> - Rename the two Glamour test packages
> - Rename the SmallDude test packages
> - Rename DSM packages with the same scheme
> - Split Mondrian categories into own packages
>
> I also started to slowly rename a bit the classes to have proper prefixes.
> This will probably take longer :).

Do you use Refactor | Class regex'? With this refactoring you can mass
rename thousands of classes at once (best is to use it on a package
scope).

Lukas

--
Lukas Renggli
www.lukas-renggli.ch
_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: package restructuring

Tudor Girba

On 29 Aug 2010, at 12:22, Lukas Renggli wrote:

> On 29 August 2010 12:14, Tudor Girba <[hidden email]> wrote:
>> Thanks Lukas!
>>
>> I used it successfully, so now we should have a better package  
>> naming for
>> the moose tests and test resources.
>>
>> Some more todos:
>> - Rename the two Glamour test packages
>> - Rename the SmallDude test packages
>> - Rename DSM packages with the same scheme
>> - Split Mondrian categories into own packages
>>
>> I also started to slowly rename a bit the classes to have proper  
>> prefixes.
>> This will probably take longer :).
>
> Do you use Refactor | Class regex'? With this refactoring you can mass
> rename thousands of classes at once (best is to use it on a package
> scope).

Yes, indeed I would like to use that. It's just that I do not seem to  
manage to do it. Here is what I do:
- select a category
- select refactoring scope -> package
- in the spawned package I click on the category pane and select  
refactoring / class regex
- in the bottom pane I put something like:

ORClassRegexRefactoring new

        renameClasses;
        replace: '^MO(.*)$' with: 'MAlgo$1' ignoreCase: false;

        yourself

But nothing happens, although I have classes that start with MO. Any  
ideas?

Cheers,
Doru

> Lukas
>
> --
> Lukas Renggli
> www.lukas-renggli.ch
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

--
www.tudorgirba.com

"When people care, great things can happen."



_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: package restructuring

Lukas Renggli
Your code works for me. It takes a while to perform the refactoring
through (a couple of minutes), a lot of changes have to performed.

Lukas

On 29 August 2010 12:54, Tudor Girba <[hidden email]> wrote:

>
> On 29 Aug 2010, at 12:22, Lukas Renggli wrote:
>
>> On 29 August 2010 12:14, Tudor Girba <[hidden email]> wrote:
>>>
>>> Thanks Lukas!
>>>
>>> I used it successfully, so now we should have a better package naming for
>>> the moose tests and test resources.
>>>
>>> Some more todos:
>>> - Rename the two Glamour test packages
>>> - Rename the SmallDude test packages
>>> - Rename DSM packages with the same scheme
>>> - Split Mondrian categories into own packages
>>>
>>> I also started to slowly rename a bit the classes to have proper
>>> prefixes.
>>> This will probably take longer :).
>>
>> Do you use Refactor | Class regex'? With this refactoring you can mass
>> rename thousands of classes at once (best is to use it on a package
>> scope).
>
> Yes, indeed I would like to use that. It's just that I do not seem to manage
> to do it. Here is what I do:
> - select a category
> - select refactoring scope -> package
> - in the spawned package I click on the category pane and select refactoring
> / class regex
> - in the bottom pane I put something like:
>
> ORClassRegexRefactoring new
>
>        renameClasses;
>        replace: '^MO(.*)$' with: 'MAlgo$1' ignoreCase: false;
>
>        yourself
>
> But nothing happens, although I have classes that start with MO. Any ideas?
>
> Cheers,
> Doru
>
>> Lukas
>>
>> --
>> Lukas Renggli
>> www.lukas-renggli.ch
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
> --
> www.tudorgirba.com
>
> "When people care, great things can happen."
>
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>



--
Lukas Renggli
www.lukas-renggli.ch

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: package restructuring

Tudor Girba
Hi Lukas,

Strange. Do you just do the code from the below pane, or do you need  
to do something else?

Cheers,
Doru


On 29 Aug 2010, at 15:40, Lukas Renggli wrote:

> Your code works for me. It takes a while to perform the refactoring
> through (a couple of minutes), a lot of changes have to performed.
>
> Lukas
>
> On 29 August 2010 12:54, Tudor Girba <[hidden email]> wrote:
>>
>> On 29 Aug 2010, at 12:22, Lukas Renggli wrote:
>>
>>> On 29 August 2010 12:14, Tudor Girba <[hidden email]> wrote:
>>>>
>>>> Thanks Lukas!
>>>>
>>>> I used it successfully, so now we should have a better package  
>>>> naming for
>>>> the moose tests and test resources.
>>>>
>>>> Some more todos:
>>>> - Rename the two Glamour test packages
>>>> - Rename the SmallDude test packages
>>>> - Rename DSM packages with the same scheme
>>>> - Split Mondrian categories into own packages
>>>>
>>>> I also started to slowly rename a bit the classes to have proper
>>>> prefixes.
>>>> This will probably take longer :).
>>>
>>> Do you use Refactor | Class regex'? With this refactoring you can  
>>> mass
>>> rename thousands of classes at once (best is to use it on a package
>>> scope).
>>
>> Yes, indeed I would like to use that. It's just that I do not seem  
>> to manage
>> to do it. Here is what I do:
>> - select a category
>> - select refactoring scope -> package
>> - in the spawned package I click on the category pane and select  
>> refactoring
>> / class regex
>> - in the bottom pane I put something like:
>>
>> ORClassRegexRefactoring new
>>
>>        renameClasses;
>>        replace: '^MO(.*)$' with: 'MAlgo$1' ignoreCase: false;
>>
>>        yourself
>>
>> But nothing happens, although I have classes that start with MO.  
>> Any ideas?
>>
>> Cheers,
>> Doru
>>
>>> Lukas
>>>
>>> --
>>> Lukas Renggli
>>> www.lukas-renggli.ch
>>> _______________________________________________
>>> Moose-dev mailing list
>>> [hidden email]
>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>
>> --
>> www.tudorgirba.com
>>
>> "When people care, great things can happen."
>>
>>
>>
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>
>
>
>
> --
> Lukas Renggli
> www.lukas-renggli.ch
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

--
www.tudorgirba.com

"No matter how many recipes we know, we still value a chef."






_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: package restructuring

Lukas Renggli
You need to accept it, not do-it.

Lukas

On Monday, August 30, 2010, Tudor Girba <[hidden email]> wrote:

> Hi Lukas,
>
> Strange. Do you just do the code from the below pane, or do you need to do something else?
>
> Cheers,
> Doru
>
>
> On 29 Aug 2010, at 15:40, Lukas Renggli wrote:
>
>
> Your code works for me. It takes a while to perform the refactoring
> through (a couple of minutes), a lot of changes have to performed.
>
> Lukas
>
> On 29 August 2010 12:54, Tudor Girba <[hidden email]> wrote:
>
>
> On 29 Aug 2010, at 12:22, Lukas Renggli wrote:
>
>
> On 29 August 2010 12:14, Tudor Girba <[hidden email]> wrote:
>
>
> Thanks Lukas!
>
> I used it successfully, so now we should have a better package naming for
> the moose tests and test resources.
>
> Some more todos:
> - Rename the two Glamour test packages
> - Rename the SmallDude test packages
> - Rename DSM packages with the same scheme
> - Split Mondrian categories into own packages
>
> I also started to slowly rename a bit the classes to have proper
> prefixes.
> This will probably take longer :).
>
>
> Do you use Refactor | Class regex'? With this refactoring you can mass
> rename thousands of classes at once (best is to use it on a package
> scope).
>
>
> Yes, indeed I would like to use that. It's just that I do not seem to manage
> to do it. Here is what I do:
> - select a category
> - select refactoring scope -> package
> - in the spawned package I click on the category pane and select refactoring
> / class regex
> - in the bottom pane I put something like:
>
> ORClassRegexRefactoring new
>
>        renameClasses;
>        replace: '^MO(.*)$' with: 'MAlgo$1' ignoreCase: false;
>
>        yourself
>
> But nothing happens, although I have classes that start with MO. Any ideas?
>
> Cheers,
> Doru
>
>
> Lukas
>
> --
> Lukas Renggli
> www.lukas-renggli.ch
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
>
> --
> www.tudorgirba.com
>
> "When people care, great things can happen."
>
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
>
>
>
>
> --
> Lukas Renggli
> www.lukas-renggli.ch
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
>
> --
> www.tudorgirba.com
>
> "No matter how many recipes we know, we still value a chef."
>
>
>
>
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>

--
Lukas Renggli
www.lukas-renggli.ch

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: package restructuring

Tudor Girba
Thanks, that works indeed :)

Cheers,
Doru


On 30 Aug 2010, at 06:06, Lukas Renggli wrote:

> You need to accept it, not do-it.
>
> Lukas
>
> On Monday, August 30, 2010, Tudor Girba <[hidden email]> wrote:
>> Hi Lukas,
>>
>> Strange. Do you just do the code from the below pane, or do you  
>> need to do something else?
>>
>> Cheers,
>> Doru
>>
>>
>> On 29 Aug 2010, at 15:40, Lukas Renggli wrote:
>>
>>
>> Your code works for me. It takes a while to perform the refactoring
>> through (a couple of minutes), a lot of changes have to performed.
>>
>> Lukas
>>
>> On 29 August 2010 12:54, Tudor Girba <[hidden email]> wrote:
>>
>>
>> On 29 Aug 2010, at 12:22, Lukas Renggli wrote:
>>
>>
>> On 29 August 2010 12:14, Tudor Girba <[hidden email]> wrote:
>>
>>
>> Thanks Lukas!
>>
>> I used it successfully, so now we should have a better package  
>> naming for
>> the moose tests and test resources.
>>
>> Some more todos:
>> - Rename the two Glamour test packages
>> - Rename the SmallDude test packages
>> - Rename DSM packages with the same scheme
>> - Split Mondrian categories into own packages
>>
>> I also started to slowly rename a bit the classes to have proper
>> prefixes.
>> This will probably take longer :).
>>
>>
>> Do you use Refactor | Class regex'? With this refactoring you can  
>> mass
>> rename thousands of classes at once (best is to use it on a package
>> scope).
>>
>>
>> Yes, indeed I would like to use that. It's just that I do not seem  
>> to manage
>> to do it. Here is what I do:
>> - select a category
>> - select refactoring scope -> package
>> - in the spawned package I click on the category pane and select  
>> refactoring
>> / class regex
>> - in the bottom pane I put something like:
>>
>> ORClassRegexRefactoring new
>>
>>       renameClasses;
>>       replace: '^MO(.*)$' with: 'MAlgo$1' ignoreCase: false;
>>
>>       yourself
>>
>> But nothing happens, although I have classes that start with MO.  
>> Any ideas?
>>
>> Cheers,
>> Doru
>>
>>
>> Lukas
>>
>> --
>> Lukas Renggli
>> www.lukas-renggli.ch
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>
>>
>> --
>> www.tudorgirba.com
>>
>> "When people care, great things can happen."
>>
>>
>>
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>
>>
>>
>>
>>
>> --
>> Lukas Renggli
>> www.lukas-renggli.ch
>>
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>
>>
>> --
>> www.tudorgirba.com
>>
>> "No matter how many recipes we know, we still value a chef."
>>
>>
>>
>>
>>
>>
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>
>
> --
> Lukas Renggli
> www.lukas-renggli.ch
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

--
www.tudorgirba.com

"Obvious things are difficult to teach."



_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: package restructuring

Simon Denier-3
In reply to this post by Tudor Girba

On 29 août 2010, at 12:54, Tudor Girba wrote:

>
> Yes, indeed I would like to use that. It's just that I do not seem to manage to do it. Here is what I do:
> - select a category
> - select refactoring scope -> package
> - in the spawned package I click on the category pane and select refactoring / class regex
> - in the bottom pane I put something like:
>
> ORClassRegexRefactoring new
>
> renameClasses;
> replace: '^MO(.*)$' with: 'MAlgo$1' ignoreCase: false;
>
> yourself
>
> But nothing happens, although I have classes that start with MO. Any ideas?

Resurrecting an "old" thread.

So if I performed this refactoring as above, the change only affects classes and references in the package, not references made by other packages (which makes sense).

Now, how do I get OR to refactor external references without scanning the whole system? I know through Moose in which packages there are such dependencies, but I need to include them in the refactoring scope. Can't do multiple selection of packages in the browser, so the only solution I found was to create my environment in a script like that:

(BrowserEnvironment new forPackageNames: { 'SmallDude-Utils'. 'Moose-Algos-Clustering'. 'Moose-Algos-LinearAlgebra'. 'Moose-Tests-Algos-LinearAlgebra' } ) open


Am I doing something wrong?


--
 Simon




_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev