BrowserView.st
changeset 4833 6de3735a6798
parent 4822 fd612daac229
child 4842 5212e61a6c78
--- a/BrowserView.st	Wed Apr 23 11:47:02 2003 +0200
+++ b/BrowserView.st	Wed Apr 23 13:37:02 2003 +0200
@@ -4114,24 +4114,13 @@
 classDocumentation
     "show classes documentation (i.e. open doc-View on it)"
 
-    self doClassMenu:[:currentClass |
-	Autoload autoloadFailedSignal handle:[:ex |
-	    self warn:'autoload failed.
-
-Check your source directory and/or 
-the abbreviation file for the classes (correct) shortened name.'.
-	    ex return.
-	] do:[
-	    |text v|
-
-	    text := currentClass htmlDocumentation.
-	    text notNil ifTrue:[
-		v := HTMLDocumentView
-			openFullOnText:text 
-			inDirectory:(Smalltalk getSystemFileName:'doc/online/english/classDoc').
-		v nameSpaceForExecution:(currentClass nameSpace).
-	    ]
-	]
+    self generateClassDocumentationThenDo:[:text |
+        |v|
+
+        v := HTMLDocumentView
+                openFullOnText:text 
+                inDirectory:(Smalltalk getSystemFileName:'doc/online/english/classDoc').
+        v nameSpaceForExecution:(currentClass nameSpace).
     ]
 
     "Created: 18.5.1996 / 12:12:20 / cg"
@@ -4172,27 +4161,13 @@
 classDocumentationToFile:aFilename
     "save a classes documentation html doc into a file"
 
-    self doClassMenu:[:currentClass |
-	Autoload autoloadFailedSignal handle:[:ex |
-	    self warn:'autoload failed.
-
-Check your source directory and/or 
-the abbreviation file for the classes (correct) shortened name.'.
-	    ex return.
-	] do:[
-	    |text v f|
-
-	    text := currentClass htmlDocumentation.
-	    text notNil ifTrue:[
-		f := aFilename asFilename writeStream.
-		f nextPutAll:text asString.
-		f close.
-	    ]
-	]
-    ]
-
-    "Created: 18.5.1996 / 12:12:20 / cg"
-    "Modified: 17.6.1997 / 13:32:40 / cg"
+    self generateClassDocumentationThenDo:[:text |
+        |f|
+
+        f := aFilename asFilename writeStream.
+        f nextPutAll:text asString.
+        f close.
+    ]
 !
 
 classFileOut
@@ -5207,6 +5182,30 @@
 
     "Modified: 17.6.1996 / 16:51:49 / stefan"
     "Modified: 18.8.1997 / 15:44:01 / cg"
+!
+
+generateClassDocumentationThenDo:aBlock
+    "helper"
+
+    self doClassMenu:[:currentClass |
+        Autoload autoloadFailedSignal handle:[:ex |
+            self warn:'autoload failed.
+
+Check your source directory and/or 
+the abbreviation file for the classes (correct) shortened name.'.
+            ex return.
+        ] do:[
+            |text|
+
+            text := HTMLDocGenerator htmlDocOf:currentClass.
+            text notNil ifTrue:[
+                aBlock value:text.
+            ]
+        ]
+    ]
+
+    "Created: 18.5.1996 / 12:12:20 / cg"
+    "Modified: 17.6.1997 / 13:32:40 / cg"
 ! !
 
 !BrowserView methodsFor:'class list source administration'!
@@ -14651,7 +14650,7 @@
 !BrowserView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/BrowserView.st,v 1.755 2003-04-15 11:57:34 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/BrowserView.st,v 1.756 2003-04-23 11:37:02 cg Exp $'
 ! !
 
 BrowserView initialize!