Re: [Pharo-users] Find/Replace class scoped

2020-05-27 Thread Paul DeBruicker
Try #execute rather than #primitiveExecute Vitor Medina Cruz wrote > Will wait then. > > I tried to use the RB classes but with no success. There are few docs and > test code are hard to understand (still not sure if I should use transform > ou primitiveExecute). I did this: > > (RBRename

Re: [Pharo-users] Find/Replace class scoped

2020-05-27 Thread Vitor Medina Cruz
Oh! Thanks!! So the correct message to send is execute. The transform actually do nothing, it only stores the changes that are executed by the RBRefactoryChangeManager. On Wed, May 27, 2020 at 6:27 AM Thierry Goubier wrote: > Hi Vitor, > > I got it to work (integrated it as a command into my IDE

Re: [Pharo-users] Find/Replace class scoped

2020-05-27 Thread Thierry Goubier
Hi Vitor, I got it to work (integrated it as a command into my IDE, and wrote the auto-detect part for the permutation), with the following algorithm (I've removed the IDE-specific part): | aClass aSel newSel ast aMap | aClass := RefactoringReformatExample. aSel := #with:doThis: newSel := UIManag

Re: [Pharo-users] Find/Replace class scoped

2020-05-26 Thread Vitor Medina Cruz
Will wait then. I tried to use the RB classes but with no success. There are few docs and test code are hard to understand (still not sure if I should use transform ou primitiveExecute). I did this: (RBRenameMethodRefactoring new renameMethod: #with:doThis: in: RefactoringReformatExample

Re: [Pharo-users] Find/Replace class scoped

2020-05-21 Thread Stéphane Ducasse
we are working with sebastian jordan on a better rewriter. S. > On 21 May 2020, at 17:17, Vitor Medina Cruz wrote: > > Interesting, I will have a look at it. > > On Thu, May 21, 2020 at 11:52 AM Thierry Goubier > wrote: > Hi Vitor, > > as a matter of fact,

Re: [Pharo-users] Find/Replace class scoped

2020-05-21 Thread Vitor Medina Cruz
Interesting, I will have a look at it. On Thu, May 21, 2020 at 11:52 AM Thierry Goubier wrote: > Hi Vitor, > > as a matter of fact, the infrastructure for doing what you're looking > for is already there. > > The algorithm is the following: > > - create a scope (something based on RBBrowserEnvir

Re: [Pharo-users] Find/Replace class scoped

2020-05-21 Thread Thierry Goubier
Hi Vitor, as a matter of fact, the infrastructure for doing what you're looking for is already there. The algorithm is the following: - create a scope (something based on RBBrowserEnvironment, such as RBClassEnvironment or based on regexes and AND / OR operations: RBAndEnvironment, RBNotEnvironm

Re: [Pharo-users] Find/Replace class scoped

2020-05-21 Thread Vitor Medina Cruz
Well, as it seems, there is no way of find/replacing other than inside a single method. As a workaround, I did the following: 1- Committed all my image work in progress; 2- Opened the project structure in an external tool (notepad++ in this case) and did the find/replace there; 3- Committed it us

[Pharo-users] Find/Replace class scoped

2020-05-19 Thread Vitor Medina Cruz
Hello, Is there a way to make find replace in a class scoped way? I can do that with finder, but I figured only with package scoping. I wanna to change the name of a variable in multiple methods, and also I would like to regex replace an expression also in multiple methods. Regards, Vitor