BrowserView.st
changeset 2327 4299e0013ca0
parent 2324 638f31ec298e
child 2328 21c475c3ed2c
equal deleted inserted replaced
2326:8cea69558420 2327:4299e0013ca0
  6443     "helper for classMethod-list - extract the class name from the string"
  6443     "helper for classMethod-list - extract the class name from the string"
  6444 
  6444 
  6445     |pos s words clsName|
  6445     |pos s words clsName|
  6446 
  6446 
  6447     s := aString string withoutSpaces.
  6447     s := aString string withoutSpaces.
  6448     (s endsWith:'}') ifTrue:[
  6448     (s includes:${ ) ifTrue:[
  6449 	s := s copyTo:(s lastIndexOf:${) - 1.
  6449         s := s copyTo:(s indexOf:${ ) - 1.
  6450 	s := s withoutSpaces.
  6450         s := s withoutSpaces.
       
  6451     ].
       
  6452     (s includes:$[ ) ifTrue:[
       
  6453         s := s copyTo:(s indexOf:$[ ) - 1.
       
  6454         s := s withoutSpaces.
  6451     ].
  6455     ].
  6452 
  6456 
  6453 "/ new code:
  6457 "/ new code:
  6454     words := s asCollectionOfWords.
  6458     words := s asCollectionOfWords.
  6455     clsName := words at:1.
  6459     clsName := words at:1.
  6456     words size > 2 ifTrue:[
  6460     words size > 2 ifTrue:[
  6457 	(words at:2) = 'class' ifTrue:[
  6461         (words at:2) = 'class' ifTrue:[
  6458 	    ^ clsName , ' class'
  6462             ^ clsName , ' class'
  6459 	]
  6463         ]
  6460     ].
  6464     ].
  6461     ^ clsName.
  6465     ^ clsName.
  6462 "/ OLD code
  6466 "/ OLD code
  6463 
  6467 
  6464     (s endsWith:' !!') ifTrue:[
  6468     (s endsWith:' !!') ifTrue:[
  6465 	s := s copyWithoutLast:2
  6469         s := s copyWithoutLast:2
  6466     ].
  6470     ].
  6467     (s endsWith:')') ifTrue:[
  6471     (s endsWith:')') ifTrue:[
  6468 	s := aString copyTo:(aString lastIndexOf:$()-1.
  6472         s := aString copyTo:(aString lastIndexOf:$()-1.
  6469 	s := s withoutSpaces.
  6473         s := s withoutSpaces.
  6470     ].
  6474     ].
  6471     (s endsWith:' !!') ifTrue:[
  6475     (s endsWith:' !!') ifTrue:[
  6472 	s := s copyWithoutLast:2
  6476         s := s copyWithoutLast:2
  6473     ].
  6477     ].
  6474     pos := s lastIndexOf:(Character space).
  6478     pos := s lastIndexOf:(Character space).
  6475     ^ s copyTo:(pos - 1)
  6479     ^ s copyTo:(pos - 1)
  6476 
  6480 
  6477     "Modified: / 17.6.1996 / 17:06:59 / stefan"
  6481     "Modified: / 17.6.1996 / 17:06:59 / stefan"
  6483     "helper for classMethod-list - extract selector from the string"
  6487     "helper for classMethod-list - extract selector from the string"
  6484 
  6488 
  6485     |pos s|
  6489     |pos s|
  6486 
  6490 
  6487     s := aString string withoutSpaces.
  6491     s := aString string withoutSpaces.
  6488     (s includes:$}) ifTrue:[
  6492     (s includes:${ ) ifTrue:[
  6489         s := s copyTo:(s lastIndexOf:${) - 1.
  6493         s := s copyTo:(s indexOf:${ ) - 1.
       
  6494         s := s withoutSpaces.
       
  6495     ].
       
  6496     (s includes:$[ ) ifTrue:[
       
  6497         s := s copyTo:(s indexOf:$[ ) - 1.
  6490         s := s withoutSpaces.
  6498         s := s withoutSpaces.
  6491     ].
  6499     ].
  6492 
  6500 
  6493     (s endsWith:' !!') ifTrue:[
  6501     (s endsWith:' !!') ifTrue:[
  6494         s := s copyWithoutLast:2
  6502         s := s copyWithoutLast:2
 13651 ! !
 13659 ! !
 13652 
 13660 
 13653 !BrowserView class methodsFor:'documentation'!
 13661 !BrowserView class methodsFor:'documentation'!
 13654 
 13662 
 13655 version
 13663 version
 13656     ^ '$Header: /cvs/stx/stx/libtool/BrowserView.st,v 1.533 1999-08-10 18:03:18 cg Exp $'
 13664     ^ '$Header: /cvs/stx/stx/libtool/BrowserView.st,v 1.534 1999-08-12 08:59:54 cg Exp $'
 13657 ! !
 13665 ! !
 13658 BrowserView initialize!
 13666 BrowserView initialize!