UIHelpTool.st
changeset 2934 c01fe2833468
parent 2933 a4f4d63953b3
child 3010 12d3f7411fb6
equal deleted inserted replaced
2933:a4f4d63953b3 2934:c01fe2833468
   711     "reads the help dictionary from aClass and find remaining classes 
   711     "reads the help dictionary from aClass and find remaining classes 
   712      'between' aClass and ApplicationModel
   712      'between' aClass and ApplicationModel
   713     " 
   713     " 
   714     |lastContents root list helpSpecSelector|
   714     |lastContents root list helpSpecSelector|
   715 
   715 
       
   716     (specClass notNil and:[specClass == aClass]) ifTrue:[
       
   717         ^ self.
       
   718     ].
       
   719 
   716     helpSpecSelector := self specSelector.
   720     helpSpecSelector := self specSelector.
   717     specClass := self getHelpSpecClassFromClass:aClass.
   721     specClass := self getHelpSpecClassFromClass:aClass.
   718 
   722 
   719     list := OrderedCollection new.
   723     list := OrderedCollection new.
   720 
   724 
  1118 "/    (specClass isSubclassOf:ApplicationModel) ifFalse:[
  1122 "/    (specClass isSubclassOf:ApplicationModel) ifFalse:[
  1119 "/        self information:(resources string:'Cannot save help into non-Application class').
  1123 "/        self information:(resources string:'Cannot save help into non-Application class').
  1120 "/        ^ nil
  1124 "/        ^ nil
  1121 "/    ].
  1125 "/    ].
  1122 
  1126 
  1123     classItemList do:[:aClassItem| 
  1127     classItemList do:[:aClassItem|
       
  1128         aClassItem theClass isNil ifTrue:[
       
  1129             aClassItem onClass:specClass
       
  1130         ].
  1124         aClassItem createHelpMethodNamed:(self specSelector) 
  1131         aClassItem createHelpMethodNamed:(self specSelector) 
  1125     ].
  1132     ].
  1126 !
  1133 !
  1127 
  1134 
  1128 openDocumentation
  1135 openDocumentation
  1175 !UIHelpTool::ClassItem methodsFor:'code generation'!
  1182 !UIHelpTool::ClassItem methodsFor:'code generation'!
  1176 
  1183 
  1177 createHelpMethodNamed:aMethodName
  1184 createHelpMethodNamed:aMethodName
  1178     |stream|
  1185     |stream|
  1179 
  1186 
  1180     (modified and:[theClass notNil]) ifFalse:[
  1187     modified ifFalse:[
  1181         ^ self
  1188         ^ self
       
  1189     ].
       
  1190     theClass isNil ifTrue:[
       
  1191         theClass := Dialog requestClass:'Save helpSpec in which class?' initialAnswer:''.
       
  1192         theClass isNil ifTrue:[
       
  1193             ^ self
       
  1194         ].
  1182     ].
  1195     ].
  1183     stream := '' writeStream.
  1196     stream := '' writeStream.
  1184 
  1197 
  1185     stream nextPutAll:
  1198     stream nextPutAll:
  1186         aMethodName, '\' withCRs,
  1199         aMethodName, '\' withCRs,