ClassDescription.st
changeset 15380 7e64e99e0912
parent 15379 e8c2aec8bddb
child 15381 a353b2ca4d08
equal deleted inserted replaced
15379:e8c2aec8bddb 15380:7e64e99e0912
  3201 
  3201 
  3202 commentOrDocumentationString
  3202 commentOrDocumentationString
  3203     "the classes documentation-method's comment, its plain
  3203     "the classes documentation-method's comment, its plain
  3204      comment or nil"
  3204      comment or nil"
  3205 
  3205 
  3206     |cls m s isComment infoStream info|
  3206     |cls m s|
  3207 
  3207 
  3208     cls := self theNonMetaclass.
  3208     cls := self theNonMetaclass.
  3209     m := cls theMetaclass compiledMethodAt:#documentation.
  3209     m := cls theMetaclass compiledMethodAt:#documentation.
  3210     m notNil ifTrue:[
  3210     m notNil ifTrue:[
  3211         s := m comment.
  3211         s := m comment.
  3212         isComment := false.
       
  3213     ] ifFalse:[
  3212     ] ifFalse:[
  3214         "try comment"
  3213         "try comment"
  3215         s := cls comment.
  3214         s := cls comment.
  3216         s isString ifTrue:[
  3215         s isString ifTrue:[
  3217             s isEmpty ifTrue:[
  3216             s isEmpty ifTrue:[
  3218                 s := nil
  3217                 s := nil
  3219             ] ifFalse:[
  3218             ] ifFalse:[
  3220                 (s includes:$") ifTrue:[
  3219                 (s includes:$") ifTrue:[
  3221                     s := s copyReplaceAll:$" with:$'.
  3220                     s := s copyReplaceAll:$" with:$'.
  3222                 ].
  3221                 ].
  3223                 isComment := true.
       
  3224                 s size > 80 ifTrue:[
  3222                 s size > 80 ifTrue:[
  3225                     s := s asCollectionOfSubstringsSeparatedBy:$..
  3223                     s := s asCollectionOfSubstringsSeparatedBy:$..
  3226                     s := s asStringCollection.
  3224                     s := s asStringCollection.
  3227                     s := s collect:[:each | (each startsWith:Character space) ifTrue:[
  3225                     s := s collect:[:each | (each startsWith:Character space) ifTrue:[
  3228                                                 each copyFrom:2
  3226                                                 each copyFrom:2
  4278 ! !
  4276 ! !
  4279 
  4277 
  4280 !ClassDescription class methodsFor:'documentation'!
  4278 !ClassDescription class methodsFor:'documentation'!
  4281 
  4279 
  4282 version
  4280 version
  4283     ^ '$Header: /cvs/stx/stx/libbasic/ClassDescription.st,v 1.237 2013-06-07 12:14:51 cg Exp $'
  4281     ^ '$Header: /cvs/stx/stx/libbasic/ClassDescription.st,v 1.238 2013-06-07 12:17:54 cg Exp $'
  4284 !
  4282 !
  4285 
  4283 
  4286 version_CVS
  4284 version_CVS
  4287     ^ '$Header: /cvs/stx/stx/libbasic/ClassDescription.st,v 1.237 2013-06-07 12:14:51 cg Exp $'
  4285     ^ '$Header: /cvs/stx/stx/libbasic/ClassDescription.st,v 1.238 2013-06-07 12:17:54 cg Exp $'
  4288 ! !
  4286 ! !
  4289 
  4287 
  4290 
  4288 
  4291 ClassDescription initialize!
  4289 ClassDescription initialize!
  4292 ClassDescription::MethodRedefinitionNotification initialize!
  4290 ClassDescription::MethodRedefinitionNotification initialize!