--- a/HTMLDocGenerator.st Tue Apr 26 23:04:08 2016 +0100
+++ b/HTMLDocGenerator.st Thu Apr 28 06:55:21 2016 +0200
@@ -19,7 +19,7 @@
generateBodyOnly backRef backCmd imagePath refLines demoLines
warnLines hintLines authorLines classProtocolCategories
instanceProtocolCategories generateJavaScriptCallInfo
- generateDocumentForOfflineReading'
+ generateDocumentForOfflineReading showUpButton'
classVariableNames:''
poolDictionaries:''
category:'System-Documentation'
@@ -380,11 +380,17 @@
!HTMLDocGenerator class methodsFor:'pathnames'!
findPathToTopOfDocumentation
- #(
- '../../doc/online'
- 'doc/online'
- '/opt/stx/doc/online'
- ) do:[:eachPathToTry |
+ |triedDirs|
+
+ triedDirs := OrderedCollection new.
+ triedDirs add:(Smalltalk packageDirectory directory pathName).
+ triedDirs addAll:
+ #(
+ '../../doc/online'
+ 'doc/online'
+ '/opt/stx/doc/online'
+ ).
+ triedDirs do:[:eachPathToTry |
(eachPathToTry asFilename exists
and:[eachPathToTry asFilename isDirectory])
ifTrue:[
@@ -392,6 +398,10 @@
]
].
^ '.'
+
+ "
+ self findPathToTopOfDocumentation
+ "
!
languageSpecificDocDirectory
@@ -459,6 +469,14 @@
pathToTopOfDocumentation:something
pathToTopOfDocumentation := something.
+!
+
+showUpButton
+ ^ showUpButton ? true
+!
+
+showUpButton:aBoolean
+ showUpButton := aBoolean
! !
!HTMLDocGenerator methodsFor:'document generation'!
@@ -812,7 +830,7 @@
htmlDocOf:aClass
"generate an HTML document string which contains a classes documentation"
- ^ self htmlDocOf:aClass back:nil backRef:nil
+ ^ self htmlDocOf:aClass theNonMetaclass back:nil backRef:nil
"
self htmlDocOf:PostscriptPrinterStream
@@ -2813,6 +2831,8 @@
generateUpArrowButtonWithReference:backHRef command:backCmd imagePath:imagePath altLabel:altLabel
|p|
+ self showUpButton ifFalse:[^ self].
+
outStream nextPutAll:'<a class="noprint" href="' , backHRef , '"'.
backCmd notNil ifTrue:[
outStream nextPutAll:' action="html:' , self class name , ' ' , backCmd , '"'.