diff -r 077b0a0f9248 -r bb9bc51ce5f6 Class.st --- a/Class.st Fri Mar 21 22:22:21 1997 +0100 +++ b/Class.st Sat Mar 22 14:14:21 1997 +0100 @@ -3514,84 +3514,6 @@ "Modified: 13.12.1996 / 14:13:06 / cg" ! -printHierarchyAnswerIndentOn:aStream - "print my class hierarchy on aStream - return indent - recursively calls itself to print superclass and use returned indent - for my description - used in the browser" - - |indent nm| - - indent := 0. - (superclass notNil) ifTrue:[ - indent := (superclass printHierarchyAnswerIndentOn:aStream) + 2 - ]. - aStream spaces:indent. - nm := self name. - aStream nextPutAll:nm; nextPutAll:' ('. - self printInstVarNamesOn:aStream indent:(indent + nm size + 2). - aStream nextPutLine:')'. - ^ indent - - "Modified: 13.12.1996 / 14:13:13 / cg" -! - -printHierarchyOn:aStream - "print my class hierarchy on aStream" - - self printHierarchyAnswerIndentOn:aStream -! - -printInstVarNamesOn:aStream indent:indent - "print the instance variable names indented and breaking at line end" - - self printNameArray:(self instVarNames) on:aStream indent:indent -! - -printNameArray:anArray on:aStream indent:indent - "print an array of strings separated by spaces; when the stream - defines a lineLength, break when this limit is reached; indent - every line; used to printOut instance variable names" - - |thisName nextName arraySize lenMax pos mustBreak line spaces| - - arraySize := anArray size. - arraySize ~~ 0 ifTrue:[ - pos := indent. - lenMax := aStream lineLength. - thisName := anArray at:1. - line := ''. - 1 to:arraySize do:[:index | - line := line , thisName. - pos := pos + thisName size. - (index == arraySize) ifFalse:[ - nextName := anArray at:(index + 1). - mustBreak := false. - (lenMax > 0) ifTrue:[ - ((pos + nextName size) > lenMax) ifTrue:[ - mustBreak := true - ] - ]. - mustBreak ifTrue:[ - aStream nextPutLine:line withTabs. - spaces isNil ifTrue:[ - spaces := String new:indent - ]. - line := spaces. - pos := indent - ] ifFalse:[ - line := line , ' '. - pos := pos + 1 - ]. - thisName := nextName - ] - ]. - aStream nextPutAll:line withTabs - ] - - "Created: 10.12.1995 / 16:34:23 / cg" - "Modified: 9.11.1996 / 00:12:06 / cg" -! - printOutCategory:aCategory on:aPrintStream "print out all methods in aCategory on aPrintStream should be a PrintStream" @@ -4915,6 +4837,6 @@ !Class class methodsFor:'documentation'! version - ^ '$Header: /cvs/stx/stx/libbasic/Class.st,v 1.262 1997-03-21 14:45:05 cg Exp $' + ^ '$Header: /cvs/stx/stx/libbasic/Class.st,v 1.263 1997-03-22 13:14:21 cg Exp $' ! ! Class initialize!