All pastes #34542 Raw Edit

Someone

public text v1 · immutable
#34542 ·published 2005-12-22 00:04 UTC
rendered paste body
putHierarchyFrom: rootCollection with: visibleClasses into: hierarchy withIndent: indentString

	| sortBlock |
	sortBlock := [:a :b | a name < b name].
	rootCollection do: [:rootClass |
		(visibleClasses includes: rootClass)
			ifTrue: [
				hierarchy add: indentString, rootClass fullName.
				self 
					putHierarchyFrom: (rootClass subclasses asSortedCollection: sortBlock) 
					with: visibleClasses 
					into: hierarchy 
					withIndent: indentString, '  ']
            ifFalse: [
                self 
			putHierarchyFrom: (rootClass subclasses asSortedCollection: sortBlock) 
			with: visibleClasses 
			into: hierarchy
			withIndent: indentString]]