Re: Roeltyper in Pharo

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

Re: Roeltyper in Pharo

Frederic Pluquet-3
Hello,

Thank for your interest in RoelTyper.

The user interface of RoelTyper is the class TypeCollector.

To know the types of an instance variable of a class use the method "typeInstvar: var ofClass: aClass". For example:

TypeCollector typeInstvar: #x ofClass: Point

This returns an ExtractedType object that contains the collected information for #x about its assignments, interface (messages sent on it) and links with other variables.  To calculate types from this information, send the message "types" on an ExtractedType object. For example:

(TypeCollector typeInstvar: #x ofClass: Point) types
 
returns an ordered collection with the class "Number".

You can also ask types of the temporary variables of methods. For example:

TypeCollector typeTmpsIn: (Point >> #>) ofClass: Point

returns an indentitydictionary with the extracted types for ^ (the type of the return value) and aPoint (the parameter of the method). 

Cheers,

Fréd
----
Frédéric Pluquet
Université Libre de Bruxelles (ULB)
Assistant
http://www.ulb.ac.be/di/fpluquet


On Thu, Nov 11, 2010 at 5:16 PM, Dave Mason <[hidden email]> wrote:
Hi,

I'm trying to figure out how to use the RoelTyper in Pharo.  When I go to the page: http://decomp.ulb.ac.be/roelwuyts/smalltalk/roeltyper/ it talks about the refactoring browser, but it's a Cincom browser.  I see that you're the most recent editor of RoelTyper on SqueakSource, so I assume you have some idea how to use it.

Any assistance would be appreciated!

Thanks  ../Dave