Smalltalk.st
changeset 12172 d90a72004f43
parent 12033 02d652cdb876
child 12194 208afdcf182b
--- a/Smalltalk.st	Wed Oct 07 20:31:49 2009 +0200
+++ b/Smalltalk.st	Wed Oct 07 21:50:11 2009 +0200
@@ -5320,32 +5320,39 @@
     |cls nonMetaclass nm nameWithPrefix nameWithoutPrefix|
 
     aClassOrClassName isBehavior ifTrue:[
-	cls := aClassOrClassName.
+        cls := aClassOrClassName.
     ] ifFalse:[
-	cls := Smalltalk classNamed:aClassOrClassName.
-	cls isNil ifTrue:[
-	    nameWithPrefix := aClassOrClassName.
-	    nameWithoutPrefix := (aClassOrClassName copyFrom:(aClassOrClassName lastIndexOf:$:)+1).
-	].
+        cls := Smalltalk classNamed:aClassOrClassName.
+        cls isNil ifTrue:[
+            nameWithPrefix := aClassOrClassName.
+            nameWithoutPrefix := (aClassOrClassName copyFrom:(aClassOrClassName lastIndexOf:$:)+1).
+        ].
     ].
 
     cls notNil ifTrue:[
-	nonMetaclass := cls theNonMetaclass.
-	nm := nonMetaclass getClassFilename.
-	nm notNil ifTrue:[^ nm asFilename withoutSuffix baseName].
-	nameWithPrefix := nonMetaclass name.
-	nameWithoutPrefix := nonMetaclass nameWithoutPrefix.
+        nonMetaclass := cls theNonMetaclass.
+        nm := nonMetaclass getClassFilename.
+        nm isNil ifTrue:[
+            cls revisionInfo notNil ifTrue:[
+                nm := cls revisionInfo fileName.
+            ].                            
+        ].
+        nm notNil ifTrue:[
+            ^ nm asFilename withoutSuffix baseName
+        ].
+        nameWithPrefix := nonMetaclass name.
+        nameWithoutPrefix := nonMetaclass nameWithoutPrefix.
     ].
 
     CachedAbbreviations notNil ifTrue:[
-	nameWithPrefix := nameWithPrefix asSymbol.
-	(CachedAbbreviations includesKey:nameWithPrefix) ifTrue:[
-	    ^ (CachedAbbreviations at:nameWithPrefix) asFilename baseName
-	].
-	nameWithoutPrefix := nameWithoutPrefix asSymbol.
-	(CachedAbbreviations includesKey:nameWithoutPrefix) ifTrue:[
-	    ^ (CachedAbbreviations at:nameWithoutPrefix) asFilename baseName
-	].
+        nameWithPrefix := nameWithPrefix asSymbol.
+        (CachedAbbreviations includesKey:nameWithPrefix) ifTrue:[
+            ^ (CachedAbbreviations at:nameWithPrefix) asFilename baseName
+        ].
+        nameWithoutPrefix := nameWithoutPrefix asSymbol.
+        (CachedAbbreviations includesKey:nameWithoutPrefix) ifTrue:[
+            ^ (CachedAbbreviations at:nameWithoutPrefix) asFilename baseName
+        ].
     ].
 
     ^ nameWithPrefix copyReplaceAll:$: with:$_
@@ -7235,5 +7242,9 @@
 !Smalltalk class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Smalltalk.st,v 1.889 2009-09-25 19:33:50 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Smalltalk.st,v 1.890 2009-10-07 19:50:11 cg Exp $'
+!
+
+version_CVS
+    ^ '$Header: /cvs/stx/stx/libbasic/Smalltalk.st,v 1.890 2009-10-07 19:50:11 cg Exp $'
 ! !