How to compare to different methods?

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

How to compare to different methods?

askoh
Administrator
I am using 3.10. How do I compare to two different methods in the same or different classes?

Aik-Siong Koh
Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] How to compare to different methods?

mrgonza78
(AClass parseTreeFor: #m1) body
  equalTo: (AnotherClass parseTreeFor: #m1) body
  exceptForVariables: {}

That's what the refactoring engine uses to check whether to methods are equal.
Alejandro

On Fri, Oct 24, 2008 at 2:57 PM, askoh <[hidden email]> wrote:

I am using 3.10. How do I compare to two different methods in the same or
different classes?

Aik-Siong Koh
--
View this message in context: http://www.nabble.com/How-to-compare-to-different-methods--tp20153877p20153877.html
Sent from the Squeak - Dev mailing list archive at Nabble.com.





Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] How to compare to different methods?

askoh
Administrator
Thanks. But I would like to see the differences too - like a diff tool.
AS

mrgonza78 wrote
(AClass parseTreeFor: #m1) body
  equalTo: (AnotherClass parseTreeFor: #m1) body
  exceptForVariables: {}

That's what the refactoring engine uses to check whether to methods are
equal.
Alejandro

On Fri, Oct 24, 2008 at 2:57 PM, askoh <askoh@askoh.com> wrote:

>
> I am using 3.10. How do I compare to two different methods in the same or
> different classes?
>
> Aik-Siong Koh
> --
> View this message in context:
> http://www.nabble.com/How-to-compare-to-different-methods--tp20153877p20153877.html
> Sent from the Squeak - Dev mailing list archive at Nabble.com.
>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] How to compare to different methods?

Gary Chambers-4
In reply to this post by mrgonza78
And you could possibly integrate with the Polymorph Diff tools...
At the basic level, any two strings can be compared graphically.
 
Regards, Gary.
----- Original Message -----
Sent: Friday, October 24, 2008 6:26 PM
Subject: Re: [squeak-dev] How to compare to different methods?

(AClass parseTreeFor: #m1) body
  equalTo: (AnotherClass parseTreeFor: #m1) body
  exceptForVariables: {}

That's what the refactoring engine uses to check whether to methods are equal.
Alejandro

On Fri, Oct 24, 2008 at 2:57 PM, askoh <[hidden email]> wrote:

I am using 3.10. How do I compare to two different methods in the same or
different classes?

Aik-Siong Koh
--
View this message in context: http://www.nabble.com/How-to-compare-to-different-methods--tp20153877p20153877.html
Sent from the Squeak - Dev mailing list archive at Nabble.com.







Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] How to compare to different methods?

Yoshiki Ohshima-2
In reply to this post by askoh
At Fri, 24 Oct 2008 09:57:06 -0700 (PDT),
askoh wrote:
>
>
> I am using 3.10. How do I compare to two different methods in the same or
> different classes?

  - Select the first method, and copy the entire content of it into the
    clipboard (Alt-c).
  - Go to the second method, and press Alt-shift-c.

or, from the context menu, choose "more..." and then choose "special
menu...", and then choose "self compareToClipboard".

-- Yoshiki

Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] How to compare to different methods?

Eliot Miranda-2
In reply to this post by askoh
I have a hack that works in a Croquet image that adds a messageSetDifferencer and a Classreference that allows one to compare two unrelated hierarchies.  There is no nice API for specifying the two hierarchies to put side-by-side but its a small amount of workspace hacking to gather the sequence of pairs of ClassReference and MethodReference for the things you want to compare.  If you're interested I
'll post it.

On Fri, Oct 24, 2008 at 9:57 AM, askoh <[hidden email]> wrote:

I am using 3.10. How do I compare to two different methods in the same or
different classes?

Aik-Siong Koh
--
View this message in context: http://www.nabble.com/How-to-compare-to-different-methods--tp20153877p20153877.html
Sent from the Squeak - Dev mailing list archive at Nabble.com.





Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] How to compare to different methods?

Gary Chambers-4
In the Polymorph diff tools I could patch the "compare to clipboard" option... was never aware of it! (lots of hidden stuff in Squeak!).
 
Regards, Gary.
----- Original Message -----
Sent: Tuesday, October 28, 2008 5:15 PM
Subject: Re: [squeak-dev] How to compare to different methods?

I have a hack that works in a Croquet image that adds a messageSetDifferencer and a Classreference that allows one to compare two unrelated hierarchies.  There is no nice API for specifying the two hierarchies to put side-by-side but its a small amount of workspace hacking to gather the sequence of pairs of ClassReference and MethodReference for the things you want to compare.  If you're interested I
'll post it.

On Fri, Oct 24, 2008 at 9:57 AM, askoh <[hidden email]> wrote:

I am using 3.10. How do I compare to two different methods in the same or
different classes?

Aik-Siong Koh
--
View this message in context: http://www.nabble.com/How-to-compare-to-different-methods--tp20153877p20153877.html
Sent from the Squeak - Dev mailing list archive at Nabble.com.