Issue 5750 in pharo: RPackage should rename extension methods in pckage renames

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

Issue 5750 in pharo: RPackage should rename extension methods in pckage renames

pharo
Status: Accepted
Owner: marianopeck
CC: [hidden email],  [hidden email]
Labels: Type-Bug

New issue 5750 by marianopeck: RPackage should rename extension methods in  
pckage renames
http://code.google.com/p/pharo/issues/detail?id=5750

When we rename a package using Nautilus, the RPackage does NOT take into  
account extension methods.

Me may need to fix  renamePackage: aPackage in: aString

Cheers


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5750 in pharo: RPackage should rename extension methods in pckage renames

pharo

Comment #1 on issue 5750 by [hidden email]: RPackage should rename  
extension methods in pckage renames
http://code.google.com/p/pharo/issues/detail?id=5750

True :)

But I an really busy packing stuff now :s
I will have a look at that in a couple of days ^^


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5750 in pharo: RPackage should rename extension methods in pckage renames

pharo

Comment #2 on issue 5750 by marianopeck: RPackage should rename extension  
methods in pckage renames
http://code.google.com/p/pharo/issues/detail?id=5750

i tried to do something like adding

        aPackage  extensionMethods do: [:aMethod |
                aMethod methodClass organization renameCategory: aPackage name  
toBe: '*',aString
        ].

to renamePackage: aPackage in: aString
but it didn't work :(


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5750 in pharo: RPackage should rename extension methods in pckage renames

pharo
Updates:
        Labels: Milestone-2.0

Comment #3 on issue 5750 by marianopeck: RPackage should rename extension  
methods in pckage renames
http://code.google.com/p/pharo/issues/detail?id=5750

(No comment was entered for this change.)


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5750 in pharo: RPackage should rename extension methods in pckage renames

pharo
Updates:
        Status: Workneeded

Comment #4 on issue 5750 by [hidden email]: RPackage should  
rename extension methods in pckage renames
http://code.google.com/p/pharo/issues/detail?id=5750

This should do it.  But it looks like a hack :).  Maybe we can put the  
package rename support into RPackage. instead of hacking this way.

Ben, can you have a look?

renamePackage: aPackage in: aString

        | classes oldPackageName |
        (packages includesKey: aString asSymbol)
                ifTrue: [ ^ self openAlreadyExistingError ].

        oldPackageName := aPackage name.
        classes := aPackage definedClasses.
        classes do: [:class |
                class category: aString ].
        self unregisterPackage: aPackage.
        aPackage name: aString.
        self registerPackage: aPackage.
        aPackage extensionMethods do: [ :aMethod |
                | aProtocol |
                aProtocol := aMethod methodClass organization categoryOfElement: aMethod  
selector.
                aMethod methodClass organization renameCategory: aProtocol asSymbol
                                        toBe: (aProtocol copyReplaceAll: oldPackageName with: aString)  
asSymbol.
        ].
       
        classes do: [:class |
                class category: aString ].
       
        ^ aPackage


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5750 in pharo: RPackage should rename extension methods in pckage renames

pharo

Comment #5 on issue 5750 by marianopeck: RPackage should rename extension  
methods in pckage renames
http://code.google.com/p/pharo/issues/detail?id=5750

Thanks Guille. It works. "Maybe we can put the package rename support into  
RPackage" This method is already in RPackage package. So I guess you mean  
to move it to the class RPackage instead of RPackageOrganizer ?


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5750 in pharo: RPackage should rename extension methods in pckage renames

pharo

Comment #6 on issue 5750 by [hidden email]: RPackage should  
rename extension methods in pckage renames
http://code.google.com/p/pharo/issues/detail?id=5750

No, this method is a Nautilus extension.  That I meant :)


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5750 in pharo: RPackage should rename extension methods in pckage renames

pharo

Comment #7 on issue 5750 by marianopeck: RPackage should rename extension  
methods in pckage renames
http://code.google.com/p/pharo/issues/detail?id=5750

uhhhh right, I just saw the package, not the extension jahhaha.
+999 to put it in RPPackage package anod not in nautilus


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5750 in pharo: RPackage should rename extension methods in pckage renames

pharo

Comment #8 on issue 5750 by [hidden email]: RPackage should rename  
extension methods in pckage renames
http://code.google.com/p/pharo/issues/detail?id=5750

Yes we should move it there.


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5750 in pharo: RPackage should rename extension methods in pckage renames

pharo
Updates:
        Status: FixToInclude
        Cc: [hidden email]

Comment #9 on issue 5750 by marianopeck: RPackage should rename extension  
methods in pckage renames
http://code.google.com/p/pharo/issues/detail?id=5750

So I took the code oof Guille and I move the method from being a *Nautilus  
extension to let it direclty in the RPackage package. Ready to integrate

Name:  
SLICE-Issue-5750-RPackage-should-rename-extension-methods-in-pckage-renames-MarianoMartinezPeck.1
Author: MarianoMartinezPeck
Time: 17 June 2012, 12:02:30.027 am
UUID: cc99a6f1-c39b-4615-a992-5ca59874365f
Ancestors:
Dependencies: Nautilus-MarianoMartinezPeck.288,  
RPackage-Core-MarianoMartinezPeck.128

- rename packages now rename extension methods
- move logic to rename from Nautilus to RPackage package.


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5750 in pharo: RPackage should rename extension methods in pckage renames

pharo

Comment #10 on issue 5750 by [hidden email]: RPackage should rename  
extension methods in pckage renames
http://code.google.com/p/pharo/issues/detail?id=5750

Thanks!



_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5750 in pharo: RPackage should rename extension methods in pckage renames

pharo

Comment #11 on issue 5750 by [hidden email]: RPackage should rename  
extension methods in pckage renames
http://code.google.com/p/pharo/issues/detail?id=5750

in 20134


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5750 in pharo: RPackage should rename extension methods in pckage renames

pharo
Updates:
        Status: Integrated

Comment #12 on issue 5750 by [hidden email]: RPackage should rename  
extension methods in pckage renames
http://code.google.com/p/pharo/issues/detail?id=5750

(No comment was entered for this change.)


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker