Renamed instance attribute by code

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

Renamed instance attribute by code

HilaireFernandes
Hello,

This does not work:

    RBRenameInstanceVariableRefactoring

        rename: 'oldName'

        to: 'newName'

        in: MyClass


Hilaire


Reply | Threaded
Open this post in threaded view
|

Re: Renamed instance attribute by code

hernanmd

(RBRenameInstanceVariableRefactoring
        rename: 'oldName'
        to: 'newName'
        in: MyClass) execute

2017-05-23 10:50 GMT-03:00 Hilaire <[hidden email]>:
Hello,

This does not work:

    RBRenameInstanceVariableRefactoring

        rename: 'oldName'

        to: 'newName'

        in: MyClass


Hilaire



Reply | Threaded
Open this post in threaded view
|

Re: Renamed instance attribute by code

HilaireFernandes
Indeed.

Not so funnily, it breaks the class definition of those using traits :(

Don't know why.

Hilaire


Le 23/05/2017 à 16:11, Hernán Morales Durand a écrit :

>
> (RBRenameInstanceVariableRefactoring
>         rename: 'oldName'
>         to: 'newName'
>         in: MyClass) execute
>
> 2017-05-23 10:50 GMT-03:00 Hilaire
> <[hidden email]
> <mailto:[hidden email]>>:
>
>     Hello,
>
>     This does not work:
>
>         RBRenameInstanceVariableRefactoring
>
>             rename: 'oldName'
>
>             to: 'newName'
>
>             in: MyClass
>

--
Dr. Geo
http://drgeo.eu



Reply | Threaded
Open this post in threaded view
|

Re: Renamed instance attribute by code

Stephane Ducasse-3
Hilaire 


Do you have a repeatable case?
A test? can you open a bug entry?
Because gustavos is working on improving the refactorings. 

Stef


On Tue, May 23, 2017 at 4:46 PM, Hilaire <[hidden email]> wrote:
Indeed.

Not so funnily, it breaks the class definition of those using traits :(

Don't know why.

Hilaire


Le 23/05/2017 à 16:11, Hernán Morales Durand a écrit :
>
> (RBRenameInstanceVariableRefactoring
>         rename: 'oldName'
>         to: 'newName'
>         in: MyClass) execute
>
> 2017-05-23 10:50 GMT-03:00 Hilaire
> <[hidden email]
> <mailto:[hidden email]>>:
>
>     Hello,
>
>     This does not work:
>
>         RBRenameInstanceVariableRefactoring
>
>             rename: 'oldName'
>
>             to: 'newName'
>
>             in: MyClass
>

--
Dr. Geo
http://drgeo.eu




Reply | Threaded
Open this post in threaded view
|

Re: Renamed instance attribute by code

HilaireFernandes
No I don't have a repeatable case I can share.

(RPackageOrganizer default packageNamed: each) definedClasses

returns Trait if there are part of the package.

Therefore only work around I found is to not send instVarNames to a Trait.


Le 25/05/2017 à 14:04, Stephane Ducasse a écrit :
> Hilaire
>
>
> Do you have a repeatable case?
> A test? can you open a bug entry?
> Because gustavos is working on improving the refactorings.
>
> Stef
>

--
Dr. Geo
http://drgeo.eu



Reply | Threaded
Open this post in threaded view
|

Re: Renamed instance attribute by code

Stephane Ducasse-3
Hi Hilaire

do you mean that you had a trait definition in package and that it got some influence of the rename instance variable refactoring because one of your class uses a trait?

Stef

On Thu, May 25, 2017 at 5:19 PM, Hilaire <[hidden email]> wrote:
No I don't have a repeatable case I can share.

(RPackageOrganizer default packageNamed: each) definedClasses

returns Trait if there are part of the package.

Therefore only work around I found is to not send instVarNames to a Trait.


Le 25/05/2017 à 14:04, Stephane Ducasse a écrit :
> Hilaire
>
>
> Do you have a repeatable case?
> A test? can you open a bug entry?
> Because gustavos is working on improving the refactorings.
>
> Stef
>

--
Dr. Geo
http://drgeo.eu




Reply | Threaded
Open this post in threaded view
|

Re: Renamed instance attribute by code

HilaireFernandes
No, I mean #definedClasses also returns the traits of the package, then
requesting instVar to those traits seems to brake things, but I did not
investigated further as I bypassed the problem by discarding Traits.


Le 26/05/2017 à 13:08, Stephane Ducasse a écrit :
> Hi Hilaire
>
> do you mean that you had a trait definition in package and that it got
> some influence of the rename instance variable refactoring because one
> of your class uses a trait?
>
> Stef

--
Dr. Geo
http://drgeo.eu



Reply | Threaded
Open this post in threaded view
|

Re: Renamed instance attribute by code

Stephane Ducasse-3
oki


On Fri, May 26, 2017 at 6:38 PM, Hilaire <[hidden email]> wrote:
No, I mean #definedClasses also returns the traits of the package, then
requesting instVar to those traits seems to brake things, but I did not
investigated further as I bypassed the problem by discarding Traits.


Le 26/05/2017 à 13:08, Stephane Ducasse a écrit :
> Hi Hilaire
>
> do you mean that you had a trait definition in package and that it got
> some influence of the rename instance variable refactoring because one
> of your class uses a trait?
>
> Stef

--
Dr. Geo
http://drgeo.eu