=== Top of the Swiki === Attachments ===

Squeak class hierarchy

This was one of my first questions as well, so I bet other newbies wonder this too. --WilliamBarnettLewis

Ken G. Brown asked in the Squeak Mailing list:

"Is there an easy way to post an indented listing of the complete Squeak class structure to a file for printing? I feel it would be helpful to see a short form of all that is available in the environment and how it is organized."
Hierarchy in the System Browser

Hierarchy text file with a script
If you want to do this in a more direct and less GUI based fashion, evaluate:
(FileStream newFileNamed: 'hierarchySqueak2.4.txt') nextPutAll: Object printHierarchy; close 



Separate fileout of all classes in a class hierarchy
To automatically generate a separate fileout file for a class and for each of its subclasses:
anyClassNameHere withAllSubclassesDo: [:aClass | aClass fileOut]
I would think twice about doing this with Object though - you will get a load of files. :-)




Fileout of all classes in a catagory

On a related note, to automatically generate a file out of classes in a catagory, do:
SystemOrganization fileOutCategory: 'CatagoryName'.
You can also use the following to get a crude version of HTML output (see below for a better solution):
SystemOrganization fileOutCategory: 'BrickGame' asHtml: true.
It would be quite easy to print each Class in a catagory as a seperate file, but this is left as an exercise for the reader.



Generating HTML documentation from classes or class hierarchy