Renamed instance attribute by code
Hello, This does not work: RBRenameInstanceVariableRefactoring rename: 'oldName' to: 'newName' in: MyClass Hilaire
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 <hilaire@drgeo.eu <mailto:hilaire@drgeo.eu>>:
Hello,
This does not work:
RBRenameInstanceVariableRefactoring
rename: 'oldName'
to: 'newName'
in: MyClass
-- Dr. Geo http://drgeo.eu
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 <hilaire@drgeo.eu> 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 <hilaire@drgeo.eu <mailto:hilaire@drgeo.eu>>:
Hello,
This does not work:
RBRenameInstanceVariableRefactoring
rename: 'oldName'
to: 'newName'
in: MyClass
-- Dr. Geo http://drgeo.eu
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
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 <hilaire@drgeo.eu> 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
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
oki On Fri, May 26, 2017 at 6:38 PM, Hilaire <hilaire@drgeo.eu> 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
participants (3)
-
Hernán Morales Durand -
Hilaire -
Stephane Ducasse