--- a/Smalltalk.st Fri Jul 11 02:23:31 2014 +0200
+++ b/Smalltalk.st Fri Jul 11 02:25:55 2014 +0200
@@ -5892,312 +5892,312 @@
wasLazy := Compiler compileLazy:loadLazy.
beSilent notNil ifTrue:[
- wasSilent := self silentLoading:beSilent.
+ wasSilent := self silentLoading:beSilent.
].
classFileName := Smalltalk fileNameForClass:aClassName.
(classFileName = aClassName) ifTrue:[
- "/ no abbrev.stc translation for className
- (aClassName includes:$:) ifTrue:[
- "/ a nameSpace name
- alternativeClassFileName := classFileName copyFrom:(classFileName lastIndexOf:$:)+1
- ].
+ "/ no abbrev.stc translation for className
+ (aClassName includes:$:) ifTrue:[
+ "/ a nameSpace name
+ alternativeClassFileName := classFileName copyFrom:(classFileName lastIndexOf:$:)+1
+ ].
].
classFileName asFilename isAbsolute ifTrue:[
- classFileName asFilename suffix notEmptyOrNil ifTrue:[
- ok := self fileIn:classFileName lazy:loadLazy silent:beSilent.
- ] ifFalse:[
- ok := self fileInSourceFile:classFileName lazy:loadLazy silent:beSilent.
- ]
+ classFileName asFilename suffix notEmptyOrNil ifTrue:[
+ ok := self fileIn:classFileName lazy:loadLazy silent:beSilent.
+ ] ifFalse:[
+ ok := self fileInSourceFile:classFileName lazy:loadLazy silent:beSilent.
+ ]
] ifFalse:[
- classFileName := classFileName copyReplaceAll:$: with:$_.
- [
- Class withoutUpdatingChangesDo:[
- |zarFn zar entry|
-
- ok := false.
-
- package notNil ifTrue:[
- packageDir := package asPackageId projectDirectory.
- "/ packageDir := package asString.
- "/ packageDir := packageDir copyReplaceAll:$: with:$/.
- packageDir isNil ifTrue:[
- packageDir := self packageDirectoryForPackageId:package
- ].
- packageDir notNil ifTrue:[
- packageDir := packageDir asFilename.
- ].
- ].
-
- Class packageQuerySignal answer:package do:[
- "
- then, if dynamic linking is available,
- "
- (LoadBinaries and:[ObjectFileLoader notNil]) ifTrue:[
- sharedLibExtension := ObjectFileLoader sharedLibraryExtension.
- "
- first look for a class packages shared binary in binary/xxx.o
- "
- libName := self libraryFileNameOfClass:aClassName.
- libName notNil ifTrue:[
- (ok := self fileInClass:aClassName fromObject:(libName, sharedLibExtension))
- ifFalse:[
- sharedLibExtension ~= '.o' ifTrue:[
- ok := self fileInClass:aClassName fromObject:(libName, '.o')
- ]
- ].
- ].
- "
- then, look for a shared binary in binary/xxx.o
- "
- ok ifFalse:[
- (ok := self fileInClass:aClassName fromObject:(classFileName, sharedLibExtension))
- ifFalse:[
- sharedLibExtension ~= '.o' ifTrue:[
- ok := self fileInClass:aClassName fromObject:(classFileName, '.o')
- ].
- ok ifFalse:[
- alternativeClassFileName notNil ifTrue:[
- (ok := self fileInClass:aClassName fromObject:(alternativeClassFileName, sharedLibExtension))
- ifFalse:[
- sharedLibExtension ~= '.o' ifTrue:[
- ok := self fileInClass:aClassName fromObject:(alternativeClassFileName, '.o')
- ]
- ]
- ].
- ].
- ].
- ].
- ].
-
- "
- if that did not work, look for a compiled-bytecode file ...
- "
- ok ifFalse:[
- (ok := self fileIn:(classFileName , '.cls') lazy:loadLazy silent:beSilent)
- ifFalse:[
- alternativeClassFileName notNil ifTrue:[
- ok := self fileIn:(alternativeClassFileName , '.cls') lazy:loadLazy silent:beSilent
- ]
- ]
- ].
- "
- if that did not work, and the classes package is known,
- look for an st-cls file
- in a package subdir of the source-directory ...
- "
- ok ifFalse:[
- (packageDir notNil and:[BinaryObjectStorage notNil]) ifTrue:[
- packageFile := self getPackageFileName:((packageDir / 'classes' / classFileName) addSuffix:'cls').
- packageFile isNil ifTrue:[
- packageFile := (packageDir / 'classes' / classFileName) addSuffix:'cls'.
- ].
- (ok := self fileIn:packageFile lazy:loadLazy silent:beSilent)
- ifFalse:[
- alternativeClassFileName notNil ifTrue:[
- packageFile := self getPackageFileName:((packageDir / 'classes' / alternativeClassFileName) addSuffix:'cls').
- packageFile isNil ifTrue:[
- packageFile := ((packageDir / 'classes' / alternativeClassFileName) addSuffix:'cls').
- ].
- ok := self fileIn:packageFile lazy:loadLazy silent:beSilent
- ]
- ].
-
- zarFn := self getPackageFileName:(packageDir / 'classes.zip').
- zarFn notNil ifTrue:[
- zar := ZipArchive oldFileNamed:zarFn.
- zar notNil ifTrue:[
- entry := zar extract:(classFileName , '.cls').
- (entry isNil and:[alternativeClassFileName notNil]) ifTrue:[
- entry := zar extract:(alternativeClassFileName , '.cls').
- ].
- entry notNil ifTrue:[
- bos := BinaryObjectStorage onOld:(entry asByteArray readStream).
- bos next.
- bos close.
- ok := true
- ].
- ]
- ]
- ]
- ].
-
- "
- if that did not work, look for an st-source file ...
- "
- ok ifFalse:[
- filenameToSet := classFileName.
- (ok := self fileInSourceFile:filenameToSet lazy:loadLazy silent:beSilent)
- ifFalse:[
- alternativeClassFileName notNil ifTrue:[
- filenameToSet := alternativeClassFileName.
- ok := self fileInSourceFile:filenameToSet lazy:loadLazy silent:beSilent
- ].
- ok ifFalse:[
- "
- ... and in the standard source-directory
- "
- filenameToSet := 'source' asFilename / classFileName.
- (ok := self fileInSourceFile:filenameToSet lazy:loadLazy silent:beSilent)
- ifFalse:[
- alternativeClassFileName notNil ifTrue:[
- filenameToSet := 'source' asFilename / alternativeClassFileName.
- ok := self fileInSourceFile:filenameToSet lazy:loadLazy silent:beSilent
- ]
- ]
- ]
- ].
- "
- if that did not work, and the classes package is known,
- look for an st-source file
- in a package subdir of the source-directory ...
- "
- ok ifFalse:[
- packageDir notNil ifTrue:[
- packageFile := self getPackageSourceFileName:(packageDir / 'source' / classFileName).
- packageFile isNil ifTrue:[
- packageFile := (packageDir / 'source' / classFileName).
- ].
- filenameToSet := packageFile.
- (ok := self fileInSourceFile:packageFile lazy:loadLazy silent:beSilent)
- ifFalse:[
- alternativeClassFileName notNil ifTrue:[
- packageFile := self getPackageSourceFileName:(packageDir / 'source' / alternativeClassFileName).
- packageFile isNil ifTrue:[
- packageFile := (packageDir / 'source' / alternativeClassFileName).
- ].
- filenameToSet := packageFile.
- ok := self fileInSourceFile:packageFile lazy:loadLazy silent:beSilent
- ].
- ok ifFalse:[
- packageFile := self getPackageSourceFileName:(packageDir / classFileName).
- packageFile isNil ifTrue:[
- packageFile := (packageDir / classFileName).
- ].
- filenameToSet := packageFile.
- (ok := self fileInSourceFile:packageFile lazy:loadLazy silent:beSilent)
- ifFalse:[
- alternativeClassFileName notNil ifTrue:[
- packageFile := self getPackageFileName:(packageDir / alternativeClassFileName).
- packageFile isNil ifTrue:[
- packageFile := packageDir / alternativeClassFileName.
- ].
- filenameToSet := packageFile.
- ok := self fileInSourceFile:packageFile lazy:loadLazy silent:beSilent
- ].
- ok ifFalse:[
- "
- ... and in the standard source-directory
- "
- filenameToSet := 'source' asFilename / packageDir / classFileName.
- (ok := self fileInSourceFile:filenameToSet lazy:loadLazy silent:beSilent)
- ifFalse:[
- alternativeClassFileName notNil ifTrue:[
- filenameToSet := 'source' asFilename / packageDir / alternativeClassFileName.
- ok := self fileInSourceFile:filenameToSet lazy:loadLazy silent:beSilent
- ]
- ]
- ]
- ].
- ].
- ].
- ]
- ].
- "
- if that did not work, and the classes package is known,
- look for a zipArchive containing a class entry.
- "
- ok ifFalse:[
- packageDir notNil ifTrue:[
- zarFn := self getPackageFileName:(packageDir / 'source.zip').
- zarFn isNil ifTrue:[
- zarFn := packageDir withSuffix:'zip'.
- zarFn := self getSourceFileName:zarFn.
- ].
- (zarFn notNil and:[zarFn asFilename exists]) ifTrue:[
- zar := ZipArchive oldFileNamed:zarFn.
- zar notNil ifTrue:[
- entry := zar extract:(classFileName , '.st').
- (entry isNil and:[alternativeClassFileName notNil]) ifTrue:[
- entry := zar extract:(alternativeClassFileName , '.st').
- ].
- entry notNil ifTrue:[
- filenameToSet := zarFn.
- ok := self
- fileInStream:(entry asString readStream)
- lazy:loadLazy
- silent:beSilent
- logged:false
- addPath:nil
- ].
- ]
- ]
- ]
- ].
-
- "
- if that did not work,
- look for a zipArchive containing a class entry.
- "
- ok ifFalse:[
- zarFn := self getSourceFileName:'source.zip'.
- zarFn notNil ifTrue:[
- zar := ZipArchive oldFileNamed:zarFn.
- zar notNil ifTrue:[
- entry := zar extract:(zarFn := classFileName , '.st').
- (entry isNil and:[alternativeClassFileName notNil]) ifTrue:[
- entry := zar extract:(zarFn := alternativeClassFileName , '.st').
- ].
- entry notNil ifTrue:[
- filenameToSet := zarFn.
- ok := self
- fileInStream:(entry asString readStream)
- lazy:loadLazy
- silent:beSilent
- logged:false
- addPath:nil
- ].
- ]
- ]
- ].
- ok ifFalse:[
- "
- if there is a sourceCodeManager, ask it for the classes sourceCode
- "
- (mgr := Smalltalk at:#SourceCodeManager) notNil ifTrue:[
- inStream := mgr getMostRecentSourceStreamForClassNamed:aClassName inPackage:package.
- inStream notNil ifTrue:[
- filenameToSet := nil.
- ok := self fileInStream:inStream lazy:loadLazy silent:beSilent logged:false addPath:nil.
- ]
- ].
- ].
- ].
- ]
- ].
- ] ensure:[
- Compiler compileLazy:wasLazy.
- wasSilent notNil ifTrue:[
- self silentLoading:wasSilent
- ]
- ].
+ classFileName := classFileName copyReplaceAll:$: with:$_ ifNone:classFileName.
+ [
+ Class withoutUpdatingChangesDo:[
+ |zarFn zar entry|
+
+ ok := false.
+
+ package notNil ifTrue:[
+ packageDir := package asPackageId projectDirectory.
+ "/ packageDir := package asString.
+ "/ packageDir := packageDir copyReplaceAll:$: with:$/.
+ packageDir isNil ifTrue:[
+ packageDir := self packageDirectoryForPackageId:package
+ ].
+ packageDir notNil ifTrue:[
+ packageDir := packageDir asFilename.
+ ].
+ ].
+
+ Class packageQuerySignal answer:package do:[
+ "
+ then, if dynamic linking is available,
+ "
+ (LoadBinaries and:[ObjectFileLoader notNil]) ifTrue:[
+ sharedLibExtension := ObjectFileLoader sharedLibraryExtension.
+ "
+ first look for a class packages shared binary in binary/xxx.o
+ "
+ libName := self libraryFileNameOfClass:aClassName.
+ libName notNil ifTrue:[
+ (ok := self fileInClass:aClassName fromObject:(libName, sharedLibExtension))
+ ifFalse:[
+ sharedLibExtension ~= '.o' ifTrue:[
+ ok := self fileInClass:aClassName fromObject:(libName, '.o')
+ ]
+ ].
+ ].
+ "
+ then, look for a shared binary in binary/xxx.o
+ "
+ ok ifFalse:[
+ (ok := self fileInClass:aClassName fromObject:(classFileName, sharedLibExtension))
+ ifFalse:[
+ sharedLibExtension ~= '.o' ifTrue:[
+ ok := self fileInClass:aClassName fromObject:(classFileName, '.o')
+ ].
+ ok ifFalse:[
+ alternativeClassFileName notNil ifTrue:[
+ (ok := self fileInClass:aClassName fromObject:(alternativeClassFileName, sharedLibExtension))
+ ifFalse:[
+ sharedLibExtension ~= '.o' ifTrue:[
+ ok := self fileInClass:aClassName fromObject:(alternativeClassFileName, '.o')
+ ]
+ ]
+ ].
+ ].
+ ].
+ ].
+ ].
+
+ "
+ if that did not work, look for a compiled-bytecode file ...
+ "
+ ok ifFalse:[
+ (ok := self fileIn:(classFileName , '.cls') lazy:loadLazy silent:beSilent)
+ ifFalse:[
+ alternativeClassFileName notNil ifTrue:[
+ ok := self fileIn:(alternativeClassFileName , '.cls') lazy:loadLazy silent:beSilent
+ ]
+ ]
+ ].
+ "
+ if that did not work, and the classes package is known,
+ look for an st-cls file
+ in a package subdir of the source-directory ...
+ "
+ ok ifFalse:[
+ (packageDir notNil and:[BinaryObjectStorage notNil]) ifTrue:[
+ packageFile := self getPackageFileName:((packageDir / 'classes' / classFileName) addSuffix:'cls').
+ packageFile isNil ifTrue:[
+ packageFile := (packageDir / 'classes' / classFileName) addSuffix:'cls'.
+ ].
+ (ok := self fileIn:packageFile lazy:loadLazy silent:beSilent)
+ ifFalse:[
+ alternativeClassFileName notNil ifTrue:[
+ packageFile := self getPackageFileName:((packageDir / 'classes' / alternativeClassFileName) addSuffix:'cls').
+ packageFile isNil ifTrue:[
+ packageFile := ((packageDir / 'classes' / alternativeClassFileName) addSuffix:'cls').
+ ].
+ ok := self fileIn:packageFile lazy:loadLazy silent:beSilent
+ ]
+ ].
+
+ zarFn := self getPackageFileName:(packageDir / 'classes.zip').
+ zarFn notNil ifTrue:[
+ zar := ZipArchive oldFileNamed:zarFn.
+ zar notNil ifTrue:[
+ entry := zar extract:(classFileName , '.cls').
+ (entry isNil and:[alternativeClassFileName notNil]) ifTrue:[
+ entry := zar extract:(alternativeClassFileName , '.cls').
+ ].
+ entry notNil ifTrue:[
+ bos := BinaryObjectStorage onOld:(entry asByteArray readStream).
+ bos next.
+ bos close.
+ ok := true
+ ].
+ ]
+ ]
+ ]
+ ].
+
+ "
+ if that did not work, look for an st-source file ...
+ "
+ ok ifFalse:[
+ filenameToSet := classFileName.
+ (ok := self fileInSourceFile:filenameToSet lazy:loadLazy silent:beSilent)
+ ifFalse:[
+ alternativeClassFileName notNil ifTrue:[
+ filenameToSet := alternativeClassFileName.
+ ok := self fileInSourceFile:filenameToSet lazy:loadLazy silent:beSilent
+ ].
+ ok ifFalse:[
+ "
+ ... and in the standard source-directory
+ "
+ filenameToSet := 'source' asFilename / classFileName.
+ (ok := self fileInSourceFile:filenameToSet lazy:loadLazy silent:beSilent)
+ ifFalse:[
+ alternativeClassFileName notNil ifTrue:[
+ filenameToSet := 'source' asFilename / alternativeClassFileName.
+ ok := self fileInSourceFile:filenameToSet lazy:loadLazy silent:beSilent
+ ]
+ ]
+ ]
+ ].
+ "
+ if that did not work, and the classes package is known,
+ look for an st-source file
+ in a package subdir of the source-directory ...
+ "
+ ok ifFalse:[
+ packageDir notNil ifTrue:[
+ packageFile := self getPackageSourceFileName:(packageDir / 'source' / classFileName).
+ packageFile isNil ifTrue:[
+ packageFile := (packageDir / 'source' / classFileName).
+ ].
+ filenameToSet := packageFile.
+ (ok := self fileInSourceFile:packageFile lazy:loadLazy silent:beSilent)
+ ifFalse:[
+ alternativeClassFileName notNil ifTrue:[
+ packageFile := self getPackageSourceFileName:(packageDir / 'source' / alternativeClassFileName).
+ packageFile isNil ifTrue:[
+ packageFile := (packageDir / 'source' / alternativeClassFileName).
+ ].
+ filenameToSet := packageFile.
+ ok := self fileInSourceFile:packageFile lazy:loadLazy silent:beSilent
+ ].
+ ok ifFalse:[
+ packageFile := self getPackageSourceFileName:(packageDir / classFileName).
+ packageFile isNil ifTrue:[
+ packageFile := (packageDir / classFileName).
+ ].
+ filenameToSet := packageFile.
+ (ok := self fileInSourceFile:packageFile lazy:loadLazy silent:beSilent)
+ ifFalse:[
+ alternativeClassFileName notNil ifTrue:[
+ packageFile := self getPackageFileName:(packageDir / alternativeClassFileName).
+ packageFile isNil ifTrue:[
+ packageFile := packageDir / alternativeClassFileName.
+ ].
+ filenameToSet := packageFile.
+ ok := self fileInSourceFile:packageFile lazy:loadLazy silent:beSilent
+ ].
+ ok ifFalse:[
+ "
+ ... and in the standard source-directory
+ "
+ filenameToSet := 'source' asFilename / packageDir / classFileName.
+ (ok := self fileInSourceFile:filenameToSet lazy:loadLazy silent:beSilent)
+ ifFalse:[
+ alternativeClassFileName notNil ifTrue:[
+ filenameToSet := 'source' asFilename / packageDir / alternativeClassFileName.
+ ok := self fileInSourceFile:filenameToSet lazy:loadLazy silent:beSilent
+ ]
+ ]
+ ]
+ ].
+ ].
+ ].
+ ]
+ ].
+ "
+ if that did not work, and the classes package is known,
+ look for a zipArchive containing a class entry.
+ "
+ ok ifFalse:[
+ packageDir notNil ifTrue:[
+ zarFn := self getPackageFileName:(packageDir / 'source.zip').
+ zarFn isNil ifTrue:[
+ zarFn := packageDir withSuffix:'zip'.
+ zarFn := self getSourceFileName:zarFn.
+ ].
+ (zarFn notNil and:[zarFn asFilename exists]) ifTrue:[
+ zar := ZipArchive oldFileNamed:zarFn.
+ zar notNil ifTrue:[
+ entry := zar extract:(classFileName , '.st').
+ (entry isNil and:[alternativeClassFileName notNil]) ifTrue:[
+ entry := zar extract:(alternativeClassFileName , '.st').
+ ].
+ entry notNil ifTrue:[
+ filenameToSet := zarFn.
+ ok := self
+ fileInStream:(entry asString readStream)
+ lazy:loadLazy
+ silent:beSilent
+ logged:false
+ addPath:nil
+ ].
+ ]
+ ]
+ ]
+ ].
+
+ "
+ if that did not work,
+ look for a zipArchive containing a class entry.
+ "
+ ok ifFalse:[
+ zarFn := self getSourceFileName:'source.zip'.
+ zarFn notNil ifTrue:[
+ zar := ZipArchive oldFileNamed:zarFn.
+ zar notNil ifTrue:[
+ entry := zar extract:(zarFn := classFileName , '.st').
+ (entry isNil and:[alternativeClassFileName notNil]) ifTrue:[
+ entry := zar extract:(zarFn := alternativeClassFileName , '.st').
+ ].
+ entry notNil ifTrue:[
+ filenameToSet := zarFn.
+ ok := self
+ fileInStream:(entry asString readStream)
+ lazy:loadLazy
+ silent:beSilent
+ logged:false
+ addPath:nil
+ ].
+ ]
+ ]
+ ].
+ ok ifFalse:[
+ "
+ if there is a sourceCodeManager, ask it for the classes sourceCode
+ "
+ (mgr := Smalltalk at:#SourceCodeManager) notNil ifTrue:[
+ inStream := mgr getMostRecentSourceStreamForClassNamed:aClassName inPackage:package.
+ inStream notNil ifTrue:[
+ filenameToSet := nil.
+ ok := self fileInStream:inStream lazy:loadLazy silent:beSilent logged:false addPath:nil.
+ ]
+ ].
+ ].
+ ].
+ ]
+ ].
+ ] ensure:[
+ Compiler compileLazy:wasLazy.
+ wasSilent notNil ifTrue:[
+ self silentLoading:wasSilent
+ ]
+ ].
].
ok ifTrue:[
- newClass := self at:(aClassName asSymbol).
- newClass notNil ifTrue:[
- "set the classes name - but do not change if already set"
- filenameToSet notNil ifTrue:[
- newClass getClassFilename isNil ifTrue:[
- newClass setClassFilename:(filenameToSet asFilename baseName)
- ].
- ].
-
- doInit ifTrue:[
- newClass initialize
- ]
- ]
+ newClass := self at:(aClassName asSymbol).
+ newClass notNil ifTrue:[
+ "set the classes name - but do not change if already set"
+ filenameToSet notNil ifTrue:[
+ newClass getClassFilename isNil ifTrue:[
+ newClass setClassFilename:(filenameToSet asFilename baseName)
+ ].
+ ].
+
+ doInit ifTrue:[
+ newClass initialize
+ ]
+ ]
].
^ newClass
@@ -6580,12 +6580,12 @@
compatQuery := Smalltalk classNamed: 'SVN::CompatModeQuery'.
(compatQuery notNil
and:[compatQuery isLoaded
- and:[compatQuery query not]]) ifTrue:[
- nm := aClassOrClassName isBehavior
- ifTrue:[aClassOrClassName name]
- ifFalse:[aClassOrClassName].
- nm := nm copyReplaceAll:$: with:$_.
- ^nm
+ and:[compatQuery query not]]) ifTrue:[
+ nm := aClassOrClassName isBehavior
+ ifTrue:[aClassOrClassName name]
+ ifFalse:[aClassOrClassName].
+ nm := nm copyReplaceAll:$: with:$_ ifNone:nm.
+ ^nm
].
"/ Same for another query for new libscm. Here we have to do
@@ -6595,58 +6595,58 @@
compatQuery := Smalltalk classNamed: 'SCMCompatModeQuery'.
(compatQuery notNil
and:[compatQuery isLoaded
- and:[(compatPkg := compatQuery query) notNil]]) ifTrue:[
- | compatPkgs |
- "/ Originally libscm could only fileout one package at time so
- "/ the query answered one package name. However, to support nested
- "/ packages, libscm is being rewritten to commit multiple packages
- "/ at once, so query answers a collection of packages. The code below
- "/ makes sure it works for both.
- compatPkgs := compatPkg isString ifTrue:[ Array with: compatPkg] ifFalse:[ compatPkg ].
- nm := aClassOrClassName isBehavior
- ifTrue:[aClassOrClassName name]
- ifFalse:[aClassOrClassName].
- cls := Smalltalk at: nm asSymbol.
- (cls notNil and:[compatPkgs includes: cls package]) ifTrue:[
- nm := nm copyReplaceAll:$: with:$_.
- ^nm
- ].
+ and:[(compatPkg := compatQuery query) notNil]]) ifTrue:[
+ | compatPkgs |
+ "/ Originally libscm could only fileout one package at time so
+ "/ the query answered one package name. However, to support nested
+ "/ packages, libscm is being rewritten to commit multiple packages
+ "/ at once, so query answers a collection of packages. The code below
+ "/ makes sure it works for both.
+ compatPkgs := compatPkg isString ifTrue:[ Array with: compatPkg] ifFalse:[ compatPkg ].
+ nm := aClassOrClassName isBehavior
+ ifTrue:[aClassOrClassName name]
+ ifFalse:[aClassOrClassName].
+ cls := Smalltalk at: nm asSymbol.
+ (cls notNil and:[compatPkgs includes: cls package]) ifTrue:[
+ nm := nm copyReplaceAll:$: with:$_.
+ ^nm
+ ].
].
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 isNil ifTrue:[
- cls revisionInfo notNil ifTrue:[
- nm := cls revisionInfo fileName.
- ].
- ].
- 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:$_
@@ -8257,11 +8257,11 @@
!Smalltalk class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/Smalltalk.st,v 1.1086 2014-07-03 18:51:37 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/Smalltalk.st,v 1.1087 2014-07-11 00:25:55 cg Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libbasic/Smalltalk.st,v 1.1086 2014-07-03 18:51:37 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/Smalltalk.st,v 1.1087 2014-07-11 00:25:55 cg Exp $'
!
version_SVN