HTMLDocGenerator.st
changeset 575 27439f18cb04
parent 569 a28e63358685
child 577 9cdee8b4b6b8
equal deleted inserted replaced
574:a3c4ee494a46 575:27439f18cb04
  1150 
  1150 
  1151     "Created: 22.4.1996 / 20:03:31 / cg"
  1151     "Created: 22.4.1996 / 20:03:31 / cg"
  1152     "Modified: 9.11.1996 / 00:34:38 / cg"
  1152     "Modified: 9.11.1996 / 00:34:38 / cg"
  1153 !
  1153 !
  1154 
  1154 
       
  1155 printOutHTMLCategoryProtocol:aCategory of:aClass on:aStream
       
  1156     |any dict selectors methods shortName|
       
  1157 
       
  1158     shortName := aClass nameWithoutPrefix.
       
  1159 
       
  1160     dict := aClass methodDictionary.
       
  1161 
       
  1162     dict notNil ifTrue:[
       
  1163         any := false.
       
  1164         dict do:[:aMethod |
       
  1165             (aCategory = aMethod category) ifTrue:[
       
  1166                 any := true
       
  1167             ]
       
  1168         ].
       
  1169 
       
  1170         any ifTrue:[
       
  1171             aStream nextPutLine:'<a name="' , shortName , '_category_' , aCategory ,
       
  1172                                      '" href="#I_' , shortName , '_category_' , aCategory ,
       
  1173                                      '"><b>' , aCategory , '</b></A>'.
       
  1174             aStream nextPutLine:'<dl>'.
       
  1175 
       
  1176             selectors := dict keys asArray.
       
  1177             methods := dict values.
       
  1178             selectors sortWith:methods.
       
  1179             methods do:[:aMethod |
       
  1180                 (aCategory = aMethod category) ifTrue:[
       
  1181                     ErrorSignal catch:[
       
  1182                         self printOutHTMLMethodProtocol:aMethod on:aStream.
       
  1183                     ].
       
  1184                     aStream nextPutLine:'<p>'.
       
  1185                 ]
       
  1186             ].
       
  1187             aStream nextPutLine:'</dl>'.
       
  1188         ]
       
  1189     ]
       
  1190 
       
  1191     "
       
  1192       self printOutHTMLProtocolOf:Float on:Stdout 
       
  1193     "
       
  1194 
       
  1195     "Created: 22.4.1996 / 20:03:30 / cg"
       
  1196     "Modified: 5.6.1996 / 13:41:27 / stefan"
       
  1197     "Modified: 30.12.1996 / 18:47:23 / cg"
       
  1198 !
       
  1199 
       
  1200 printOutHTMLMethodProtocol:aMethod on:aStream
       
  1201     "given the source in aString, print the methods message specification
       
  1202      and any method comments - without source; used to generate documentation
       
  1203      pages"
       
  1204 
       
  1205     ^ self printOutHTMLMethodProtocol:aMethod on:aStream showClassName:false classRef:false
       
  1206 
       
  1207     "Modified: 22.4.1996 / 18:01:56 / cg"
       
  1208     "Created: 22.4.1996 / 20:03:30 / cg"
       
  1209 !
       
  1210 
       
  1211 printOutHTMLMethodProtocol:aMethod on:aStream showClassName:showClassName classRef:withClassRef
       
  1212     "given the source in aString, print the methods message specification
       
  1213      and any method comments - without source; used to generate documentation
       
  1214      pages"
       
  1215 
       
  1216     |comment cls sel partStream args argStream who methodSpecLine first
       
  1217      firstIndent firstNonEmpty isSubres isObsolete smallOrEmpty
       
  1218      ballColor|
       
  1219 
       
  1220     who := aMethod who.
       
  1221     cls := who methodClass.
       
  1222     sel := who methodSelector.
       
  1223     partStream := sel keywords readStream.
       
  1224 
       
  1225     (args := aMethod methodArgNames) notNil ifTrue:[
       
  1226         argStream := aMethod methodArgNames readStream.
       
  1227 
       
  1228         methodSpecLine := ''. first := true.
       
  1229         1 to:sel numArgs do:[:index |
       
  1230             first ifTrue:[
       
  1231                 first := false.
       
  1232             ] ifFalse:[
       
  1233                 methodSpecLine := methodSpecLine , ' '
       
  1234             ].
       
  1235             methodSpecLine := methodSpecLine , '<B>' , partStream next , '</B>'.
       
  1236             methodSpecLine := methodSpecLine , ' <I>' , argStream next , '</I>'.
       
  1237         ].
       
  1238     ] ifFalse:[
       
  1239         methodSpecLine := '<B>' , partStream next , '</B>'
       
  1240     ].
       
  1241 
       
  1242     isSubres := (aMethod sends:#subclassResponsibility).
       
  1243 
       
  1244     isObsolete := false.
       
  1245     ((aMethod sends:#obsoleteMethodWarning)
       
  1246     or:[(aMethod sends:#obsoleteMethodWarning:)
       
  1247     or:[(aMethod sends:#obsoleteMethodWarning:from:)]]) ifTrue:[
       
  1248         cls ~~ Object ifTrue:[
       
  1249             isObsolete := true
       
  1250         ]
       
  1251     ].
       
  1252 
       
  1253     smallOrEmpty := ''.
       
  1254     aMethod isPrivate ifTrue:[
       
  1255         methodSpecLine :=  '<i>private</I> ' , methodSpecLine.
       
  1256 "/        smallOrEmpty := '-small'.
       
  1257     ] ifFalse:[
       
  1258         aMethod isProtected ifTrue:[
       
  1259             methodSpecLine := '<i>protected</I> ' , methodSpecLine.
       
  1260 "/            smallOrEmpty := '-small'.
       
  1261         ] ifFalse:[
       
  1262             aMethod isIgnored ifTrue:[
       
  1263                 methodSpecLine := '[ ' , methodSpecLine , ' ] (<i>invisible</I>)'.
       
  1264 "/                smallOrEmpty := '-small'.
       
  1265             ]
       
  1266         ]
       
  1267     ].
       
  1268 
       
  1269     aStream nextPutLine:'<dt>'.
       
  1270 
       
  1271 
       
  1272     cls isMeta ifTrue:[
       
  1273         ballColor := 'yellow'
       
  1274     ] ifFalse:[
       
  1275         ballColor := 'red'
       
  1276     ].
       
  1277 
       
  1278     aStream nextPutLine:'<img src="pictures/' , ballColor , '-ball' , smallOrEmpty , '.gif" width=6 height=6>'.
       
  1279 
       
  1280     sel := (sel copy
       
  1281                         replChar:$< withString:'&lt;')
       
  1282                         replChar:$> withString:'&gt;'.
       
  1283 
       
  1284     withClassRef ifTrue:[
       
  1285         aStream nextPutLine:'<a name="' , cls name , '_' , sel ,
       
  1286                                  '" href="../misc/onlyInSTX2.html" action="html:',self name,' htmlDocOf:' , cls name ,
       
  1287                                  '">' , cls name , '</a> ' , methodSpecLine.
       
  1288     ] ifFalse:[
       
  1289         showClassName ifTrue:[
       
  1290             methodSpecLine := cls name , ' ' , methodSpecLine
       
  1291         ].
       
  1292 
       
  1293         aStream nextPutLine:'<a name="' , cls name , '_' , sel ,
       
  1294 "/                                 '" href="' , cls name , '_' , sel , '"' ,
       
  1295                                  '>' , methodSpecLine , '</a>'.
       
  1296     ].
       
  1297     aStream nextPutLine:'<dd>'.
       
  1298 
       
  1299     (comment := aMethod comment) notNil ifTrue:[
       
  1300         comment := (comment copy 
       
  1301                         replChar:$< withString:'&lt;')
       
  1302                         replChar:$> withString:'&gt;'.
       
  1303 
       
  1304         comment notEmpty ifTrue:[
       
  1305             comment := comment asStringCollection.
       
  1306             firstIndent := comment first leftIndent.
       
  1307             firstIndent > 0 ifTrue:[
       
  1308                 comment := comment collect:[:line |
       
  1309                                         line leftIndent >= firstIndent ifTrue:[
       
  1310                                             line copyFrom:firstIndent.
       
  1311                                         ] ifFalse:[
       
  1312                                             line
       
  1313                                         ]
       
  1314                                      ].
       
  1315             ].
       
  1316             firstNonEmpty := comment findFirst:[:line | line notEmpty].
       
  1317             firstNonEmpty > 1 ifTrue:[
       
  1318                 comment := comment copyFrom:firstNonEmpty
       
  1319             ].
       
  1320             comment := comment asString.
       
  1321         ].
       
  1322 
       
  1323         comment asStringCollection do:[:line |
       
  1324             aStream nextPutAll:line; nextPutLine:'<br>'.
       
  1325         ].
       
  1326     ].
       
  1327 
       
  1328     isSubres ifTrue:[
       
  1329         aStream nextPutLine:'<BR>'.
       
  1330         aStream nextPutLine:'<I>** This method raises an error - it must be redefined in concrete classes **</I>'.
       
  1331     ].
       
  1332     isObsolete ifTrue:[
       
  1333         aStream nextPutLine:'<BR>'.
       
  1334         aStream nextPutLine:'<I>** This is an obsolete interface - do not use it (it may vanish in future versions) **</I>'.
       
  1335     ].
       
  1336 
       
  1337     "Created: 22.4.1996 / 20:03:30 / cg"
       
  1338     "Modified: 9.11.1996 / 00:36:04 / cg"
       
  1339 !
       
  1340 
       
  1341 printOutHTMLProtocolOf:aClass on:aStream 
       
  1342     |collectionOfCategories any|
       
  1343 
       
  1344 "/    self printOutDefinitionOn:aPrintStream.
       
  1345 
       
  1346     collectionOfCategories := aClass class categories.
       
  1347     any := false.
       
  1348 
       
  1349     collectionOfCategories size > 0 ifTrue:[
       
  1350         collectionOfCategories := collectionOfCategories asOrderedCollection.
       
  1351         collectionOfCategories remove:'documentation' ifAbsent:[].
       
  1352         collectionOfCategories size > 0 ifTrue:[
       
  1353             collectionOfCategories sort.
       
  1354             aStream nextPutLine:'<h2><a name="CLASSPROTOCOL" href="#I_CLASSPROTOCOL">Class protocol:</A></h2>'.
       
  1355             collectionOfCategories do:[:aCategory |
       
  1356                 self printOutHTMLCategoryProtocol:aCategory of:aClass class on:aStream.
       
  1357                 any := true.
       
  1358             ].
       
  1359 "/        any ifFalse:[
       
  1360 "/            aStream nextPutAll:'no new protocol'
       
  1361 "/        ].
       
  1362             aStream nextPutLine:'<hr>'.
       
  1363         ]
       
  1364     ].
       
  1365 
       
  1366 
       
  1367     collectionOfCategories := aClass categories.
       
  1368     any := false.
       
  1369     collectionOfCategories size > 0 ifTrue:[
       
  1370         collectionOfCategories := collectionOfCategories asOrderedCollection sort.
       
  1371         aStream nextPutLine:'<h2><a name="INSTANCEPROTOCOL" href="#I_INSTANCEPROTOCOL">Instance protocol:</A></h2>'.
       
  1372         collectionOfCategories do:[:aCategory |
       
  1373             self printOutHTMLCategoryProtocol:aCategory of:aClass on:aStream
       
  1374         ].
       
  1375 "/        any ifFalse:[
       
  1376 "/            aStream nextPutAll:'no new protocol'
       
  1377 "/        ].
       
  1378         aStream nextPutLine:'<hr>'.
       
  1379     ]
       
  1380 
       
  1381     "
       
  1382       self printOutHTMLProtocolOf:Float on:Stdout 
       
  1383     "
       
  1384 
       
  1385     "Created: 22.4.1996 / 20:03:30 / cg"
       
  1386     "Modified: 30.12.1996 / 19:06:50 / cg"
       
  1387 ! !
       
  1388 
       
  1389 !HTMLDocGenerator class methodsFor:'format conversion - man pages'!
       
  1390 
  1155 manPageFor:aCommand
  1391 manPageFor:aCommand
  1156     "q&d hack to convert man output to html"
  1392     "generate a man page & convert the output to html"
  1157 
  1393 
  1158     ^ self 
  1394     ^ self 
  1159         manPageFor:aCommand
  1395         manPageFor:aCommand
  1160         inSection:nil
  1396         inSection:nil
  1161 
  1397 
  1162     "Modified: 9.9.1996 / 17:45:29 / cg"
  1398     "Modified: 4.4.1997 / 10:50:41 / cg"
  1163 !
  1399 !
  1164 
  1400 
  1165 manPageFor:aCommand inSection:sectionOrNil 
  1401 manPageFor:aCommand inSection:sectionOrNil 
  1166     "q&d hack to convert man output to html"
  1402     "generate a man page for some entry in a section
       
  1403      & convert the output to html"
  1167 
  1404 
  1168     |manCmd|
  1405     |manCmd|
  1169 
  1406 
  1170     sectionOrNil isNil ifTrue:[
  1407     sectionOrNil isNil ifTrue:[
  1171         manCmd := 'man ' , aCommand
  1408         manCmd := 'man ' , aCommand
  1175     ^ self 
  1412     ^ self 
  1176         manPageFor:aCommand
  1413         manPageFor:aCommand
  1177         manCommand:manCmd.
  1414         manCommand:manCmd.
  1178 
  1415 
  1179     "Created: 9.9.1996 / 17:45:08 / cg"
  1416     "Created: 9.9.1996 / 17:45:08 / cg"
  1180     "Modified: 9.9.1996 / 17:48:29 / cg"
  1417     "Modified: 4.4.1997 / 10:50:55 / cg"
  1181 !
  1418 !
  1182 
  1419 
  1183 manPageFor:aCommand manCommand:manCommand
  1420 manPageFor:aCommand manCommand:manCommand
  1184     "q&d hack to convert man output to html"
  1421     "convert man-command output to html"
  1185 
  1422 
  1186     |s t outStream state ch keep|
  1423     |s t outStream state ch keep|
  1187 
  1424 
  1188     s := PipeStream readingFrom:manCommand.
  1425     s := PipeStream readingFrom:manCommand.
  1189     s notNil ifTrue:[
  1426     s notNil ifTrue:[
  1295      self manPageFor:'cvs'
  1532      self manPageFor:'cvs'
  1296     "
  1533     "
  1297 
  1534 
  1298     "Modified: 28.6.1996 / 21:28:47 / stefan"
  1535     "Modified: 28.6.1996 / 21:28:47 / stefan"
  1299     "Created: 9.9.1996 / 17:43:16 / cg"
  1536     "Created: 9.9.1996 / 17:43:16 / cg"
  1300     "Modified: 9.9.1996 / 17:58:00 / cg"
  1537     "Modified: 4.4.1997 / 10:50:01 / cg"
  1301 !
  1538 !
  1302 
  1539 
  1303 printOutHTMLCategoryProtocol:aCategory of:aClass on:aStream
  1540 manPageForFile:aFilename
  1304     |any dict selectors methods shortName|
  1541     "convert a .man file to html"
  1305 
  1542 
  1306     shortName := aClass nameWithoutPrefix.
  1543     ^ self 
  1307 
  1544         manPageFor:aFilename asFilename name
  1308     dict := aClass methodDictionary.
  1545         manCommand:('nroff -man ' , aFilename asFilename pathName).
  1309 
  1546 
  1310     dict notNil ifTrue:[
  1547     "
  1311         any := false.
  1548      self manPageForFile:'../../stc/stc.1'
  1312         dict do:[:aMethod |
  1549     "
  1313             (aCategory = aMethod category) ifTrue:[
  1550     "
  1314                 any := true
  1551      HTMLDocumentView openFullOnText:(self manPageForFile:'../../stc/stc.1')
  1315             ]
  1552     "
  1316         ].
  1553 
  1317 
  1554     "Modified: 4.4.1997 / 10:44:05 / cg"
  1318         any ifTrue:[
       
  1319             aStream nextPutLine:'<a name="' , shortName , '_category_' , aCategory ,
       
  1320                                      '" href="#I_' , shortName , '_category_' , aCategory ,
       
  1321                                      '"><b>' , aCategory , '</b></A>'.
       
  1322             aStream nextPutLine:'<dl>'.
       
  1323 
       
  1324             selectors := dict keys asArray.
       
  1325             methods := dict values.
       
  1326             selectors sortWith:methods.
       
  1327             methods do:[:aMethod |
       
  1328                 (aCategory = aMethod category) ifTrue:[
       
  1329                     ErrorSignal catch:[
       
  1330                         self printOutHTMLMethodProtocol:aMethod on:aStream.
       
  1331                     ].
       
  1332                     aStream nextPutLine:'<p>'.
       
  1333                 ]
       
  1334             ].
       
  1335             aStream nextPutLine:'</dl>'.
       
  1336         ]
       
  1337     ]
       
  1338 
       
  1339     "
       
  1340       self printOutHTMLProtocolOf:Float on:Stdout 
       
  1341     "
       
  1342 
       
  1343     "Created: 22.4.1996 / 20:03:30 / cg"
       
  1344     "Modified: 5.6.1996 / 13:41:27 / stefan"
       
  1345     "Modified: 30.12.1996 / 18:47:23 / cg"
       
  1346 !
       
  1347 
       
  1348 printOutHTMLMethodProtocol:aMethod on:aStream
       
  1349     "given the source in aString, print the methods message specification
       
  1350      and any method comments - without source; used to generate documentation
       
  1351      pages"
       
  1352 
       
  1353     ^ self printOutHTMLMethodProtocol:aMethod on:aStream showClassName:false classRef:false
       
  1354 
       
  1355     "Modified: 22.4.1996 / 18:01:56 / cg"
       
  1356     "Created: 22.4.1996 / 20:03:30 / cg"
       
  1357 !
       
  1358 
       
  1359 printOutHTMLMethodProtocol:aMethod on:aStream showClassName:showClassName classRef:withClassRef
       
  1360     "given the source in aString, print the methods message specification
       
  1361      and any method comments - without source; used to generate documentation
       
  1362      pages"
       
  1363 
       
  1364     |comment cls sel partStream args argStream who methodSpecLine first
       
  1365      firstIndent firstNonEmpty isSubres isObsolete smallOrEmpty
       
  1366      ballColor|
       
  1367 
       
  1368     who := aMethod who.
       
  1369     cls := who methodClass.
       
  1370     sel := who methodSelector.
       
  1371     partStream := sel keywords readStream.
       
  1372 
       
  1373     (args := aMethod methodArgNames) notNil ifTrue:[
       
  1374         argStream := aMethod methodArgNames readStream.
       
  1375 
       
  1376         methodSpecLine := ''. first := true.
       
  1377         1 to:sel numArgs do:[:index |
       
  1378             first ifTrue:[
       
  1379                 first := false.
       
  1380             ] ifFalse:[
       
  1381                 methodSpecLine := methodSpecLine , ' '
       
  1382             ].
       
  1383             methodSpecLine := methodSpecLine , '<B>' , partStream next , '</B>'.
       
  1384             methodSpecLine := methodSpecLine , ' <I>' , argStream next , '</I>'.
       
  1385         ].
       
  1386     ] ifFalse:[
       
  1387         methodSpecLine := '<B>' , partStream next , '</B>'
       
  1388     ].
       
  1389 
       
  1390     isSubres := (aMethod sends:#subclassResponsibility).
       
  1391 
       
  1392     isObsolete := false.
       
  1393     ((aMethod sends:#obsoleteMethodWarning)
       
  1394     or:[(aMethod sends:#obsoleteMethodWarning:)
       
  1395     or:[(aMethod sends:#obsoleteMethodWarning:from:)]]) ifTrue:[
       
  1396         cls ~~ Object ifTrue:[
       
  1397             isObsolete := true
       
  1398         ]
       
  1399     ].
       
  1400 
       
  1401     smallOrEmpty := ''.
       
  1402     aMethod isPrivate ifTrue:[
       
  1403         methodSpecLine :=  '<i>private</I> ' , methodSpecLine.
       
  1404 "/        smallOrEmpty := '-small'.
       
  1405     ] ifFalse:[
       
  1406         aMethod isProtected ifTrue:[
       
  1407             methodSpecLine := '<i>protected</I> ' , methodSpecLine.
       
  1408 "/            smallOrEmpty := '-small'.
       
  1409         ] ifFalse:[
       
  1410             aMethod isIgnored ifTrue:[
       
  1411                 methodSpecLine := '[ ' , methodSpecLine , ' ] (<i>invisible</I>)'.
       
  1412 "/                smallOrEmpty := '-small'.
       
  1413             ]
       
  1414         ]
       
  1415     ].
       
  1416 
       
  1417     aStream nextPutLine:'<dt>'.
       
  1418 
       
  1419 
       
  1420     cls isMeta ifTrue:[
       
  1421         ballColor := 'yellow'
       
  1422     ] ifFalse:[
       
  1423         ballColor := 'red'
       
  1424     ].
       
  1425 
       
  1426     aStream nextPutLine:'<img src="pictures/' , ballColor , '-ball' , smallOrEmpty , '.gif" width=6 height=6>'.
       
  1427 
       
  1428     sel := (sel copy
       
  1429                         replChar:$< withString:'&lt;')
       
  1430                         replChar:$> withString:'&gt;'.
       
  1431 
       
  1432     withClassRef ifTrue:[
       
  1433         aStream nextPutLine:'<a name="' , cls name , '_' , sel ,
       
  1434                                  '" href="../misc/onlyInSTX2.html" action="html:',self name,' htmlDocOf:' , cls name ,
       
  1435                                  '">' , cls name , '</a> ' , methodSpecLine.
       
  1436     ] ifFalse:[
       
  1437         showClassName ifTrue:[
       
  1438             methodSpecLine := cls name , ' ' , methodSpecLine
       
  1439         ].
       
  1440 
       
  1441         aStream nextPutLine:'<a name="' , cls name , '_' , sel ,
       
  1442 "/                                 '" href="' , cls name , '_' , sel , '"' ,
       
  1443                                  '>' , methodSpecLine , '</a>'.
       
  1444     ].
       
  1445     aStream nextPutLine:'<dd>'.
       
  1446 
       
  1447     (comment := aMethod comment) notNil ifTrue:[
       
  1448         comment := (comment copy 
       
  1449                         replChar:$< withString:'&lt;')
       
  1450                         replChar:$> withString:'&gt;'.
       
  1451 
       
  1452         comment notEmpty ifTrue:[
       
  1453             comment := comment asStringCollection.
       
  1454             firstIndent := comment first leftIndent.
       
  1455             firstIndent > 0 ifTrue:[
       
  1456                 comment := comment collect:[:line |
       
  1457                                         line leftIndent >= firstIndent ifTrue:[
       
  1458                                             line copyFrom:firstIndent.
       
  1459                                         ] ifFalse:[
       
  1460                                             line
       
  1461                                         ]
       
  1462                                      ].
       
  1463             ].
       
  1464             firstNonEmpty := comment findFirst:[:line | line notEmpty].
       
  1465             firstNonEmpty > 1 ifTrue:[
       
  1466                 comment := comment copyFrom:firstNonEmpty
       
  1467             ].
       
  1468             comment := comment asString.
       
  1469         ].
       
  1470 
       
  1471         comment asStringCollection do:[:line |
       
  1472             aStream nextPutAll:line; nextPutLine:'<br>'.
       
  1473         ].
       
  1474     ].
       
  1475 
       
  1476     isSubres ifTrue:[
       
  1477         aStream nextPutLine:'<BR>'.
       
  1478         aStream nextPutLine:'<I>** This method raises an error - it must be redefined in concrete classes **</I>'.
       
  1479     ].
       
  1480     isObsolete ifTrue:[
       
  1481         aStream nextPutLine:'<BR>'.
       
  1482         aStream nextPutLine:'<I>** This is an obsolete interface - do not use it (it may vanish in future versions) **</I>'.
       
  1483     ].
       
  1484 
       
  1485     "Created: 22.4.1996 / 20:03:30 / cg"
       
  1486     "Modified: 9.11.1996 / 00:36:04 / cg"
       
  1487 !
       
  1488 
       
  1489 printOutHTMLProtocolOf:aClass on:aStream 
       
  1490     |collectionOfCategories any|
       
  1491 
       
  1492 "/    self printOutDefinitionOn:aPrintStream.
       
  1493 
       
  1494     collectionOfCategories := aClass class categories.
       
  1495     any := false.
       
  1496 
       
  1497     collectionOfCategories size > 0 ifTrue:[
       
  1498         collectionOfCategories := collectionOfCategories asOrderedCollection.
       
  1499         collectionOfCategories remove:'documentation' ifAbsent:[].
       
  1500         collectionOfCategories size > 0 ifTrue:[
       
  1501             collectionOfCategories sort.
       
  1502             aStream nextPutLine:'<h2><a name="CLASSPROTOCOL" href="#I_CLASSPROTOCOL">Class protocol:</A></h2>'.
       
  1503             collectionOfCategories do:[:aCategory |
       
  1504                 self printOutHTMLCategoryProtocol:aCategory of:aClass class on:aStream.
       
  1505                 any := true.
       
  1506             ].
       
  1507 "/        any ifFalse:[
       
  1508 "/            aStream nextPutAll:'no new protocol'
       
  1509 "/        ].
       
  1510             aStream nextPutLine:'<hr>'.
       
  1511         ]
       
  1512     ].
       
  1513 
       
  1514 
       
  1515     collectionOfCategories := aClass categories.
       
  1516     any := false.
       
  1517     collectionOfCategories size > 0 ifTrue:[
       
  1518         collectionOfCategories := collectionOfCategories asOrderedCollection sort.
       
  1519         aStream nextPutLine:'<h2><a name="INSTANCEPROTOCOL" href="#I_INSTANCEPROTOCOL">Instance protocol:</A></h2>'.
       
  1520         collectionOfCategories do:[:aCategory |
       
  1521             self printOutHTMLCategoryProtocol:aCategory of:aClass on:aStream
       
  1522         ].
       
  1523 "/        any ifFalse:[
       
  1524 "/            aStream nextPutAll:'no new protocol'
       
  1525 "/        ].
       
  1526         aStream nextPutLine:'<hr>'.
       
  1527     ]
       
  1528 
       
  1529     "
       
  1530       self printOutHTMLProtocolOf:Float on:Stdout 
       
  1531     "
       
  1532 
       
  1533     "Created: 22.4.1996 / 20:03:30 / cg"
       
  1534     "Modified: 30.12.1996 / 19:06:50 / cg"
       
  1535 ! !
  1555 ! !
  1536 
  1556 
  1537 !HTMLDocGenerator class methodsFor:'helpers'!
  1557 !HTMLDocGenerator class methodsFor:'helpers'!
  1538 
  1558 
  1539 extractSpecial:pattern from:docu
  1559 extractSpecial:pattern from:docu
  1571 ! !
  1591 ! !
  1572 
  1592 
  1573 !HTMLDocGenerator class methodsFor:'documentation'!
  1593 !HTMLDocGenerator class methodsFor:'documentation'!
  1574 
  1594 
  1575 version
  1595 version
  1576     ^ '$Header: /cvs/stx/stx/libbasic3/HTMLDocGenerator.st,v 1.17 1997-03-22 15:20:04 cg Exp $'
  1596     ^ '$Header: /cvs/stx/stx/libbasic3/HTMLDocGenerator.st,v 1.18 1997-04-04 08:51:11 cg Exp $'
  1577 ! !
  1597 ! !