RE: Rewrite Tool Conundrum

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

RE: Rewrite Tool Conundrum

Peter Suk
Arrgh!  This needs to be clarified in the docs.  In some languages, the
separator is part of the statement.  I knew that it's not in Smalltalk,
but that didn't connect.  Thanks.

But Rewrite is still not out of the woods.  Try this one:

Define a method anywhere (Object is fine)

        myTest

        | aTemp |
        aTemp := self.
        aTemp yourself.
        aTemp do: true.
        aTemp perform: #blah.
        ^aTemp


Now, this will show up if you search for:

        aTemp do: true.


It will show up if you search for:

        aTemp perform: #blah.


But if you search for:

        aTemp do: true.
        aTemp perform: #blah.


Then nothing!

--Peter



> -----Original Message-----
> From: Boris Popov [mailto:[hidden email]]
> Sent: Thursday, March 23, 2006 12:28 PM
> To: Peter Suk; [hidden email]
> Subject: RE: Rewrite Tool Conundrum
>
> Its not *that* bad :) You were just missing a period at the end of the
> first
> line,
>
> `@.statements1.
> `obj perform: `#symbol.
> `@.statements2
>
> That'll work.
>
> Cheers!




Reply | Threaded
Open this post in threaded view
|

RE: Rewrite Tool Conundrum

Boris Popov, DeepCove Labs (SNN)
Ah, but you're now trying to match statement lists, which may contain other
statements as well as temps, so the correct rule to search for would be,

| `@temps |
`@.statements1.
aTemp do: true.
aTemp perform: #blah.
`@.statements2.

Cheers!

-Boris

--
+1.604.689.0322
DeepCove Labs Ltd.
4th floor 595 Howe Street
Vancouver, Canada V6C 2T5

[hidden email]

CONFIDENTIALITY NOTICE

This email is intended only for the persons named in the message
header. Unless otherwise indicated, it contains information that is
private and confidential. If you have received it in error, please
notify the sender and delete the entire message including any
attachments.

Thank you.

-----Original Message-----
From: Peter Suk [mailto:[hidden email]]
Sent: Friday, March 31, 2006 9:02 AM
To: Boris Popov; [hidden email]
Subject: RE: Rewrite Tool Conundrum

Arrgh!  This needs to be clarified in the docs.  In some languages, the
separator is part of the statement.  I knew that it's not in Smalltalk,
but that didn't connect.  Thanks.

But Rewrite is still not out of the woods.  Try this one:

Define a method anywhere (Object is fine)

        myTest

        | aTemp |
        aTemp := self.
        aTemp yourself.
        aTemp do: true.
        aTemp perform: #blah.
        ^aTemp


Now, this will show up if you search for:

        aTemp do: true.


It will show up if you search for:

        aTemp perform: #blah.


But if you search for:

        aTemp do: true.
        aTemp perform: #blah.


Then nothing!

--Peter



> -----Original Message-----
> From: Boris Popov [mailto:[hidden email]]
> Sent: Thursday, March 23, 2006 12:28 PM
> To: Peter Suk; [hidden email]
> Subject: RE: Rewrite Tool Conundrum
>
> Its not *that* bad :) You were just missing a period at the end of the
> first
> line,
>
> `@.statements1.
> `obj perform: `#symbol.
> `@.statements2
>
> That'll work.
>
> Cheers!




smime.p7s (4K) Download Attachment