Class.st
changeset 1237 9a6877a3b2b2
parent 1234 593af1cdd6ac
child 1259 8c62958114ad
--- a/Class.st	Sat Apr 20 20:15:20 1996 +0200
+++ b/Class.st	Sat Apr 20 21:11:19 1996 +0200
@@ -2649,33 +2649,6 @@
     ]
 !
 
-printOutCategoryProtocol:aCategory on:aPrintStream
-    |any|
-
-    methodArray notNil ifTrue:[
-	any := false.
-	methodArray do:[:aMethod |
-	    (aCategory = aMethod category) ifTrue:[
-		any := true
-	    ]
-	].
-	any ifTrue:[
-	    aPrintStream italic.
-	    aPrintStream nextPutAll:aCategory.
-	    aPrintStream normal.
-	    aPrintStream cr; cr.
-	    methodArray do:[:aMethod |
-		(aCategory = aMethod category) ifTrue:[
-		    self printOutSourceProtocol:aMethod
-					     on:aPrintStream.
-		    aPrintStream cr; cr
-		]
-	    ].
-	    aPrintStream cr
-	]
-    ]
-!
-
 printOutDefinitionOn:aPrintStream
     "print out my definition"
 
@@ -2737,28 +2710,6 @@
     ]
 !
 
-printOutProtocolOn:aPrintStream
-    |collectionOfCategories|
-    self printOutDefinitionOn:aPrintStream.
-    aPrintStream cr.
-    collectionOfCategories := self class categories.
-    collectionOfCategories notNil ifTrue:[
-	aPrintStream nextPutAll:'class protocol'.
-	aPrintStream cr; cr.
-	collectionOfCategories do:[:aCategory |
-	    self class printOutCategoryProtocol:aCategory on:aPrintStream
-	]
-    ].
-    collectionOfCategories := self categories.
-    collectionOfCategories notNil ifTrue:[
-	aPrintStream nextPutAll:'instance protocol'.
-	aPrintStream cr; cr.
-	collectionOfCategories do:[:aCategory |
-	    self printOutCategoryProtocol:aCategory on:aPrintStream
-	]
-    ]
-!
-
 printOutSource:aString on:aPrintStream
     "print out a source-string; the message-specification is printed bold,
      comments are printed italic"
@@ -2800,31 +2751,6 @@
 	aPrintStream cr.
 	textIndex := textIndex + 1
     ]
-!
-
-printOutSourceProtocol:aMethod on:aPrintStream
-    "given the source in aString, print the methods message specification
-     and any method comments - without source; used to generate documentation
-     pages"
-
-    |text|
-
-    text := aMethod source asStringCollection.
-    (text size < 1) ifTrue:[^self].
-    aPrintStream bold.
-    aPrintStream nextPutAll:(text at:1).
-    aPrintStream cr.
-    (text size >= 2) ifTrue:[
-	aPrintStream italic.
-	aPrintStream spaces:((text at:2) indexOfNonSeparatorStartingAt:1).
-	aPrintStream nextPutAll:aMethod comment.
-	aPrintStream cr.
-    ].
-    aPrintStream normal
-
-    "
-      Float printOutProtocolOn:Stdout 
-    "
 ! !
 
 !Class methodsFor:'private changes management'!
@@ -3101,6 +3027,91 @@
     primitiveSpec at:index put:aString
 ! !
 
+!Class methodsFor:'protocol printOut'!
+
+printOutCategoryProtocol:aCategory on:aPrintStream
+    |any|
+
+    methodArray notNil ifTrue:[
+        any := false.
+        methodArray do:[:aMethod |
+            (aCategory = aMethod category) ifTrue:[
+                any := true
+            ]
+        ].
+        any ifTrue:[
+            aPrintStream italic.
+            aPrintStream nextPutAll:aCategory.
+            aPrintStream normal.
+            aPrintStream cr; cr.
+            methodArray do:[:aMethod |
+                (aCategory = aMethod category) ifTrue:[
+                    self printOutMethodProtocol:aMethod on:aPrintStream.
+                    aPrintStream cr; cr
+                ]
+            ].
+            aPrintStream cr
+        ]
+    ]
+
+    "Modified: 20.4.1996 / 18:20:26 / cg"
+!
+
+printOutMethodProtocol:aMethod on:aPrintStream
+    "given the source in aString, print the methods message specification
+     and any method comments - without source; used to generate documentation
+     pages"
+
+    |text comment|
+
+    text := aMethod source asStringCollection.
+    (text size < 1) ifTrue:[^self].
+    aPrintStream bold.
+    aPrintStream nextPutAll:(text at:1).
+    aPrintStream cr.
+    (text size >= 2) ifTrue:[
+        (comment := aMethod comment) notNil ifTrue:[
+            aPrintStream italic.
+            aPrintStream spaces:((text at:2) indexOfNonSeparatorStartingAt:1).
+            aPrintStream nextPutAll:aMethod comment.
+            aPrintStream cr.
+        ]
+    ].
+    aPrintStream normal
+
+    "
+      Float printOutProtocolOn:Stdout 
+    "
+
+    "Modified: 20.4.1996 / 17:54:50 / cg"
+    "Created: 20.4.1996 / 18:20:31 / cg"
+!
+
+printOutProtocolOn:aPrintStream
+    |collectionOfCategories|
+
+    self printOutDefinitionOn:aPrintStream.
+    aPrintStream cr.
+    collectionOfCategories := self class categories.
+    collectionOfCategories notNil ifTrue:[
+        aPrintStream nextPutAll:'class protocol'.
+        aPrintStream cr; cr.
+        collectionOfCategories do:[:aCategory |
+            self class printOutCategoryProtocol:aCategory on:aPrintStream
+        ]
+    ].
+    collectionOfCategories := self categories.
+    collectionOfCategories notNil ifTrue:[
+        aPrintStream nextPutAll:'instance protocol'.
+        aPrintStream cr; cr.
+        collectionOfCategories do:[:aCategory |
+            self printOutCategoryProtocol:aCategory on:aPrintStream
+        ]
+    ]
+
+    "Modified: 20.4.1996 / 17:55:42 / cg"
+! !
+
 !Class methodsFor:'queries'!
 
 allCategories
@@ -3948,6 +3959,6 @@
 !Class class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Class.st,v 1.151 1996-04-20 10:35:30 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Class.st,v 1.152 1996-04-20 19:11:19 cg Exp $'
 ! !
 Class initialize!