BrowserView.st
changeset 2327 4299e0013ca0
parent 2324 638f31ec298e
child 2328 21c475c3ed2c
--- a/BrowserView.st	Tue Aug 10 20:58:48 1999 +0200
+++ b/BrowserView.st	Thu Aug 12 10:59:54 1999 +0200
@@ -6445,31 +6445,35 @@
     |pos s words clsName|
 
     s := aString string withoutSpaces.
-    (s endsWith:'}') ifTrue:[
-	s := s copyTo:(s lastIndexOf:${) - 1.
-	s := s withoutSpaces.
+    (s includes:${ ) ifTrue:[
+        s := s copyTo:(s indexOf:${ ) - 1.
+        s := s withoutSpaces.
+    ].
+    (s includes:$[ ) ifTrue:[
+        s := s copyTo:(s indexOf:$[ ) - 1.
+        s := s withoutSpaces.
     ].
 
 "/ new code:
     words := s asCollectionOfWords.
     clsName := words at:1.
     words size > 2 ifTrue:[
-	(words at:2) = 'class' ifTrue:[
-	    ^ clsName , ' class'
-	]
+        (words at:2) = 'class' ifTrue:[
+            ^ clsName , ' class'
+        ]
     ].
     ^ clsName.
 "/ OLD code
 
     (s endsWith:' !!') ifTrue:[
-	s := s copyWithoutLast:2
+        s := s copyWithoutLast:2
     ].
     (s endsWith:')') ifTrue:[
-	s := aString copyTo:(aString lastIndexOf:$()-1.
-	s := s withoutSpaces.
+        s := aString copyTo:(aString lastIndexOf:$()-1.
+        s := s withoutSpaces.
     ].
     (s endsWith:' !!') ifTrue:[
-	s := s copyWithoutLast:2
+        s := s copyWithoutLast:2
     ].
     pos := s lastIndexOf:(Character space).
     ^ s copyTo:(pos - 1)
@@ -6485,8 +6489,12 @@
     |pos s|
 
     s := aString string withoutSpaces.
-    (s includes:$}) ifTrue:[
-        s := s copyTo:(s lastIndexOf:${) - 1.
+    (s includes:${ ) ifTrue:[
+        s := s copyTo:(s indexOf:${ ) - 1.
+        s := s withoutSpaces.
+    ].
+    (s includes:$[ ) ifTrue:[
+        s := s copyTo:(s indexOf:$[ ) - 1.
         s := s withoutSpaces.
     ].
 
@@ -13653,6 +13661,6 @@
 !BrowserView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/BrowserView.st,v 1.533 1999-08-10 18:03:18 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/BrowserView.st,v 1.534 1999-08-12 08:59:54 cg Exp $'
 ! !
 BrowserView initialize!