--- a/Smalltalk.st Tue Oct 20 10:38:22 2009 +0200
+++ b/Smalltalk.st Tue Oct 20 10:39:53 2009 +0200
@@ -1,6 +1,6 @@
"
COPYRIGHT (c) 1988 by Claus Gittinger
- All Rights Reserved
+ All Rights Reserved
This software is furnished under a license and may be used
only in accordance with the terms of that license and with the
@@ -12,21 +12,21 @@
"{ Package: 'stx:libbasic' }"
Object subclass:#Smalltalk
- instanceVariableNames:''
- classVariableNames:'StartBlocks ImageStartBlocks ExitBlocks CachedClasses
- NumberOfClassesHint SystemPath StartupClass StartupSelector
- StartupArguments CommandLine CommandName CommandLineArguments
- CachedAbbreviations SilentLoading Initializing StandAlone
- HeadlessOperation IsPlugin IsSharedLibraryComponent IsSTScript
- DebuggingStandAlone LogDoits LoadBinaries RealSystemPath
- ResourcePath SourcePath BinaryPath FileInPath PackagePath
- BinaryDirName ResourceDirName SourceDirName BitmapDirName
- PackageDirName FileInDirName ChangeFileName ImageStartTime
- ImageRestartTime DemoMode SaveEmergencyImage SpecialObjectArray
- CallbackSignal KnownPackages ClassesFailedToInitialize
- HasNoConsole'
- poolDictionaries:''
- category:'System-Support'
+ instanceVariableNames:''
+ classVariableNames:'StartBlocks ImageStartBlocks ExitBlocks CachedClasses
+ NumberOfClassesHint SystemPath StartupClass StartupSelector
+ StartupArguments CommandLine CommandName CommandLineArguments
+ CachedAbbreviations SilentLoading Initializing StandAlone
+ HeadlessOperation IsPlugin IsSharedLibraryComponent IsSTScript
+ DebuggingStandAlone LogDoits LoadBinaries RealSystemPath
+ ResourcePath SourcePath BinaryPath FileInPath PackagePath
+ BinaryDirName ResourceDirName SourceDirName BitmapDirName
+ PackageDirName FileInDirName ChangeFileName ImageStartTime
+ ImageRestartTime DemoMode SaveEmergencyImage SpecialObjectArray
+ CallbackSignal KnownPackages ClassesFailedToInitialize
+ HasNoConsole'
+ poolDictionaries:''
+ category:'System-Support'
!
Smalltalk comment:'declared from: ..\..\..\stx\libbasic\abbrev.stc'
@@ -37,7 +37,7 @@
copyright
"
COPYRIGHT (c) 1988 by Claus Gittinger
- All Rights Reserved
+ All Rights Reserved
This software is furnished under a license and may be used
only in accordance with the terms of that license and with the
@@ -67,150 +67,150 @@
[Instance variables:]
- none - all handling is done in the VM
+ none - all handling is done in the VM
[Class variables:]
- StartBlocks <Collection> blocks to be executed in a separate process after
- everything has been initialized. These blocks will
- be deleted after execution and therefore not be
- executed after an image restart. Initial processes
- (such as the Launcher) are usually started here.
- These blocks are added by smalltalk.rc/private.rc etc.
- via #addStartBlock during early initialization.
-
- ImageStartBlocks
- <Collection> blocks to be executed in a separate process after
- everything has been initialized. These blocks will be
- executed after an image restart.
- These blocks are usually added by smalltalk_r.rc etc.
-
- ExitBlocks <Collection> blocks to evaluate before system is
- left. Not currently used (GNU-ST compatibility).
-
- SystemPath <Collection> path to search for system files (sources, bitmaps etc)
- Set to a default here, but typically changed from some
- startup.rc file
-
- PackagePath <Collection> path to search for package.
- This is going to replace the above systemPath, and a classes
- resources will eventually searched in its package directory.
- This list defines the path, where packages are searched for,
- initially this is something like /opt/smalltalk/packages.
- Set to a default here, but typically changed from some
- startup.rc file
-
- StartupClass <Class> class and selector, where the system starts up
- StartupSelector <Symbol> (right after VM initialization)
- StartupArguments <Array> If an image is saved while those being nonNil,
- the image will come up there.
- Allows for customized images to be generated from a standard ST/X.
- StandAlone programs also set those during initialization.
-
- CommandLine <String> Unix (OS-) command line
-
- CommandName <String> the command (i.e. argv[0])
-
- CommandLineArguments <Array> Unix (OS-) command line arguments broken into words
- CommandName has been stripped off.
- (initially set by the VM)
-
- SilentLoading <Boolean> suppresses messages during fileIn and in compiler
- (can be set to true from a customized main.c)
-
- Initializing <Boolean> true while (re-)initializing
- Controls the behavior of certain error
- reporters (for example: suppress dialogBoxes)
- while the system is not yet fit for full operation.
-
- StandAlone <Boolean> true, if this is a standalone app;
- if true the process scheduler watches for
- which processes are still running, and
- exits ST/X, when the last non-background
- and non-system process exits.
- Can be set in an application-specific startup script,
- or, for standAlone programs, by C-code during initialization.
-
- HeadlessOperation if true, a non-existing Display connection
- <Boolean> will NOT lead to an error-exit during startup.
- Default is false.
- Can be set in an application-specific startup script,
- or, for standAlone programs, by C-code during initialization.
-
- LogDoits <Boolean> if true, doits are also logged in the changes
- file. Default is false, since the changes file
- may become huge if every tiny doIt is saved there ...
-
- LoadBinaries <Boolean> if true, we attempt to load classes rom a binary
- file, if present. If false, this is always suppressed.
-
- SaveEmergencyImage <Boolean> if true (the default), an emergency image
- is saved, if the main Display looses its
- connection. This is useful if you have a
- flaky display connection (serial line)
- and want to have your stuff saved automatically
- in case of a broken connection.
+ StartBlocks <Collection> blocks to be executed in a separate process after
+ everything has been initialized. These blocks will
+ be deleted after execution and therefore not be
+ executed after an image restart. Initial processes
+ (such as the Launcher) are usually started here.
+ These blocks are added by smalltalk.rc/private.rc etc.
+ via #addStartBlock during early initialization.
+
+ ImageStartBlocks
+ <Collection> blocks to be executed in a separate process after
+ everything has been initialized. These blocks will be
+ executed after an image restart.
+ These blocks are usually added by smalltalk_r.rc etc.
+
+ ExitBlocks <Collection> blocks to evaluate before system is
+ left. Not currently used (GNU-ST compatibility).
+
+ SystemPath <Collection> path to search for system files (sources, bitmaps etc)
+ Set to a default here, but typically changed from some
+ startup.rc file
+
+ PackagePath <Collection> path to search for package.
+ This is going to replace the above systemPath, and a classes
+ resources will eventually searched in its package directory.
+ This list defines the path, where packages are searched for,
+ initially this is something like /opt/smalltalk/packages.
+ Set to a default here, but typically changed from some
+ startup.rc file
+
+ StartupClass <Class> class and selector, where the system starts up
+ StartupSelector <Symbol> (right after VM initialization)
+ StartupArguments <Array> If an image is saved while those being nonNil,
+ the image will come up there.
+ Allows for customized images to be generated from a standard ST/X.
+ StandAlone programs also set those during initialization.
+
+ CommandLine <String> Unix (OS-) command line
+
+ CommandName <String> the command (i.e. argv[0])
+
+ CommandLineArguments <Array> Unix (OS-) command line arguments broken into words
+ CommandName has been stripped off.
+ (initially set by the VM)
+
+ SilentLoading <Boolean> suppresses messages during fileIn and in compiler
+ (can be set to true from a customized main.c)
+
+ Initializing <Boolean> true while (re-)initializing
+ Controls the behavior of certain error
+ reporters (for example: suppress dialogBoxes)
+ while the system is not yet fit for full operation.
+
+ StandAlone <Boolean> true, if this is a standalone app;
+ if true the process scheduler watches for
+ which processes are still running, and
+ exits ST/X, when the last non-background
+ and non-system process exits.
+ Can be set in an application-specific startup script,
+ or, for standAlone programs, by C-code during initialization.
+
+ HeadlessOperation if true, a non-existing Display connection
+ <Boolean> will NOT lead to an error-exit during startup.
+ Default is false.
+ Can be set in an application-specific startup script,
+ or, for standAlone programs, by C-code during initialization.
+
+ LogDoits <Boolean> if true, doits are also logged in the changes
+ file. Default is false, since the changes file
+ may become huge if every tiny doIt is saved there ...
+
+ LoadBinaries <Boolean> if true, we attempt to load classes rom a binary
+ file, if present. If false, this is always suppressed.
+
+ SaveEmergencyImage <Boolean> if true (the default), an emergency image
+ is saved, if the main Display looses its
+ connection. This is useful if you have a
+ flaky display connection (serial line)
+ and want to have your stuff saved automatically
+ in case of a broken connection.
strictly private classVariables (helpers):
- CachedClasses <Collection> known classes (cached for faster class enumeration)
-
- CachedAbbreviations
- <Dictionary> className to filename mappings
-
- RealSystemPath <Collection> cached collection of directories along the path
- which really exist. Caching avoids long checks
- for existing directories on broken NFS volumes.
-
- SourcePath <Collection> cached names of really existing directories
- These are remembered, as in NFS systems,
- ResourcePath the time to lookup files may become long
- BinaryPath (especially, if some directories are on machines
- FileInPath which are not up ...).
- Therefore, the set of really
- existing directories is cached when the SystemPath
- is walked the first time.
- A consequence is that you have to invoke
- flushSystemPath, when you create any of those
- directories while running
- (and want the running ST/X to look there)
+ CachedClasses <Collection> known classes (cached for faster class enumeration)
+
+ CachedAbbreviations
+ <Dictionary> className to filename mappings
+
+ RealSystemPath <Collection> cached collection of directories along the path
+ which really exist. Caching avoids long checks
+ for existing directories on broken NFS volumes.
+
+ SourcePath <Collection> cached names of really existing directories
+ These are remembered, as in NFS systems,
+ ResourcePath the time to lookup files may become long
+ BinaryPath (especially, if some directories are on machines
+ FileInPath which are not up ...).
+ Therefore, the set of really
+ existing directories is cached when the SystemPath
+ is walked the first time.
+ A consequence is that you have to invoke
+ flushSystemPath, when you create any of those
+ directories while running
+ (and want the running ST/X to look there)
[author:]
- Claus Gittinger
+ Claus Gittinger
[see also:]
- ObjectMemory
- StandaloneStartup
- GetOpt
- ReadEvalPrintLoop
+ ObjectMemory
+ StandaloneStartup
+ GetOpt
+ ReadEvalPrintLoop
"
!
readme_resources
"
What is a resource file:
- resource files contain language transformation and sometimes
- UI-look specifics such as icons etc.
+ resource files contain language transformation and sometimes
+ UI-look specifics such as icons etc.
Where are resources stored in the image:
- Resource files are only read on demand (i.e. when needed) and only read once
- i.e. they are cached in the image).
- The cached data is held in a per-class class-instVar named 'ClassResources'.
- With only a few exceptions, the only classes which need resources are the GUI
- classes under the SimpleView hierarchy.
+ Resource files are only read on demand (i.e. when needed) and only read once
+ i.e. they are cached in the image).
+ The cached data is held in a per-class class-instVar named 'ClassResources'.
+ With only a few exceptions, the only classes which need resources are the GUI
+ classes under the SimpleView hierarchy.
How does the system find resources:
- The idea is that the system-provided resource files can be overwritten
- by the user or an application configuration.
- This works via a hierarchy of directories where resources are searched for,
- with the systems standard resource-files being at the end of that chain.
-
- When searching for a resource file for class X, the following files are searched
- in order:
- {ResourcePath} / resources / X.rs
- {SystemPath} / (CLASSES-PACKAGE-PATH) / X.rs
- {ResourcePath} / (CLASSES-PACKAGE-PATH) / X.rs
+ The idea is that the system-provided resource files can be overwritten
+ by the user or an application configuration.
+ This works via a hierarchy of directories where resources are searched for,
+ with the systems standard resource-files being at the end of that chain.
+
+ When searching for a resource file for class X, the following files are searched
+ in order:
+ {ResourcePath} / resources / X.rs
+ {SystemPath} / (CLASSES-PACKAGE-PATH) / X.rs
+ {ResourcePath} / (CLASSES-PACKAGE-PATH) / X.rs
"
! !
@@ -222,8 +222,8 @@
right after startup, ususally immediately followed by Smalltalk>>start.
[with error handling, via the initializeSystem]
Notice:
- this is not called when an image is restarted; in this
- case the show starts in Smalltalk>>restart."
+ this is not called when an image is restarted; in this
+ case the show starts in Smalltalk>>restart."
"/
"/ start catching SIGSEGV and SIGBUS
@@ -254,12 +254,12 @@
Compiler := ByteCodeCompiler.
Compiler isNil ifTrue:[
- "
- ByteCodeCompiler is not in the system (i.e. has not been linked in)
- this allows at least immediate evaluations for runtime systems without compiler
- NOTICE: a parser is always needed, otherwise we cannot read resource files etc.
- "
- Compiler := Parser
+ "
+ ByteCodeCompiler is not in the system (i.e. has not been linked in)
+ this allows at least immediate evaluations for runtime systems without compiler
+ NOTICE: a parser is always needed, otherwise we cannot read resource files etc.
+ "
+ Compiler := Parser
].
"/
@@ -294,20 +294,20 @@
|envString i langString terrString|
StandAlone isNil ifTrue:[
- StandAlone := false.
+ StandAlone := false.
].
HeadlessOperation isNil ifTrue:[
- HeadlessOperation := false.
+ HeadlessOperation := false.
].
"
extract Language and LanguageTerritory from LANG variable.
valid are for example:
- en_en / en
- en_us
- en_gb
- de_de / de
- de_at (for Austria)
+ en_en / en
+ en_us
+ en_gb
+ de_de / de
+ de_at (for Austria)
"
Language := #en.
@@ -315,35 +315,35 @@
"Format of LANG is: language[_territory][.codeset][@modifier]
- language ISO-639 Language code
- territory ISO-3166 Contry code"
+ language ISO-639 Language code
+ territory ISO-3166 Contry code"
envString := OperatingSystem getLanguage.
envString size > 0 ifTrue:[
- i := envString indexOf:$@.
- (i ~~ 0) ifTrue:[
- envString := envString copyTo:(i - 1).
- LanguageModifier := (envString copyFrom:(i + 1)) asLowercase asSymbol.
- ] ifFalse:[
- LanguageModifier := nil.
- ].
- i := envString indexOf:$..
- (i ~~ 0) ifTrue:[
- envString := envString copyTo:(i - 1).
- LanguageCodeset := (envString copyFrom:(i + 1)) asLowercase asSymbol
- ] ifFalse:[
- LanguageCodeset := #'iso8859-1'.
- ].
- i := envString indexOf:$_.
- (i == 0) ifTrue:[
- langString := envString.
- terrString := envString
- ] ifFalse:[
- langString := envString copyTo:(i - 1).
- terrString := envString copyFrom:(i + 1)
- ].
- Language := langString asLowercase asSymbol.
- LanguageTerritory := terrString asLowercase asSymbol
+ i := envString indexOf:$@.
+ (i ~~ 0) ifTrue:[
+ envString := envString copyTo:(i - 1).
+ LanguageModifier := (envString copyFrom:(i + 1)) asLowercase asSymbol.
+ ] ifFalse:[
+ LanguageModifier := nil.
+ ].
+ i := envString indexOf:$..
+ (i ~~ 0) ifTrue:[
+ envString := envString copyTo:(i - 1).
+ LanguageCodeset := (envString copyFrom:(i + 1)) asLowercase asSymbol
+ ] ifFalse:[
+ LanguageCodeset := #'iso8859-1'.
+ ].
+ i := envString indexOf:$_.
+ (i == 0) ifTrue:[
+ langString := envString.
+ terrString := envString
+ ] ifFalse:[
+ langString := envString copyTo:(i - 1).
+ terrString := envString copyFrom:(i + 1)
+ ].
+ Language := langString asLowercase asSymbol.
+ LanguageTerritory := terrString asLowercase asSymbol
].
"
@@ -378,7 +378,7 @@
Stderr := NonPositionableExternalStream forStderr.
Stdin := NonPositionableExternalStream forStdin.
PrinterStream notNil ifTrue:[
- Printer := PrinterStream defaultPrinter.
+ Printer := PrinterStream defaultPrinter.
].
Transcript := Stderr
@@ -395,13 +395,13 @@
they will redefine Inspector and Debugger for graphical interfaces"
Display notNil ifTrue:[
- InspectorView notNil ifTrue:[
- Inspector := InspectorView
- ].
- DebugView notNil ifTrue:[
- Debugger := DebugView
- ].
- "/ Display initialize
+ InspectorView notNil ifTrue:[
+ Inspector := InspectorView
+ ].
+ DebugView notNil ifTrue:[
+ Debugger := DebugView
+ ].
+ "/ Display initialize
]
"
@@ -412,66 +412,66 @@
initSystemPath
"setup path where system files are searched for.
the default path is set to:
- .
- <directory of exe> (WIN32 only)
- $HOME (if defined)
- $HOME/.smalltalk (if defined & existing)
- $SMALLTALK_LIBDIR (if defined & existing)
- $STX_LIBDIR (if defined & existing)
- $STX_TOPDIR (if defined & existing)
- REGISTRY('HKEY_LOCAL_MACHINE\Software\eXept\Smalltalk/X\<CurrentVersion>\LibDir') (WIN32 only)
- REGISTRY('HKEY_LOCAL_MACHINE\Software\eXept\Smalltalk/X\LibDir') (WIN32 only)
- <standard places>
+ .
+ <directory of exe> (WIN32 only)
+ $HOME (if defined)
+ $HOME/.smalltalk (if defined & existing)
+ $SMALLTALK_LIBDIR (if defined & existing)
+ $STX_LIBDIR (if defined & existing)
+ $STX_TOPDIR (if defined & existing)
+ REGISTRY('HKEY_LOCAL_MACHINE\Software\eXept\Smalltalk/X\<CurrentVersion>\LibDir') (WIN32 only)
+ REGISTRY('HKEY_LOCAL_MACHINE\Software\eXept\Smalltalk/X\LibDir') (WIN32 only)
+ <standard places>
standard places (unix):
- /opt/smalltalk/<release> (if existing)
- /opt/smalltalk (if existing)
- /usr/local/lib/smalltalk (if existing)
- /usr/lib/smalltalk (if existing)
- /lib/smalltalk (if existing)
+ /opt/smalltalk/<release> (if existing)
+ /opt/smalltalk (if existing)
+ /usr/local/lib/smalltalk (if existing)
+ /usr/lib/smalltalk (if existing)
+ /lib/smalltalk (if existing)
win32:
- \programs\exept\smalltalk (if existing)
- \programs\smalltalk (if existing)
- \smalltalk (if existing)
+ \programs\exept\smalltalk (if existing)
+ \programs\smalltalk (if existing)
+ \smalltalk (if existing)
vms:
- $stx:lib (if existing)
- $stx:root (if existing)
+ $stx:lib (if existing)
+ $stx:root (if existing)
of course, it is possible to add entries from the 'smalltalk.rc'
startup file; add expressions such as:
- Smalltalk systemPath addFirst:'/foo/bar/baz'.
- or:
- Smalltalk systemPath addLast:'/fee/foe/foo'.
+ Smalltalk systemPath addFirst:'/foo/bar/baz'.
+ or:
+ Smalltalk systemPath addLast:'/fee/foe/foo'.
However, smalltalk.rc itself must be found along the above path.
"
ChangeFileName := 'changes'.
OperatingSystem isVMSlike ifTrue:[
- BitmapDirName := 'bitmaps.dir'.
- BinaryDirName := 'binary.dir'.
- SourceDirName := 'source.dir'.
- ResourceDirName := 'resources.dir'.
- FileInDirName := 'filein.dir'.
- PackageDirName := 'packages.dir'.
+ BitmapDirName := 'bitmaps.dir'.
+ BinaryDirName := 'binary.dir'.
+ SourceDirName := 'source.dir'.
+ ResourceDirName := 'resources.dir'.
+ FileInDirName := 'filein.dir'.
+ PackageDirName := 'packages.dir'.
] ifFalse:[
- BitmapDirName := 'bitmaps'.
- BinaryDirName := 'binary'.
- SourceDirName := 'source'.
- ResourceDirName := 'resources'.
- FileInDirName := 'fileIn'.
- PackageDirName := 'packages'.
+ BitmapDirName := 'bitmaps'.
+ BinaryDirName := 'binary'.
+ SourceDirName := 'source'.
+ ResourceDirName := 'resources'.
+ FileInDirName := 'fileIn'.
+ PackageDirName := 'packages'.
].
SystemPath isNil ifTrue:[
- SystemPath := OperatingSystem defaultSystemPath.
- self flushPathCaches
+ SystemPath := OperatingSystem defaultSystemPath.
+ self flushPathCaches
].
PackagePath isNil ifTrue:[
- PackagePath := OperatingSystem defaultPackagePath.
+ PackagePath := OperatingSystem defaultPackagePath.
].
"
@@ -499,17 +499,17 @@
"sent from VM via #initializeModules"
Error handle:[:ex |
- ClassesFailedToInitialize isNil ifTrue:[
- ClassesFailedToInitialize := IdentitySet new.
- ].
- ClassesFailedToInitialize add:aClass.
- ('Smalltalk [warning]: error during initialize of ' , aClass name,': ', ex description printString) errorPrintCR.
- ex suspendedContext fullPrintAll.
- (Smalltalk commandLineArguments includes:'--debug') ifTrue:[
- ex reject
- ].
+ ClassesFailedToInitialize isNil ifTrue:[
+ ClassesFailedToInitialize := IdentitySet new.
+ ].
+ ClassesFailedToInitialize add:aClass.
+ ('Smalltalk [warning]: error during initialize of ' , aClass name,': ', ex description printString) errorPrintCR.
+ ex suspendedContext fullPrintAll.
+ (Smalltalk commandLineArguments includes:'--debug') ifTrue:[
+ ex reject
+ ].
] do:[
- aClass initialize
+ aClass initialize
].
"Modified: / 23-10-2006 / 16:29:19 / cg"
@@ -522,12 +522,12 @@
self initializeModulesOnce.
ClassesFailedToInitialize size > 0 ifTrue:[
- ('Smalltalk [info]: retry initialization of failed class(es)...') infoPrintCR.
- ClassesFailedToInitialize := nil.
- self initializeModulesOnce.
- ClassesFailedToInitialize size > 0 ifTrue:[
- ('Smalltalk [error]: class(es) persist to fail during initialize') errorPrintCR.
- ]
+ ('Smalltalk [info]: retry initialization of failed class(es)...') infoPrintCR.
+ ClassesFailedToInitialize := nil.
+ self initializeModulesOnce.
+ ClassesFailedToInitialize size > 0 ifTrue:[
+ ('Smalltalk [error]: class(es) persist to fail during initialize') errorPrintCR.
+ ]
].
ProjectDefinition initializeAllProjectDefinitions.
@@ -554,8 +554,8 @@
This one is the very first entry into the smalltalk world,
right after startup, ususally immediately followed by Smalltalk>>start.
Notice:
- this is not called when an image is restarted; in this
- case the show starts in Smalltalk>>restart."
+ this is not called when an image is restarted; in this
+ case the show starts in Smalltalk>>restart."
|idx|
@@ -566,7 +566,7 @@
AbstractOperatingSystem initializeConcreteClass.
CommandLineArguments isNil ifTrue:[
- CommandLineArguments := #('stx').
+ CommandLineArguments := #('stx').
].
CommandLine := CommandLineArguments copy.
CommandLineArguments := CommandLineArguments asOrderedCollection.
@@ -577,39 +577,39 @@
DebuggingStandAlone := false.
StandAlone ifTrue:[
- InfoPrinting := false.
- ObjectMemory infoPrinting:false.
-
- idx := CommandLineArguments indexOf:'--debug'.
- idx ~~ 0 ifTrue:[
- DebuggingStandAlone := true.
- ].
- DebuggingStandAlone ifTrue:[
- Inspector := MiniInspector.
- Debugger := MiniDebugger.
- ].
+ InfoPrinting := false.
+ ObjectMemory infoPrinting:false.
+
+ idx := CommandLineArguments indexOf:'--debug'.
+ idx ~~ 0 ifTrue:[
+ DebuggingStandAlone := true.
+ ].
+ DebuggingStandAlone ifTrue:[
+ Inspector := MiniInspector.
+ Debugger := MiniDebugger.
+ ].
] ifFalse:[
- "/
- "/ define low-level debugging tools - graphical classes are not prepared yet
- "/ to handle things.
- "/ This will bring us into the MiniDebugger when an error occurs during startup.
- "/
- Inspector := MiniInspector.
- Debugger := MiniDebugger.
+ "/
+ "/ define low-level debugging tools - graphical classes are not prepared yet
+ "/ to handle things.
+ "/ This will bring us into the MiniDebugger when an error occurs during startup.
+ "/
+ Inspector := MiniInspector.
+ Debugger := MiniDebugger.
].
Error handle:[:ex |
- StandAlone ifTrue:[
- DebuggingStandAlone ifFalse:[
- 'Startup Error - use --debug command line argument for more info' errorPrintCR.
- Smalltalk exit:1.
- ].
- 'Startup Error' errorPrintCR.
- thisContext fullPrintAll.
- ].
- ex reject.
+ StandAlone ifTrue:[
+ DebuggingStandAlone ifFalse:[
+ 'Startup Error - use --debug command line argument for more info' errorPrintCR.
+ Smalltalk exit:1.
+ ].
+ 'Startup Error' errorPrintCR.
+ thisContext fullPrintAll.
+ ].
+ ex reject.
] do:[
- self basicInitializeSystem
+ self basicInitializeSystem
].
!
@@ -685,27 +685,27 @@
objects := SpecialObjectArray.
objects isNil ifTrue:[
- objects := Array new:5.
+ objects := Array new:5.
].
"find the first empty slot and look if already registered"
firstEmptyIndex := 0.
1 to: objects size do: [:i |
- obj := objects at: i.
- obj == anObject ifTrue: [^ i]. "object already there, just return its index"
- (obj == nil and: [firstEmptyIndex = 0]) ifTrue: [
- firstEmptyIndex := i
- ]
+ obj := objects at: i.
+ obj == anObject ifTrue: [^ i]. "object already there, just return its index"
+ (obj == nil and: [firstEmptyIndex = 0]) ifTrue: [
+ firstEmptyIndex := i
+ ]
].
"if no empty slots, expand the array"
firstEmptyIndex = 0 ifTrue: [
- sz := objects size.
- newObjects := objects species new: sz + 20. "grow linearly"
- newObjects replaceFrom: 1 to: sz with: objects startingAt: 1.
- firstEmptyIndex := sz + 1.
- SpecialObjectArray := newObjects.
- objects := newObjects
+ sz := objects size.
+ newObjects := objects species new: sz + 20. "grow linearly"
+ newObjects replaceFrom: 1 to: sz with: objects startingAt: 1.
+ firstEmptyIndex := sz + 1.
+ SpecialObjectArray := newObjects.
+ objects := newObjects
].
objects at: firstEmptyIndex put: anObject.
@@ -726,9 +726,9 @@
anObject isNil ifTrue:[^ self].
objects := SpecialObjectArray.
1 to: objects size do: [:i |
- (objects at: i) == anObject ifTrue: [
- objects at: i put: nil
- ]
+ (objects at: i) == anObject ifTrue: [
+ objects at: i put: nil
+ ]
].
!
@@ -739,20 +739,20 @@
platformName := Screen current platformName.
platformName = #WIN32 ifTrue:[
- ^ #Win32.
+ ^ #Win32.
].
^ platformName.
"
Smalltalk windowSystemName
- -> 'Win32'
+ -> 'Win32'
"
! !
!Smalltalk class methodsFor:'Compatibility-V''Age'!
allClassesImplementing:aSelector
- ^ self allClassesForWhich:[:cls | cls implements:aSelector].
+ ^ self allClassesForWhich:[:cls | cls includesSelector:aSelector].
"Modified: / 10-08-2006 / 12:12:17 / cg"
!
@@ -766,10 +766,10 @@
declarePoolDictionary:poolDictionaryName
SharedPool subclass:(poolDictionaryName asSymbol)
- instanceVariableNames:''
- classVariableNames:''
- poolDictionaries:''
- category:nil
+ instanceVariableNames:''
+ classVariableNames:''
+ poolDictionaries:''
+ category:nil
! !
!Smalltalk class methodsFor:'Compatibility-VW5.4'!
@@ -791,17 +791,17 @@
|newClass|
indexed == #none ifTrue:[
- newClass := superclass
- subclass:nameSymbol
- instanceVariableNames:instVars
- classVariableNames:''
- poolDictionaries:''
- category:category
- inEnvironment:self.
- classInstVars size > 0 ifTrue:[
- newClass class instanceVariableNames:classInstVars.
- ].
- ^ newClass
+ newClass := superclass
+ subclass:nameSymbol
+ instanceVariableNames:instVars
+ classVariableNames:''
+ poolDictionaries:''
+ category:category
+ inEnvironment:self.
+ classInstVars size > 0 ifTrue:[
+ newClass class instanceVariableNames:classInstVars.
+ ].
+ ^ newClass
].
self shouldImplement.
!
@@ -866,7 +866,7 @@
the evaluation of aBlock."
(self includesKey:aKey) ifTrue:[
- ^ self at:aKey
+ ^ self at:aKey
].
^ aBlock value
@@ -882,7 +882,7 @@
Otherwise, evaluate aBlock, passing the retrieved value as argument."
(self includesKey:aKey) ifTrue:[
- ^ aBlock value:(self at:aKey)
+ ^ aBlock value:(self at:aKey)
].
^ nil
@@ -903,23 +903,23 @@
oldValue = __GLOBAL_SET(aKey, aValue, (OBJ *)0);
%}.
CachedClasses notNil ifTrue:[
- oldValue isBehavior ifTrue:[
- oldValue name == aKey ifTrue:[
- CachedClasses remove:oldValue ifAbsent:[]
- ]
- ].
- aValue isBehavior ifTrue:[
+ oldValue isBehavior ifTrue:[
+ oldValue name == aKey ifTrue:[
+ CachedClasses remove:oldValue ifAbsent:[]
+ ]
+ ].
+ aValue isBehavior ifTrue:[
"/ aValue isMeta ifTrue:[
"/ "/ this should not happen
"/ ('SMALLTALK: store a Metaclass: ' , aValue name , ' as ' , aKey) infoPrintCR.
"/ ].
- aValue name == aKey ifTrue:[
- CachedClasses add:aValue
- ] ifFalse:[
- CachedClasses := nil
- ]
- ].
+ aValue name == aKey ifTrue:[
+ CachedClasses add:aValue
+ ] ifFalse:[
+ CachedClasses := nil
+ ]
+ ].
].
^ aValue.
"/
@@ -951,7 +951,7 @@
"return the symbol under which anObject is stored - or nil"
self keysDo:[:aKey |
- (self at:aKey) == anObject ifTrue:[^ aKey]
+ (self at:aKey) == anObject ifTrue:[^ aKey]
].
^ nil
@@ -971,16 +971,16 @@
removeKey:aKey
"remove the association stored under the key-argument from the globals dictionary.
WARNING:
- this is somewhat dangerous: conceptionally, the association is removed,
- to which machine & byte compiled code refers if it accesses a global.
- If there are still global accesses in some literalArray or from machine-compiled code,
- it continues to reference the globals value via that obsolete association and gets a nil
- value. (which is correct)
- However, if that global is later reintroduced, a new association will be created and
- the new global now referenced via the new association.
- The old accesses will still see nil, although the globals value is actually non-nil
- (this is questionable).
- To avoid this problem, the #removeClass: method never removed the key."
+ this is somewhat dangerous: conceptionally, the association is removed,
+ to which machine & byte compiled code refers if it accesses a global.
+ If there are still global accesses in some literalArray or from machine-compiled code,
+ it continues to reference the globals value via that obsolete association and gets a nil
+ value. (which is correct)
+ However, if that global is later reintroduced, a new association will be created and
+ the new global now referenced via the new association.
+ The old accesses will still see nil, although the globals value is actually non-nil
+ (this is questionable).
+ To avoid this problem, the #removeClass: method never removed the key."
CachedClasses := nil.
@@ -1040,9 +1040,9 @@
"startup a changes browser"
ChangesBrowser notNil ifTrue:[
- ChangesBrowser open
+ ChangesBrowser open
] ifFalse:[
- self warn:'no ChangesBrowser built in'
+ self warn:'no ChangesBrowser built in'
]
"
@@ -1127,14 +1127,14 @@
oldCategory := aClass category.
oldCategory ~= newCategory ifTrue:[
- aClass category:(newCategory withoutSeparators asSymbol).
-
- "notify change of category"
- ns := aClass environment ? self.
- ns changed:#organization with:(aClass -> oldCategory).
- ns ~~ self ifTrue:[
- self changed:#organization with:(aClass -> oldCategory).
- ]
+ aClass category:(newCategory withoutSeparators asSymbol).
+
+ "notify change of category"
+ ns := aClass environment ? self.
+ ns changed:#organization with:(aClass -> oldCategory).
+ ns ~~ self ifTrue:[
+ self changed:#organization with:(aClass -> oldCategory).
+ ]
].
"
@@ -1151,7 +1151,7 @@
flushCachedClass:aClass
CachedClasses notNil ifTrue:[
- CachedClasses remove:aClass ifAbsent:[]
+ CachedClasses remove:aClass ifAbsent:[]
]
!
@@ -1176,31 +1176,31 @@
oldName := aClass name.
sym := oldNameSym := oldName asSymbol.
((self at:oldNameSym) == aClass) ifFalse:[
- "check other name ..."
- (self includes:aClass) ifFalse:[
- 'Smalltalk [warning]: no such class: ' errorPrint. oldName errorPrintCR.
- ^ self
- ].
- "
- the class has changed its name - without telling me ...
- what should be done in this case ?
- "
- 'Smalltalk [warning]: class ' errorPrint. oldName errorPrint.
- ' has changed its name' errorPrintCR.
-
- "/
- "/ might be an alias (i.e. removing a compatibility name)
- "/
- actualName := self keyAtValue:aClass.
- ('Smalltalk [info]: ' , oldName , ' is actually stored as ' , actualName , '.') infoPrintCR.
- sym := actualName asSymbol.
- oldName := actualName asString.
- wrongName := true.
+ "check other name ..."
+ (self includes:aClass) ifFalse:[
+ 'Smalltalk [warning]: no such class: ' errorPrint. oldName errorPrintCR.
+ ^ self
+ ].
+ "
+ the class has changed its name - without telling me ...
+ what should be done in this case ?
+ "
+ 'Smalltalk [warning]: class ' errorPrint. oldName errorPrint.
+ ' has changed its name' errorPrintCR.
+
+ "/
+ "/ might be an alias (i.e. removing a compatibility name)
+ "/
+ actualName := self keyAtValue:aClass.
+ ('Smalltalk [info]: ' , oldName , ' is actually stored as ' , actualName , '.') infoPrintCR.
+ sym := actualName asSymbol.
+ oldName := actualName asString.
+ wrongName := true.
].
ns := aClass nameSpace.
aClass topOwningClass notNil ifTrue:[
- ons := aClass topOwningClass nameSpace
+ ons := aClass topOwningClass nameSpace
].
self at:sym put:nil. "nil it out for compiled accesses"
@@ -1209,25 +1209,25 @@
"/ see comment in removeKey: on why we dont remove it here
"/
"/ self removeKey:sym. "/ remove key - this actually fails, if there are
- "/ still compiled code references."
+ "/ still compiled code references."
"remove private classes"
aClass privateClassesSorted do:[:somePrivateClass |
- aClass privateClassesAt:(somePrivateClass nameWithoutPrefix) asSymbol put:nil.
+ aClass privateClassesAt:(somePrivateClass nameWithoutPrefix) asSymbol put:nil.
].
"remove class variables"
names := aClass classVariableString asCollectionOfWords.
names do:[:name |
- cSym := aClass globalKeyForClassVar:name.
- self at:cSym asSymbol put:nil.
-
- "/
- "/ see comment in removeKey: on why we dont remove it here
- "/
- "/ self removeKey:cSym
+ cSym := aClass globalKeyForClassVar:name.
+ self at:cSym asSymbol put:nil.
+
+ "/
+ "/ see comment in removeKey: on why we dont remove it here
+ "/
+ "/ self removeKey:cSym
].
@@ -1256,31 +1256,31 @@
Class flushSubclassInfo.
wrongName == true ifTrue:[
- "/
- "/ an alias (i.e. removing a compatibility name)
- "/
- "/ check if there are more refs to it ...
- [self includes:aClass] whileTrue:[
- actualName := self keyAtValue:aClass.
- ('Smalltalk [info]: ' , aClass name , ' is also registered under the name ' , actualName
- , ' - remove that binding too.') infoPrintCR.
- self at:actualName put:nil.
- ].
+ "/
+ "/ an alias (i.e. removing a compatibility name)
+ "/
+ "/ check if there are more refs to it ...
+ [self includes:aClass] whileTrue:[
+ actualName := self keyAtValue:aClass.
+ ('Smalltalk [info]: ' , aClass name , ' is also registered under the name ' , actualName
+ , ' - remove that binding too.') infoPrintCR.
+ self at:actualName put:nil.
+ ].
].
ns ~~ Smalltalk ifTrue:[
- ons notNil ifTrue:[
- ClassBuilder
- recompileGlobalAccessorsTo:oldNameSym
- in:ons
- except:nil
- ].
- (ns notNil and:[ns ~~ ons]) ifTrue:[
- ClassBuilder
- recompileGlobalAccessorsTo:oldNameSym
- in:ns
- except:nil
- ].
+ ons notNil ifTrue:[
+ ClassBuilder
+ recompileGlobalAccessorsTo:oldNameSym
+ in:ons
+ except:nil
+ ].
+ (ns notNil and:[ns ~~ ons]) ifTrue:[
+ ClassBuilder
+ recompileGlobalAccessorsTo:oldNameSym
+ in:ns
+ except:nil
+ ].
].
"Modified: / 18-11-2006 / 17:16:31 / cg"
@@ -1301,24 +1301,24 @@
i2 := 1.
ns := self.
[i2 ~~ 0] whileTrue:[
- i2 := newName indexOfSubCollection:'::' startingAt:i1.
- i2 ~~ 0 ifTrue:[
- nm := newName copyFrom:i1 to:i2-1.
- ns isNameSpace ifTrue:[
- subns := ns at:nm asSymbol ifAbsent:nil.
- subns isNil ifTrue:[
- self error:'Nonexisting namespace: ',nm.
- ^ nil.
- ].
- ] ifFalse:[
- subns := ns privateClassesAt:nm asSymbol.
- subns isNil ifTrue:[
- self error:'Cannot create a namespace below a class'
- ]
- ].
- ns := subns.
- i1 := i2 + 2.
- ].
+ i2 := newName indexOfSubCollection:'::' startingAt:i1.
+ i2 ~~ 0 ifTrue:[
+ nm := newName copyFrom:i1 to:i2-1.
+ ns isNameSpace ifTrue:[
+ subns := ns at:nm asSymbol ifAbsent:nil.
+ subns isNil ifTrue:[
+ self error:'Nonexisting namespace: ',nm.
+ ^ nil.
+ ].
+ ] ifFalse:[
+ subns := ns privateClassesAt:nm asSymbol.
+ subns isNil ifTrue:[
+ self error:'Cannot create a namespace below a class'
+ ]
+ ].
+ ns := subns.
+ i1 := i2 + 2.
+ ].
].
oldName := aClass name.
@@ -1329,8 +1329,8 @@
privateClasses := aClass privateClassesSorted.
((self at:oldSym) ~~ aClass) ifTrue:[
- 'Smalltalk [warning]: rename failed - name is different from key' errorPrintCR.
- ^ self
+ 'Smalltalk [warning]: rename failed - name is different from key' errorPrintCR.
+ ^ self
].
"/ rename the class
@@ -1339,42 +1339,42 @@
"/ change the owning class
ns isNameSpace ifFalse:[
- aClass isPrivate ifTrue:[
- aClass class setOwningClass:ns.
- ] ifFalse:[
- "/ sigh - must make a PrivateMetaclass from Metaclass
- oldMetaclass := aClass class.
- newMetaclass := PrivateMetaclass new.
- newMetaclass flags:(oldMetaclass flags).
- newMetaclass setSuperclass:(oldMetaclass superclass).
- newMetaclass instSize:(oldMetaclass instSize).
- newMetaclass setInstanceVariableString:(oldMetaclass instanceVariableString).
- newMetaclass setMethodDictionary:(oldMetaclass methodDictionary).
- newMetaclass setSoleInstance:aClass.
- newMetaclass setOwningClass:ns.
-
- aClass changeClassTo:newMetaclass.
- ObjectMemory flushCaches.
- ]
+ aClass isPrivate ifTrue:[
+ aClass class setOwningClass:ns.
+ ] ifFalse:[
+ "/ sigh - must make a PrivateMetaclass from Metaclass
+ oldMetaclass := aClass class.
+ newMetaclass := PrivateMetaclass new.
+ newMetaclass flags:(oldMetaclass flags).
+ newMetaclass setSuperclass:(oldMetaclass superclass).
+ newMetaclass instSize:(oldMetaclass instSize).
+ newMetaclass setInstanceVariableString:(oldMetaclass instanceVariableString).
+ newMetaclass setMethodDictionary:(oldMetaclass methodDictionary).
+ newMetaclass setSoleInstance:aClass.
+ newMetaclass setOwningClass:ns.
+
+ aClass changeClassTo:newMetaclass.
+ ObjectMemory flushCaches.
+ ]
] ifTrue:[
- aClass isPrivate ifTrue:[
- newCategory := aClass topOwningClass category.
-
- "/ sigh - must make a Metaclass from PrivateMetaclass
- oldMetaclass := aClass class.
-
- newMetaclass := Metaclass new.
- newMetaclass flags:(oldMetaclass flags).
- newMetaclass setSuperclass:(oldMetaclass superclass).
- newMetaclass instSize:(oldMetaclass instSize).
- newMetaclass setInstanceVariableString:(oldMetaclass instanceVariableString).
- newMetaclass setMethodDictionary:(oldMetaclass methodDictionary).
- newMetaclass setSoleInstance:aClass.
-
- aClass category:newCategory.
- aClass changeClassTo:newMetaclass.
- ObjectMemory flushCaches.
- ]
+ aClass isPrivate ifTrue:[
+ newCategory := aClass topOwningClass category.
+
+ "/ sigh - must make a Metaclass from PrivateMetaclass
+ oldMetaclass := aClass class.
+
+ newMetaclass := Metaclass new.
+ newMetaclass flags:(oldMetaclass flags).
+ newMetaclass setSuperclass:(oldMetaclass superclass).
+ newMetaclass instSize:(oldMetaclass instSize).
+ newMetaclass setInstanceVariableString:(oldMetaclass instanceVariableString).
+ newMetaclass setMethodDictionary:(oldMetaclass methodDictionary).
+ newMetaclass setSoleInstance:aClass.
+
+ aClass category:newCategory.
+ aClass changeClassTo:newMetaclass.
+ ObjectMemory flushCaches.
+ ]
].
aClass setName:newSym.
@@ -1394,32 +1394,32 @@
names := aClass classVariableString asCollectionOfWords.
names do:[:name |
- oldCVSym := (oldSym , ':' , name) asSymbol.
- value := self at:oldCVSym.
- self at:oldCVSym put:nil.
-
- "/
- "/ see comment in #removeKey: on why we dont remove it it here
- "/
- "/ self removeKey:cSym.
-
- newCVSym := (newSym , ':' , name) asSymbol.
- self at:newCVSym put:value.
-
- oldNameToNewName at:oldCVSym put:newCVSym.
+ oldCVSym := (oldSym , ':' , name) asSymbol.
+ value := self at:oldCVSym.
+ self at:oldCVSym put:nil.
+
+ "/
+ "/ see comment in #removeKey: on why we dont remove it it here
+ "/
+ "/ self removeKey:cSym.
+
+ newCVSym := (newSym , ':' , name) asSymbol.
+ self at:newCVSym put:value.
+
+ oldNameToNewName at:oldCVSym put:newCVSym.
].
"/ patch methods literal arrays from oldCVname to newCVname
oldNameToNewName keysAndValuesDo:[:oldNameSym :newNameSym |
- aClass withAllSubclasses do:[:aSubClass |
- Transcript showCR:'changing global accesses from ''' , oldNameSym , ''' into ''' , newNameSym , ''' in class: ''' , aSubClass name , ''' ...'.
- aSubClass instAndClassSelectorsAndMethodsDo:[:sel :aMethod |
- aMethod changeLiteral:oldNameSym to:newNameSym
- ].
- ].
-
- "/ and also in privateClasses ? ...
+ aClass withAllSubclasses do:[:aSubClass |
+ Transcript showCR:'changing global accesses from ''' , oldNameSym , ''' into ''' , newNameSym , ''' in class: ''' , aSubClass name , ''' ...'.
+ aSubClass instAndClassSelectorsAndMethodsDo:[:sel :aMethod |
+ aMethod changeLiteral:oldNameSym to:newNameSym
+ ].
+ ].
+
+ "/ and also in privateClasses ? ...
"/ privateClasses size > 0 ifTrue:[
"/ privateClasses do:[:aPrivateClass |
@@ -1442,85 +1442,85 @@
newNameSpace := aClass topNameSpace.
privateClasses size > 0 ifTrue:[
- "/ must rename privateClasses as well
- Class withoutUpdatingChangesDo:[
- privateClasses do:[:aPrivateClass |
- self renameClass:aPrivateClass
- to:(newSym , '::' , aPrivateClass nameWithoutPrefix).
-
- Transcript showCR:'recompiling methods in ''' , newNameSpace name , ''' accessing ''' , oldName , '::' , aPrivateClass nameWithoutPrefix , ''' ...'.
- aClass theNonMetaclass recompileMethodsAccessingGlobal:(oldName , '::' , aPrivateClass nameWithoutPrefix) asSymbol.
- aClass theMetaclass recompileMethodsAccessingGlobal:(oldName , '::' , aPrivateClass nameWithoutPrefix) asSymbol.
- aClass theNonMetaclass recompileMethodsAccessingGlobal:(aPrivateClass nameWithoutPrefix) asSymbol.
- aClass theMetaclass recompileMethodsAccessingGlobal:(aPrivateClass nameWithoutPrefix) asSymbol.
+ "/ must rename privateClasses as well
+ Class withoutUpdatingChangesDo:[
+ privateClasses do:[:aPrivateClass |
+ self renameClass:aPrivateClass
+ to:(newSym , '::' , aPrivateClass nameWithoutPrefix).
+
+ Transcript showCR:'recompiling methods in ''' , newNameSpace name , ''' accessing ''' , oldName , '::' , aPrivateClass nameWithoutPrefix , ''' ...'.
+ aClass theNonMetaclass recompileMethodsAccessingGlobal:(oldName , '::' , aPrivateClass nameWithoutPrefix) asSymbol.
+ aClass theMetaclass recompileMethodsAccessingGlobal:(oldName , '::' , aPrivateClass nameWithoutPrefix) asSymbol.
+ aClass theNonMetaclass recompileMethodsAccessingGlobal:(aPrivateClass nameWithoutPrefix) asSymbol.
+ aClass theMetaclass recompileMethodsAccessingGlobal:(aPrivateClass nameWithoutPrefix) asSymbol.
"/ ClassBuilder
"/ recompileGlobalAccessorsTo:(oldName , '::' , aPrivateClass nameWithoutPrefix) asSymbol
"/ in:newNameSpace
"/ except:nil.
- ]
- ]
+ ]
+ ]
].
oldNameSpace ~~ newNameSpace ifTrue:[
- "/ all those referencing the class from the old nameSpace
- "/ must be recompiled ...
- "/ (to now access the global from smalltalk)
-
- oldNameSpace ~~ Smalltalk ifTrue:[
- Transcript showCR:'recompiling methods in ''' , oldNameSpace name , ''' accessing ''' , oldName , ''' ...'.
-
- ClassBuilder
- recompileGlobalAccessorsTo:oldName asSymbol
- in:oldNameSpace
- except:nil.
- ].
-
- "/ all referencing the class in the new namespace
- "/ as well; to now access the new class.
-
- (newNameSpace notNil and:[newNameSpace ~~ Smalltalk]) ifTrue:[
- Transcript showCR:'recompiling methods in ''' , newNameSpace name , ''' accessing ''' , oldBaseName , ''' ...'.
-
- ClassBuilder
- recompileGlobalAccessorsTo:oldBaseName asSymbol
- in:newNameSpace
- except:nil.
- ].
+ "/ all those referencing the class from the old nameSpace
+ "/ must be recompiled ...
+ "/ (to now access the global from smalltalk)
+
+ oldNameSpace ~~ Smalltalk ifTrue:[
+ Transcript showCR:'recompiling methods in ''' , oldNameSpace name , ''' accessing ''' , oldName , ''' ...'.
+
+ ClassBuilder
+ recompileGlobalAccessorsTo:oldName asSymbol
+ in:oldNameSpace
+ except:nil.
+ ].
+
+ "/ all referencing the class in the new namespace
+ "/ as well; to now access the new class.
+
+ (newNameSpace notNil and:[newNameSpace ~~ Smalltalk]) ifTrue:[
+ Transcript showCR:'recompiling methods in ''' , newNameSpace name , ''' accessing ''' , oldBaseName , ''' ...'.
+
+ ClassBuilder
+ recompileGlobalAccessorsTo:oldBaseName asSymbol
+ in:newNameSpace
+ except:nil.
+ ].
] ifFalse:[
- "/ all references to a global with my new name in my owning class
- "/ must now be redirected to myself.
-
- aClass isPrivate ifTrue:[
- newBaseName := aClass nameWithoutNameSpacePrefix.
- newBaseNameWithoutPrefix := aClass nameWithoutPrefix.
-
- Transcript showCR:'recompiling methods accessing ''' , oldBaseNameWithoutPrefix , ''' in: ''' , aClass owningClass name , ''' ...'.
- aClass owningClass recompileMethodsAccessingGlobal:oldBaseNameWithoutPrefix.
- aClass owningClass class recompileMethodsAccessingGlobal:oldBaseNameWithoutPrefix.
-
- Transcript showCR:'recompiling methods accessing ''' , oldBaseName , ''' in: ''' , aClass owningClass name , ''' ...'.
- aClass owningClass recompileMethodsAccessingGlobal:oldBaseName.
- aClass owningClass class recompileMethodsAccessingGlobal:oldBaseName.
-
- Transcript showCR:'recompiling methods accessing ''' , newBaseNameWithoutPrefix , ''' in: ''' , aClass owningClass name , ''' ...'.
- aClass owningClass recompileMethodsAccessingGlobal:newBaseNameWithoutPrefix.
- aClass owningClass class recompileMethodsAccessingGlobal:newBaseNameWithoutPrefix.
-
- Transcript showCR:'recompiling methods accessing ''' , newBaseName , ''' in: ''' , aClass owningClass name , ''' ...'.
- aClass owningClass recompileMethodsAccessingGlobal:newBaseName.
- aClass owningClass class recompileMethodsAccessingGlobal:newBaseName.
- ]
+ "/ all references to a global with my new name in my owning class
+ "/ must now be redirected to myself.
+
+ aClass isPrivate ifTrue:[
+ newBaseName := aClass nameWithoutNameSpacePrefix.
+ newBaseNameWithoutPrefix := aClass nameWithoutPrefix.
+
+ Transcript showCR:'recompiling methods accessing ''' , oldBaseNameWithoutPrefix , ''' in: ''' , aClass owningClass name , ''' ...'.
+ aClass owningClass recompileMethodsAccessingGlobal:oldBaseNameWithoutPrefix.
+ aClass owningClass class recompileMethodsAccessingGlobal:oldBaseNameWithoutPrefix.
+
+ Transcript showCR:'recompiling methods accessing ''' , oldBaseName , ''' in: ''' , aClass owningClass name , ''' ...'.
+ aClass owningClass recompileMethodsAccessingGlobal:oldBaseName.
+ aClass owningClass class recompileMethodsAccessingGlobal:oldBaseName.
+
+ Transcript showCR:'recompiling methods accessing ''' , newBaseNameWithoutPrefix , ''' in: ''' , aClass owningClass name , ''' ...'.
+ aClass owningClass recompileMethodsAccessingGlobal:newBaseNameWithoutPrefix.
+ aClass owningClass class recompileMethodsAccessingGlobal:newBaseNameWithoutPrefix.
+
+ Transcript showCR:'recompiling methods accessing ''' , newBaseName , ''' in: ''' , aClass owningClass name , ''' ...'.
+ aClass owningClass recompileMethodsAccessingGlobal:newBaseName.
+ aClass owningClass class recompileMethodsAccessingGlobal:newBaseName.
+ ]
].
aClass changed:#definition.
"/ because of the change of my superclasses name ...
aClass allSubclassesDo:[:subClass |
- subClass changed:#definition.
+ subClass changed:#definition.
].
"/ because of the change of my superclasses name ...
aClass subclassesDo:[:subClass |
- subClass addChangeRecordForClass:subClass.
+ subClass addChangeRecordForClass:subClass.
].
self changed:#definition.
Smalltalk changed:#classRename with:(Array with:aClass with:oldName).
@@ -1586,7 +1586,7 @@
"call the dummy debug function, on which a breakpoint
can be put in adb, sdb, dbx or gdb.
WARNING: this method is for debugging only
- it will be removed without notice."
+ it will be removed without notice."
%{
__PATCHUPCONTEXTS(__context);
__debugBreakPoint__();
@@ -1631,9 +1631,9 @@
char *msg;
if (__isString(aMessage))
- msg = (char *) __stringVal(aMessage);
+ msg = (char *) __stringVal(aMessage);
else
- msg = "fatalAbort";
+ msg = "fatalAbort";
__fatal0(__context, msg);
/* NEVER RETURNS */
@@ -1723,13 +1723,13 @@
collectedClasses := OrderedCollection new.
self allClassesForWhich:filter do:[:cls |
- collectedClasses add:cls
+ collectedClasses add:cls
].
^ collectedClasses
"
Smalltalk
- allClassesForWhich:[:cls | cls name startsWith:'Po']
+ allClassesForWhich:[:cls | cls name startsWith:'Po']
"
"Created: / 10-08-2006 / 12:11:31 / cg"
@@ -1739,13 +1739,13 @@
"evaluate the argument, aBlock for all classes in the system, for which filter evaluates to true."
self allClassesDo:[:cls |
- (filter value:cls) ifTrue:[ aBlock value:cls ].
+ (filter value:cls) ifTrue:[ aBlock value:cls ].
].
"
Smalltalk
- allClassesForWhich:[:cls | cls name startsWith:'Po']
- do:[:aClass | Transcript showCR:aClass name]
+ allClassesForWhich:[:cls | cls name startsWith:'Po']
+ do:[:aClass | Transcript showCR:aClass name]
"
!
@@ -1767,7 +1767,7 @@
The order of the classes is not defined."
aCategory notNil ifTrue:[
- self allClassesForWhich:[:cls | cls category = aCategory] do:aBlock
+ self allClassesForWhich:[:cls | cls category = aCategory] do:aBlock
]
"
@@ -1784,12 +1784,12 @@
|classes|
aCategory notNil ifTrue:[
- classes := OrderedCollection new.
- self allClassesInCategory:aCategory do:[:aClass |
- classes add:aClass
- ].
- classes topologicalSort:[:a :b | b isSubclassOf:a].
- classes do:aBlock
+ classes := OrderedCollection new.
+ self allClassesInCategory:aCategory do:[:aClass |
+ classes add:aClass
+ ].
+ classes topologicalSort:[:a :b | b isSubclassOf:a].
+ classes do:aBlock
]
"
@@ -1807,16 +1807,16 @@
already := IdentitySet new:NumberOfClassesHint.
self allClassesDo:[:eachClass |
- (already includes:eachClass) ifFalse:[
- eachClass allSuperclasses reverseDo:[:eachSuperClass |
- (already includes:eachSuperClass) ifFalse:[
- already add:eachSuperClass.
- aBlock value:eachSuperClass.
- ].
- ].
- already add:eachClass.
- aBlock value:eachClass.
- ]
+ (already includes:eachClass) ifFalse:[
+ eachClass allSuperclasses reverseDo:[:eachSuperClass |
+ (already includes:eachSuperClass) ifFalse:[
+ already add:eachSuperClass.
+ aBlock value:eachSuperClass.
+ ].
+ ].
+ already add:eachClass.
+ aBlock value:eachClass.
+ ]
].
"
@@ -1901,7 +1901,7 @@
in the Smalltalk dictionary"
self keysDo:[:aKey |
- aBlock value:(aKey -> (self at:aKey))
+ aBlock value:(aKey -> (self at:aKey))
]
"Smalltalk associationsDo:[:assoc | assoc printCR]"
@@ -1929,7 +1929,7 @@
RETURN (self);
%}.
self keysDo:[:aKey |
- aBlock value:(self at:aKey)
+ aBlock value:(self at:aKey)
]
!
@@ -1937,7 +1937,7 @@
"evaluate the two-arg block, aBlock for all keys and values"
self keysDo:[:aKey |
- aBlock value:aKey value:(self at:aKey)
+ aBlock value:aKey value:(self at:aKey)
]
!
@@ -1946,16 +1946,16 @@
collected := OrderedCollection new.
self keysAndValuesDo:[:eachKey :eachValue |
- (selectBlockWith2Args value:eachKey value:eachValue) ifTrue:[
- collected add:(collectBlockWith2Args value:eachKey value:eachValue)
- ].
+ (selectBlockWith2Args value:eachKey value:eachValue) ifTrue:[
+ collected add:(collectBlockWith2Args value:eachKey value:eachValue)
+ ].
].
^ collected
"
Smalltalk
- keysAndValuesSelect:[:nm :val | (nm startsWith:'Ab') and:[val notNil]]
- thenCollect:[:nm :val | nm]
+ keysAndValuesSelect:[:nm :val | (nm startsWith:'Ab') and:[val notNil]]
+ thenCollect:[:nm :val | nm]
"
!
@@ -1968,7 +1968,7 @@
RETURN (self);
%}.
self basicKeys do:[:aKey |
- aBlock value:aKey
+ aBlock value:aKey
]
! !
@@ -2031,9 +2031,9 @@
#aboutToQuit."
ExitBlocks isNil ifTrue:[
- ExitBlocks := OrderedCollection with:aBlock
+ ExitBlocks := OrderedCollection with:aBlock
] ifFalse:[
- ExitBlocks add:aBlock
+ ExitBlocks add:aBlock
]
!
@@ -2045,9 +2045,9 @@
These blocks will be executed after an image restart."
ImageStartBlocks isNil ifTrue:[
- ImageStartBlocks := OrderedCollection with:aBlock
+ ImageStartBlocks := OrderedCollection with:aBlock
] ifFalse:[
- ImageStartBlocks add:aBlock
+ ImageStartBlocks add:aBlock
]
"Created: 9.9.1996 / 16:48:20 / stefan"
@@ -2063,9 +2063,9 @@
Initial processes are usually started here (see smalltalk.rc / private.rc)."
StartBlocks isNil ifTrue:[
- StartBlocks := OrderedCollection with:aBlock
+ StartBlocks := OrderedCollection with:aBlock
] ifFalse:[
- StartBlocks add:aBlock
+ StartBlocks add:aBlock
]
"Created: 9.9.1996 / 16:46:53 / stefan"
@@ -2092,9 +2092,9 @@
ObjectMemory changed:#aboutToExit. "/ for ST/X backward compatibility
ObjectMemory changed:#aboutToQuit. "/ for ST-80 compatibility
ExitBlocks notNil ifTrue:[
- ExitBlocks do:[:aBlock |
- aBlock value
- ]
+ ExitBlocks do:[:aBlock |
+ aBlock value
+ ]
].
OperatingSystem exit:statusInteger
"not reached"
@@ -2119,10 +2119,10 @@
packageDirName := self getPackageFileName:packageDirName.
(packageDirName notNil and:[Class tryLocalSourceFirst]) ifTrue:[
- (self loadExtensionsFromDirectory:packageDirName) ifTrue:[
- ^ true.
- ].
- packageDirName := nil. "do not try again"
+ (self loadExtensionsFromDirectory:packageDirName) ifTrue:[
+ ^ true.
+ ].
+ packageDirName := nil. "do not try again"
].
"
@@ -2130,24 +2130,24 @@
"
mgr := Smalltalk at:#SourceCodeManager.
mgr notNil ifTrue:[
- SourceCodeManagerError handle:[:ex |
- ] do:[
- inStream := mgr getMostRecentSourceStreamForFile:'extensions.st' inPackage:aPackageId.
- ].
- inStream notNil ifTrue:[
- Class withoutUpdatingChangeSetDo:[
- inStream fileIn.
- ].
- inStream close.
- SilentLoading ifFalse:[
- Transcript showCR:('loaded extensions for ',aPackageId,' from repository').
- ].
- ^ true
- ]
+ SourceCodeManagerError handle:[:ex |
+ ] do:[
+ inStream := mgr getMostRecentSourceStreamForFile:'extensions.st' inPackage:aPackageId.
+ ].
+ inStream notNil ifTrue:[
+ Class withoutUpdatingChangeSetDo:[
+ inStream fileIn.
+ ].
+ inStream close.
+ SilentLoading ifFalse:[
+ Transcript showCR:('loaded extensions for ',aPackageId,' from repository').
+ ].
+ ^ true
+ ]
].
packageDirName notNil ifTrue:[
- ^ self loadExtensionsFromDirectory:packageDirName
+ ^ self loadExtensionsFromDirectory:packageDirName
].
^ false
@@ -2161,13 +2161,13 @@
f := packageDir construct:'extensions.st'.
f exists ifTrue:[
- Class withoutUpdatingChangeSetDo:[
- f fileIn.
- ].
- SilentLoading ifFalse:[
- Transcript showCR:('loaded extensions: ' , f pathName).
- ].
- ^ true
+ Class withoutUpdatingChangeSetDo:[
+ f fileIn.
+ ].
+ SilentLoading ifFalse:[
+ Transcript showCR:('loaded extensions: ' , f pathName).
+ ].
+ ^ true
].
^ false
!
@@ -2183,37 +2183,37 @@
"/ solution: repeat twice, so that superclasses are present the second time
Class packageQuerySignal answer:packageId asSymbol do:[
- |any|
-
- repeatCount := 0.
- [
- repeatCount := repeatCount + 1.
- anyFail := false.
- aDirectory directoryContents do:[:file |
- |fn|
-
- fn := aDirectory construct:file.
- (fn hasSuffix:'st') ifTrue:[
- Metaclass confirmationQuerySignal answer:false
- do:[
- Error
- handle:[:ex |
- anyFail := true
- ]
- do:[
- (self fileIn:fn) ifFalse:[
- anyFail := true
- ] ifTrue:[
- any := true.
- ]
- ]
- ]
- ]
- ].
- any ifFalse:[
- ^ false "/ no file found
- ]
- ] doWhile:[anyFail and:[repeatCount<2]].
+ |any|
+
+ repeatCount := 0.
+ [
+ repeatCount := repeatCount + 1.
+ anyFail := false.
+ aDirectory directoryContents do:[:file |
+ |fn|
+
+ fn := aDirectory construct:file.
+ (fn hasSuffix:'st') ifTrue:[
+ Metaclass confirmationQuerySignal answer:false
+ do:[
+ Error
+ handle:[:ex |
+ anyFail := true
+ ]
+ do:[
+ (self fileIn:fn) ifFalse:[
+ anyFail := true
+ ] ifTrue:[
+ any := true.
+ ]
+ ]
+ ]
+ ]
+ ].
+ any ifFalse:[
+ ^ false "/ no file found
+ ]
+ ] doWhile:[anyFail and:[repeatCount<2]].
].
new := (p := Project projectWithId:packageId) isNil.
@@ -2238,10 +2238,10 @@
|p t new|
(self fileIn:aFilename) ifFalse:[
- (self fileInClassLibrary:aFilename) ifFalse:[
- self warn:'Failed to load the package ', packageId printString.
- ^ false.
- ]
+ (self fileInClassLibrary:aFilename) ifFalse:[
+ self warn:'Failed to load the package ', packageId printString.
+ ^ false.
+ ]
].
new := (p := Project projectWithId:packageId) isNil.
@@ -2267,10 +2267,10 @@
Metaclass confirmationQuerySignal answer:false
do:[
- (self fileIn:aFilename) ifFalse:[
- self warn:'Failed to load the package ', packageId printString.
- ^ false.
- ]
+ (self fileIn:aFilename) ifFalse:[
+ self warn:'Failed to load the package ', packageId printString.
+ ^ false.
+ ]
].
new := (p := Project projectWithId:packageId) isNil.
@@ -2309,13 +2309,13 @@
Smalltalk installAutoloadedClassesFrom:abbrevFile pathName.
doLoadAsAutoloaded ifFalse:[
- "/ force autoloading...
- Smalltalk allClassesInPackage:aPackageId do:[:eachClass | eachClass autoload].
+ "/ force autoloading...
+ Smalltalk allClassesInPackage:aPackageId do:[:eachClass | eachClass autoload].
].
self loadExtensionsFromDirectory:packageDir.
SilentLoading ifFalse:[
- Transcript showCR:('loaded package: ' , aPackageId , ' from abbrev file: ' , abbrevFile pathName).
+ Transcript showCR:('loaded package: ' , aPackageId , ' from abbrev file: ' , abbrevFile pathName).
].
^ true
@@ -2379,7 +2379,7 @@
projectDefinitionClass projectDefinitionClassName silent somethingHasBeenLoaded|
packageDirOrStringOrNil notNil ifTrue:[
- packageDir := packageDirOrStringOrNil asFilename.
+ packageDir := packageDirOrStringOrNil asFilename.
].
silent := SilentLoading or:[ StandAlone ].
@@ -2394,27 +2394,27 @@
"if not, file it in ..."
(projectDefinitionClass isNil and:[packageDir notNil]) ifTrue:[
- projectDefinitionClassName := ProjectDefinition initialClassNameForDefinitionOf:aPackageId.
- "/ try to load the project definition class
- filename := (packageDir construct:projectDefinitionClassName) withSuffix:'st'.
- filename exists ifFalse:[
- filename := ((packageDir construct:'source') construct:projectDefinitionClassName) withSuffix:'st'.
- ].
- filename exists ifTrue:[
- Class withoutUpdatingChangesDo:[
- filename fileIn.
- ].
- projectDefinitionClass := ProjectDefinition definitionClassForPackage:aPackageId.
- ].
+ projectDefinitionClassName := ProjectDefinition initialClassNameForDefinitionOf:aPackageId.
+ "/ try to load the project definition class
+ filename := (packageDir construct:projectDefinitionClassName) withSuffix:'st'.
+ filename exists ifFalse:[
+ filename := ((packageDir construct:'source') construct:projectDefinitionClassName) withSuffix:'st'.
+ ].
+ filename exists ifTrue:[
+ Class withoutUpdatingChangesDo:[
+ filename fileIn.
+ ].
+ projectDefinitionClass := ProjectDefinition definitionClassForPackage:aPackageId.
+ ].
].
projectDefinitionClass notNil ifTrue:[
- projectDefinitionClass autoload.
- somethingHasBeenLoaded := projectDefinitionClass loadAsAutoloaded:doLoadAsAutoloaded.
- (silent not and:[somethingHasBeenLoaded]) ifTrue:[
- Transcript showCR:('Smalltalk [info]: loaded package: ' , aPackageId , ' from project definition').
- ].
- ^ true.
+ projectDefinitionClass autoload.
+ somethingHasBeenLoaded := projectDefinitionClass loadAsAutoloaded:doLoadAsAutoloaded.
+ (silent not and:[somethingHasBeenLoaded]) ifTrue:[
+ Transcript showCR:('Smalltalk [info]: loaded package: ' , aPackageId , ' from project definition').
+ ].
+ ^ true.
].
"Is there a shared library (.dll or .so) ?"
@@ -2422,45 +2422,45 @@
filename := Filename currentDirectory construct:shLibName.
filename exists ifFalse:[
- packageDir notNil ifTrue:[
- filename := packageDir construct:shLibName.
- filename exists ifFalse:[
- filename := (packageDir construct:'objbc') construct:shLibName.
- ]
- ]
+ packageDir notNil ifTrue:[
+ filename := packageDir construct:shLibName.
+ filename exists ifFalse:[
+ filename := (packageDir construct:'objbc') construct:shLibName.
+ ]
+ ]
].
filename exists ifTrue:[
- (self loadPackage:aPackageId fromClassLibrary:filename) ifTrue:[
- silent ifFalse:[
- Transcript showCR:('loaded package: ' , aPackageId , ' from binary classLib file: ' , filename pathName).
- ].
- doLoadAsAutoloaded ifFalse:[
- "/ force autoloading...
- Smalltalk allClassesDo:[:eachClass |
- eachClass package == aPackageId ifTrue:[eachClass autoload].
- ].
- ].
- ^ true
- ]
+ (self loadPackage:aPackageId fromClassLibrary:filename) ifTrue:[
+ silent ifFalse:[
+ Transcript showCR:('loaded package: ' , aPackageId , ' from binary classLib file: ' , filename pathName).
+ ].
+ doLoadAsAutoloaded ifFalse:[
+ "/ force autoloading...
+ Smalltalk allClassesDo:[:eachClass |
+ eachClass package == aPackageId ifTrue:[eachClass autoload].
+ ].
+ ].
+ ^ true
+ ]
].
packageDir isNil ifTrue:[
- ^ false.
+ ^ false.
].
"/ loadAll ? - will be soon obsolete
filename := packageDir construct:'loadAll'.
filename exists ifFalse:[
- filename := packageDir construct:'loadall'.
+ filename := packageDir construct:'loadall'.
].
filename exists ifTrue:[
- (self loadPackage:aPackageId fromLoadAllFile:filename) ifTrue:[
- silent ifFalse:[
- Transcript showCR:('loaded package: ' , aPackageId , ' from loadAll file: ' , filename pathName).
- ].
- ^ true
- ]
+ (self loadPackage:aPackageId fromLoadAllFile:filename) ifTrue:[
+ silent ifFalse:[
+ Transcript showCR:('loaded package: ' , aPackageId , ' from loadAll file: ' , filename pathName).
+ ].
+ ^ true
+ ]
].
packageName := packageDir baseName.
@@ -2550,27 +2550,27 @@
"/ If that happens, we restart the set-building here
"/
[(classes := CachedClasses) isNil] whileTrue:[
- CachedClasses := classes := IdentitySet new:NumberOfClassesHint.
- self keysAndValuesDo:[:eachName :eachGlobal |
- (eachGlobal notNil and:[eachGlobal isBehavior]) ifTrue:[
- "/ sigh - would like to skip over aliases
- "/ but this cannot be done simply by comparing
- "/ the classes name against the store-key
- "/ i.e. cannot do:
- "/ anObject name == sym ifTrue:[
- "/ classes add:anObject
- "/ ]
- "/ because that would lead to ignore all java
- "/ classes, which are stored under a different
- "/ key.
-
- (eachGlobal name == eachName
- or:[eachGlobal isJavaClass]) ifTrue:[
- classes add:eachGlobal
- ].
- ]
- ].
- NumberOfClassesHint := classes size.
+ CachedClasses := classes := IdentitySet new:NumberOfClassesHint.
+ self keysAndValuesDo:[:eachName :eachGlobal |
+ (eachGlobal notNil and:[eachGlobal isBehavior]) ifTrue:[
+ "/ sigh - would like to skip over aliases
+ "/ but this cannot be done simply by comparing
+ "/ the classes name against the store-key
+ "/ i.e. cannot do:
+ "/ anObject name == sym ifTrue:[
+ "/ classes add:anObject
+ "/ ]
+ "/ because that would lead to ignore all java
+ "/ classes, which are stored under a different
+ "/ key.
+
+ (eachGlobal name == eachName
+ or:[eachGlobal isJavaClass]) ifTrue:[
+ classes add:eachGlobal
+ ].
+ ]
+ ].
+ NumberOfClassesHint := classes size.
].
^ classes
@@ -2593,8 +2593,8 @@
classes := IdentitySet new:NumberOfClassesHint*2.
self allClassesDo:[:eachClass |
- classes add:(eachClass theNonMetaclass).
- classes add:(eachClass theMetaclass).
+ classes add:(eachClass theNonMetaclass).
+ classes add:(eachClass theMetaclass).
].
^ classes
!
@@ -2605,13 +2605,13 @@
(i.e. anonymous ones have to be aquired by Behavior allSubInstances)"
^ self allClasses select:[:aClass |
- |owner|
-
- (aClass isRealNameSpace not)
- and:[
- owner := aClass topOwningClass.
- (owner ? aClass) nameSpace == Smalltalk
- ]
+ |owner|
+
+ (aClass isRealNameSpace not)
+ and:[
+ owner := aClass topOwningClass.
+ (owner ? aClass) nameSpace == Smalltalk
+ ]
]
"
@@ -2626,7 +2626,7 @@
methods := OrderedCollection new.
self allClassesDo:[:eachClass |
- methods addAll:(eachClass extensionsFrom:aProjectID).
+ methods addAll:(eachClass extensionsFrom:aProjectID).
].
^ methods
!
@@ -2636,12 +2636,12 @@
implementors := OrderedCollection new.
self allClassesDo:[:cls |
- (cls includesSelector:aSelector) ifTrue:[
- implementors add:cls.
- ].
- (cls class includesSelector:aSelector) ifTrue:[
- implementors add:cls class.
- ].
+ (cls includesSelector:aSelector) ifTrue:[
+ implementors add:cls.
+ ].
+ (cls class includesSelector:aSelector) ifTrue:[
+ implementors add:cls class.
+ ].
].
^ implementors
@@ -2656,24 +2656,24 @@
allProjects := Set new.
self allClassesDo:[:eachClass |
- |cls pkg|
-
- cls := eachClass theNonMetaclass.
-
- pkg := cls package.
- pkg "withoutSeparators" size > 0 ifTrue:[
- allProjects add:pkg.
- ] ifFalse:[
- "/ for now, nameSpaces are not in any package;
- "/ this might change. Then, 0-sized packages are
- "/ illegal, and the following should be enabled.
- "/ self halt
- ].
- cls isJavaClass ifFalse:[
- cls instAndClassSelectorsAndMethodsDo:[:sel :mthd |
- allProjects add:mthd package asSymbol.
- ].
- ].
+ |cls pkg|
+
+ cls := eachClass theNonMetaclass.
+
+ pkg := cls package.
+ pkg "withoutSeparators" size > 0 ifTrue:[
+ allProjects add:pkg.
+ ] ifFalse:[
+ "/ for now, nameSpaces are not in any package;
+ "/ this might change. Then, 0-sized packages are
+ "/ illegal, and the following should be enabled.
+ "/ self halt
+ ].
+ cls isJavaClass ifFalse:[
+ cls instAndClassSelectorsAndMethodsDo:[:sel :mthd |
+ allProjects add:mthd package asSymbol.
+ ].
+ ].
].
allProjects := allProjects asOrderedCollection sort.
^ allProjects
@@ -2699,7 +2699,7 @@
classCategoryCompletion:aPartialCategory
"given a partial class category name, return an array consisting of
2 entries: 1st: the best (longest) match
- 2nd: collection consisting of matching categories"
+ 2nd: collection consisting of matching categories"
^ DoWhatIMeanSupport classCategoryCompletion:aPartialCategory inEnvironment:self
@@ -2725,45 +2725,45 @@
But be careful, to not invent new symbols ..."
sym := aString asSymbolIfInterned.
sym notNil ifTrue:[
- cls := self at:sym ifAbsent:nil.
- cls isBehavior ifTrue:[^ cls].
+ cls := self at:sym ifAbsent:nil.
+ cls isBehavior ifTrue:[^ cls].
].
(aString endsWith:' class') ifTrue:[
- nonMeta := self classNamed:(aString copyWithoutLast:6).
- nonMeta notNil ifTrue:[
- ^ nonMeta theMetaclass
- ].
+ nonMeta := self classNamed:(aString copyWithoutLast:6).
+ nonMeta notNil ifTrue:[
+ ^ nonMeta theMetaclass
+ ].
].
"no success yet. Try if this is a private classes of an autoloaded class"
cls isNil ifTrue:[
- idx := aString indexOfSubCollection:'::'.
- idx ~~ 0 ifTrue:[
- prefix := aString copyTo:idx-1.
- nsNameSymbol := prefix asSymbolIfInterned.
- nsNameSymbol notNil ifTrue:[
- rest := aString copyFrom:idx+2.
- namespace := self at:prefix asSymbolIfInterned ifAbsent:nil.
- "namespace may be the owner of a private class.
- NameSpaces and Behaviors have the same protocol"
- [namespace isBehavior] whileTrue:[
- idx := rest indexOfSubCollection:'::'.
- idx ~~ 0 ifTrue:[
- prefix := rest copyTo:idx-1.
- rest := rest copyFrom:idx+2.
- "this does an implicit autoload if required"
- namespace := namespace privateClassesAt:prefix.
- ] ifFalse:[
- namespace isLoaded ifTrue:[
- cls := namespace privateClassesAt:rest.
- cls isBehavior ifTrue:[^ cls].
- ].
- namespace := nil. "force exit of loop"
- ].
- ].
- ].
- ].
+ idx := aString indexOfSubCollection:'::'.
+ idx ~~ 0 ifTrue:[
+ prefix := aString copyTo:idx-1.
+ nsNameSymbol := prefix asSymbolIfInterned.
+ nsNameSymbol notNil ifTrue:[
+ rest := aString copyFrom:idx+2.
+ namespace := self at:prefix asSymbolIfInterned ifAbsent:nil.
+ "namespace may be the owner of a private class.
+ NameSpaces and Behaviors have the same protocol"
+ [namespace isBehavior] whileTrue:[
+ idx := rest indexOfSubCollection:'::'.
+ idx ~~ 0 ifTrue:[
+ prefix := rest copyTo:idx-1.
+ rest := rest copyFrom:idx+2.
+ "this does an implicit autoload if required"
+ namespace := namespace privateClassesAt:prefix.
+ ] ifFalse:[
+ namespace isLoaded ifTrue:[
+ cls := namespace privateClassesAt:rest.
+ cls isBehavior ifTrue:[^ cls].
+ ].
+ namespace := nil. "force exit of loop"
+ ].
+ ].
+ ].
+ ].
].
^ nil
@@ -2799,7 +2799,7 @@
classnameCompletion:aPartialClassName
"given a partial classname, return an array consisting of
2 entries: 1st: the best (longest) match
- 2nd: collection consisting of matching names"
+ 2nd: collection consisting of matching names"
^ DoWhatIMeanSupport classnameCompletion:aPartialClassName inEnvironment:self
!
@@ -2807,7 +2807,7 @@
classnameCompletion:aPartialClassName inEnvironment:anEnvironment
"given a partial classname, return an array consisting of
2 entries: 1st: the best (longest) match
- 2nd: collection consisting of matching names"
+ 2nd: collection consisting of matching names"
^ DoWhatIMeanSupport classnameCompletion:aPartialClassName inEnvironment:anEnvironment
@@ -2838,7 +2838,7 @@
globalNameCompletion:aPartialGlobalName
"given a partial globalName, return an array consisting of
2 entries: 1st: the best (longest) match
- 2nd: collection consisting of matching names"
+ 2nd: collection consisting of matching names"
^ DoWhatIMeanSupport globalNameCompletion:aPartialGlobalName inEnvironment:self
@@ -2856,7 +2856,7 @@
globalnameCompletion:aPartialGlobalName
"given a partial globalName, return an array consisting of
2 entries: 1st: the best (longest) match
- 2nd: collection consisting of matching names"
+ 2nd: collection consisting of matching names"
<resource:#obsolete>
self obsoleteMethodWarning:'use #globalNameCompletion:'.
@@ -2949,11 +2949,11 @@
i := aKey lastIndexOf:$:.
i ~~ 0 ifTrue:[
- i > 1 ifTrue:[
- (aKey at:(i-1)) == $: ifFalse:[
- ^ true.
- ].
- ].
+ i > 1 ifTrue:[
+ (aKey at:(i-1)) == $: ifFalse:[
+ ^ true.
+ ].
+ ].
].
^ false.
@@ -2975,15 +2975,15 @@
But be careful, to not invent new symbols ..."
sym := aString asSymbolIfInterned.
sym notNil ifTrue:[
- cls := self at:sym ifAbsent:nil.
- cls isBehavior ifTrue:[^ cls].
+ cls := self at:sym ifAbsent:nil.
+ cls isBehavior ifTrue:[^ cls].
].
(aString endsWith:' class') ifTrue:[
- nonMeta := self loadedClassNamed:(aString copyWithoutLast:6).
- nonMeta notNil ifTrue:[
- ^ nonMeta theMetaclass
- ].
+ nonMeta := self loadedClassNamed:(aString copyWithoutLast:6).
+ nonMeta notNil ifTrue:[
+ ^ nonMeta theMetaclass
+ ].
].
^ nil
@@ -3004,7 +3004,7 @@
methodProtocolCompletion:aPartialProtocolName
"given a partial method protocol name, return an array consisting of
2 entries: 1st: the best (longest) match
- 2nd: collection consisting of matching protocols"
+ 2nd: collection consisting of matching protocols"
^ DoWhatIMeanSupport methodProtocolCompletion:aPartialProtocolName inEnvironment:self
@@ -3033,10 +3033,10 @@
"redefined, since the references are only kept in the VM's symbol table"
self keysAndValuesDo:[:key :val |
- aCollection do:[:anObject |
- (key == anObject) ifTrue:[^ true].
- (val == anObject ) ifTrue:[^ true].
- ]
+ aCollection do:[:anObject |
+ (key == anObject) ifTrue:[^ true].
+ (val == anObject ) ifTrue:[^ true].
+ ]
].
^ super referencesAny:aCollection
@@ -3047,8 +3047,8 @@
"redefined, since the references are only kept in the VM's symbol table"
self keysAndValuesDo:[:key :val |
- (key isKindOf:aClass) ifTrue:[^ true].
- (val isKindOf:aClass) ifTrue:[^ true].
+ (key isKindOf:aClass) ifTrue:[^ true].
+ (val isKindOf:aClass) ifTrue:[^ true].
].
^ super referencesDerivedInstanceOf:aClass
!
@@ -3057,8 +3057,8 @@
"redefined, since the references are only kept in the VM's symbol table"
self keysAndValuesDo:[:key :val |
- (key isMemberOf:aClass) ifTrue:[^ true].
- (val isMemberOf:aClass) ifTrue:[^ true].
+ (key isMemberOf:aClass) ifTrue:[^ true].
+ (val isMemberOf:aClass) ifTrue:[^ true].
].
^ super referencesInstanceOf:aClass
!
@@ -3067,8 +3067,8 @@
"redefined, since the references are only kept in the VM's symbol table"
self keysAndValuesDo:[:key :val |
- (key == anObject) ifTrue:[^ true].
- (val == anObject ) ifTrue:[^ true].
+ (key == anObject) ifTrue:[^ true].
+ (val == anObject ) ifTrue:[^ true].
].
^ super referencesObject:anObject
@@ -3090,8 +3090,8 @@
aName := nameIn.
(aName startsWith:'Smalltalk::') ifTrue:[
- aName := aName copyFrom:12.
- ^ self at:(aName asSymbol) ifAbsent:nil.
+ aName := aName copyFrom:12.
+ ^ self at:(aName asSymbol) ifAbsent:nil.
].
sym := aName asSymbol.
@@ -3101,12 +3101,12 @@
ns := aClass nameSpace.
(ns notNil and:[ns ~~ Smalltalk]) ifTrue:[
- ns isNameSpace ifTrue:[
- cls := ns at:sym ifAbsent:nil.
- ] ifFalse:[
- cls := ns privateClassesAt:sym
- ].
- cls notNil ifTrue:[^ cls].
+ ns isNameSpace ifTrue:[
+ cls := ns at:sym ifAbsent:nil.
+ ] ifFalse:[
+ cls := ns privateClassesAt:sym
+ ].
+ cls notNil ifTrue:[^ cls].
].
^ self at:sym ifAbsent:nil.
@@ -3116,7 +3116,7 @@
selectorCompletion:aPartialSymbolName
"given a partial selector, return an array consisting of
2 entries: 1st: the longest match
- 2nd: collection consisting of matching implemented selectors"
+ 2nd: collection consisting of matching implemented selectors"
^ DoWhatIMeanSupport selectorCompletion:aPartialSymbolName inEnvironment:self
!
@@ -3124,7 +3124,7 @@
selectorCompletion:aPartialSymbolName inEnvironment:anEnvironment
"given a partial selector, return an array consisting of
2 entries: 1st: the longest match
- 2nd: collection consisting of matching implemented selectors"
+ 2nd: collection consisting of matching implemented selectors"
^ DoWhatIMeanSupport selectorCompletion:aPartialSymbolName inEnvironment:anEnvironment
@@ -3224,10 +3224,10 @@
idx := CommandLineArguments indexOf:'--browserParameters:'.
idx ~~ 0 ifTrue:[
- params := Dictionary new.
- (CommandLineArguments copyFrom:idx+1) pairWiseDo:[:key :value |
- params at:key put:value.
- ].
+ params := Dictionary new.
+ (CommandLineArguments copyFrom:idx+1) pairWiseDo:[:key :value |
+ params at:key put:value.
+ ].
].
'browserWindow is: ' errorPrint. windowID errorPrintCR.
@@ -3235,9 +3235,9 @@
'Display is: ' errorPrint. Display errorPrintCR.
process := [
- PluginSupport
- startInBrowserWithWindowID:windowID
- parameters:params.
+ PluginSupport
+ startInBrowserWithWindowID:windowID
+ parameters:params.
] newProcess.
process priority:(Processor userSchedulingPriority).
process name:'browser start handler'.
@@ -3275,42 +3275,42 @@
thisIsARestart := imageName notNil.
graphicalMode ifTrue:[
- Display isNil ifTrue:[
- (StartupClass notNil
- and:[ (StartupClass perform:#isHeadless ifNotUnderstood:false) ]) ifFalse:[
- self openDisplay.
- ].
- ].
+ Display isNil ifTrue:[
+ (StartupClass notNil
+ and:[ (StartupClass perform:#isHeadless ifNotUnderstood:false) ]) ifFalse:[
+ self openDisplay.
+ ].
+ ].
].
StandAlone ifFalse:[
- "
- enable the graphical debugger/inspector
- (they could have been (re)defined as autoloaded in the patches file)
- "
- self initStandardTools.
+ "
+ enable the graphical debugger/inspector
+ (they could have been (re)defined as autoloaded in the patches file)
+ "
+ self initStandardTools.
].
"
if there is a display, start its event dispatcher
"
Display notNil ifTrue:[
- Display deviceIOTimeoutErrorSignal handlerBlock:[:ex |
- SaveEmergencyImage == true ifTrue:[
- 'Display [warning]: broken display connection - emergency save in ''crash.img''.' infoPrintCR.
- ObjectMemory primSnapShotOn:'crash.img'.
- ].
- 'Display [warning]: broken display connection - exit.' infoPrintCR.
- self exit.
- ].
- Display startDispatch.
+ Display deviceIOTimeoutErrorSignal handlerBlock:[:ex |
+ SaveEmergencyImage == true ifTrue:[
+ 'Display [warning]: broken display connection - emergency save in ''crash.img''.' infoPrintCR.
+ ObjectMemory primSnapShotOn:'crash.img'.
+ ].
+ 'Display [warning]: broken display connection - exit.' infoPrintCR.
+ self exit.
+ ].
+ Display startDispatch.
].
idx := CommandLineArguments indexOf:'--browserWindow:'.
IsPlugin := (idx ~~ 0).
IsPlugin ifTrue:[
- self browserWindowStartup.
- "/ not reached
+ self browserWindowStartup.
+ "/ not reached
].
Initializing := false.
@@ -3321,49 +3321,49 @@
"/ Therefore, it is now done by an extra user-process.
process := [
- StartBlocks notNil ifTrue:[
- StartBlocks do:[:aBlock|
- aBlock value
- ].
- StartBlocks := nil.
- ].
- ImageStartBlocks notNil ifTrue:[
- ImageStartBlocks do:[:aBlock|
- aBlock value
- ].
- ].
- StandAlone ifFalse:[
- (SilentLoading == true) ifFalse:[ "i.e. undefined counts as false"
- thisIsARestart ifTrue:[
- Transcript cr.
- Transcript showCR:('Smalltalk restarted from:'
- , imageName
- , ' (saved '
- , ObjectMemory imageSaveTime printString
- , ')' ).
- ] ifFalse:[
- Transcript showCR:(self hello).
- Transcript showCR:(self copyrightString).
- ].
- Transcript cr.
- ].
-
- DemoMode==true ifTrue:[
- Transcript showCR:'*** Restricted use: ***'.
- Transcript showCR:'*** This program may be used for education only. ***'.
- Transcript showCR:'*** Please read the files COPYRIGHT and LICENSE ***'.
- Transcript showCR:'*** for more details. ***'.
- Transcript cr.
- ].
- ].
-
- thisIsARestart ifTrue:[
- "/
- "/ the final late notification - users can now assume that
- "/ views, forms etc. have been recreated.
-
- ObjectMemory changed:#returnFromSnapshot.
- ]
+ StartBlocks notNil ifTrue:[
+ StartBlocks do:[:aBlock|
+ aBlock value
+ ].
+ StartBlocks := nil.
+ ].
+ ImageStartBlocks notNil ifTrue:[
+ ImageStartBlocks do:[:aBlock|
+ aBlock value
+ ].
+ ].
+ StandAlone ifFalse:[
+ (SilentLoading == true) ifFalse:[ "i.e. undefined counts as false"
+ thisIsARestart ifTrue:[
+ Transcript cr.
+ Transcript showCR:('Smalltalk restarted from:'
+ , imageName
+ , ' (saved '
+ , ObjectMemory imageSaveTime printString
+ , ')' ).
+ ] ifFalse:[
+ Transcript showCR:(self hello).
+ Transcript showCR:(self copyrightString).
+ ].
+ Transcript cr.
+ ].
+
+ DemoMode==true ifTrue:[
+ Transcript showCR:'*** Restricted use: ***'.
+ Transcript showCR:'*** This program may be used for education only. ***'.
+ Transcript showCR:'*** Please read the files COPYRIGHT and LICENSE ***'.
+ Transcript showCR:'*** for more details. ***'.
+ Transcript cr.
+ ].
+ ].
+
+ thisIsARestart ifTrue:[
+ "/
+ "/ the final late notification - users can now assume that
+ "/ views, forms etc. have been recreated.
+
+ ObjectMemory changed:#returnFromSnapshot.
+ ]
] newProcess.
@@ -3380,60 +3380,60 @@
"/ message.
(StartupClass notNil and:[StartupSelector notNil]) ifTrue:[
- "
- allow more customization by reading an image specific rc-file
- "
- thisIsARestart ifTrue:[
- (imageName asFilename hasSuffix:'img') ifTrue:[
- imageName := imageName copyWithoutLast:4
- ].
- self fileIn:(imageName , '.rc')
- ].
+ "
+ allow more customization by reading an image specific rc-file
+ "
+ thisIsARestart ifTrue:[
+ (imageName asFilename hasSuffix:'img') ifTrue:[
+ imageName := imageName copyWithoutLast:4
+ ].
+ self fileIn:(imageName , '.rc')
+ ].
"/ Display notNil ifTrue:[
"/ Display exitOnLastClose:true.
"/ ].
"/ Processor exitWhenNoMoreUserProcesses:true.
- process := [
- StandAlone ifTrue:[
- AbortOperationRequest handle:[:ex |
- 'Smalltalk [info]: aborted - exit.' infoPrintCR.
- OperatingSystem exit:1
- ] do:[
- StartupClass perform:StartupSelector withArguments:StartupArguments.
- ]
- ] ifFalse:[
- StartupClass perform:StartupSelector withArguments:StartupArguments.
- ].
-
- "/
- "/ non-GUI apps exit after the startup;
- "/ assume that GUI apps have created & opened some view ...
- "/
- Display isNil ifTrue:[
- 'Smalltalk [info]: no Display - exit.' infoPrintCR.
- Smalltalk exit.
- ].
- "/
- "/ GUI apps exit after the last user process has finished
- "/
- Display exitOnLastClose:true.
- Processor exitWhenNoMoreUserProcesses:true.
- ] newProcess.
- process priority:(Processor userSchedulingPriority).
- process name:'main'.
- process beGroupLeader.
- process resume.
- process := true. "do not refer to process"
+ process := [
+ StandAlone ifTrue:[
+ AbortOperationRequest handle:[:ex |
+ 'Smalltalk [info]: aborted - exit.' infoPrintCR.
+ OperatingSystem exit:1
+ ] do:[
+ StartupClass perform:StartupSelector withArguments:StartupArguments.
+ ]
+ ] ifFalse:[
+ StartupClass perform:StartupSelector withArguments:StartupArguments.
+ ].
+
+ "/
+ "/ non-GUI apps exit after the startup;
+ "/ assume that GUI apps have created & opened some view ...
+ "/
+ Display isNil ifTrue:[
+ 'Smalltalk [info]: no Display - exit.' infoPrintCR.
+ Smalltalk exit.
+ ].
+ "/
+ "/ GUI apps exit after the last user process has finished
+ "/
+ Display exitOnLastClose:true.
+ Processor exitWhenNoMoreUserProcesses:true.
+ ] newProcess.
+ process priority:(Processor userSchedulingPriority).
+ process name:'main'.
+ process beGroupLeader.
+ process resume.
+ process := true. "do not refer to process"
].
StandAlone ifTrue:[
- Display notNil ifTrue:[
- FlyByHelp notNil ifTrue:[
- FlyByHelp start
- ].
- ].
+ Display notNil ifTrue:[
+ FlyByHelp notNil ifTrue:[
+ FlyByHelp start
+ ].
+ ].
].
self hideSplashWindow. "/ if there is one, its now time to hide it
@@ -3445,13 +3445,13 @@
((Display notNil and:[graphicalMode])
or:[process notNil
or:[HeadlessOperation]]) ifTrue:[
- Processor dispatchLoop.
- "done - the last process finished"
- 'Smalltalk [info]: last process finished - exit.' infoPrintCR.
+ Processor dispatchLoop.
+ "done - the last process finished"
+ 'Smalltalk [info]: last process finished - exit.' infoPrintCR.
] ifFalse:[
- StandAlone ifFalse:[
- self readEvalPrint
- ]
+ StandAlone ifFalse:[
+ self readEvalPrint
+ ]
].
self exit
@@ -3468,27 +3468,27 @@
'Smalltalk [info]: opening display...' infoPrintCR.
Display isNil ifTrue:[
- Screen notNil ifTrue:[
- [
- Screen openDefaultDisplay:nil.
- ] on:Screen deviceOpenErrorSignal do:[:ex|
- ('Smalltalk [error]: No Display connection to: ', ex parameter printString) errorPrintCR.
- 'Smalltalk [info]: Either set the DISPLAY environment variable,' infoPrintCR.
- 'Smalltalk [info]: or start smalltalk with a -display argument.' infoPrintCR.
- HeadlessOperation == true ifFalse:[
- OperatingSystem exit:1.
- ].
- ].
-
- Display notNil ifTrue:[
- (self secureFileIn:'display.rc') ifFalse:[
- "/ 'Smalltalk [warning]: no display.rc found; screen setting might be wrong.' errorPrintCR.
- (self secureFileIn:'keyboard.rc') ifFalse:[
- "/ 'Smalltalk [warning]: no keyboard.rc found; shortkey setting might be wrong.' errorPrintCR.
- ]
- ]
- ].
- ]
+ Screen notNil ifTrue:[
+ [
+ Screen openDefaultDisplay:nil.
+ ] on:Screen deviceOpenErrorSignal do:[:ex|
+ ('Smalltalk [error]: No Display connection to: ', ex parameter printString) errorPrintCR.
+ 'Smalltalk [info]: Either set the DISPLAY environment variable,' infoPrintCR.
+ 'Smalltalk [info]: or start smalltalk with a -display argument.' infoPrintCR.
+ HeadlessOperation == true ifFalse:[
+ OperatingSystem exit:1.
+ ].
+ ].
+
+ Display notNil ifTrue:[
+ (self secureFileIn:'display.rc') ifFalse:[
+ "/ 'Smalltalk [warning]: no display.rc found; screen setting might be wrong.' errorPrintCR.
+ (self secureFileIn:'keyboard.rc') ifFalse:[
+ "/ 'Smalltalk [warning]: no keyboard.rc found; shortkey setting might be wrong.' errorPrintCR.
+ ]
+ ]
+ ].
+ ]
]
"Created: / 06-12-2006 / 15:38:17 / cg"
@@ -3510,15 +3510,15 @@
#earlySystemInstallation is sent for ST80 compatibility
#earlyRestart is send first, nothing has been setup yet.
- (should be used to flush all device dependent entries)
+ (should be used to flush all device dependent entries)
#restarted is send right after.
- (should be used to recreate external resources (fds, bitmaps etc)
+ (should be used to recreate external resources (fds, bitmaps etc)
#returnFromSnapshot is sent last
- (should be used to restart processes, reOpen Streams which cannot
- be automatically be reopened (i.e. Sockets, Pipes) and so on.
- (Notice that positionable fileStreams are already reopened and repositioned)
+ (should be used to restart processes, reOpen Streams which cannot
+ be automatically be reopened (i.e. Sockets, Pipes) and so on.
+ (Notice that positionable fileStreams are already reopened and repositioned)
"
|deb insp transcript idx|
@@ -3542,12 +3542,12 @@
idx := CommandLineArguments indexOf:'-q'.
idx == 0 ifTrue:[
- idx := CommandLineArguments indexOf:'--silent'.
+ idx := CommandLineArguments indexOf:'--silent'.
].
idx ~~ 0 ifTrue:[
- Object infoPrinting:false.
- ObjectMemory infoPrinting:false.
- CommandLineArguments removeAtIndex:idx.
+ Object infoPrinting:false.
+ ObjectMemory infoPrinting:false.
+ CommandLineArguments removeAtIndex:idx.
].
"/
@@ -3582,7 +3582,7 @@
insp := Inspector.
deb := Debugger.
deb notNil ifTrue:[
- deb reinitialize
+ deb reinitialize
].
Inspector := MiniInspector.
Debugger := MiniDebugger.
@@ -3595,7 +3595,7 @@
"/ ObjectFileLoader; therefore, must reload before doing any notifications.
ObjectFileLoader notNil ifTrue:[
- ObjectFileLoader reloadAllRememberedObjectFiles.
+ ObjectFileLoader reloadAllRememberedObjectFiles.
].
"/
@@ -3604,9 +3604,9 @@
"/ a display during early startup.
Screen notNil ifTrue:[
- Screen allScreens do:[:aDisplay |
- aDisplay invalidateConnection
- ].
+ Screen allScreens do:[:aDisplay |
+ aDisplay invalidateConnection
+ ].
].
ObjectMemory changed:#earlySystemInstallation.
@@ -3622,7 +3622,7 @@
"/ (mostly view/GC/color & font stuff)
ObjectMemory
- changed:#earlyRestart; changed:#restarted.
+ changed:#earlyRestart; changed:#restarted.
"/
"/ start catching SIGINT and SIGQUIT
@@ -3635,75 +3635,75 @@
idx := CommandLineArguments indexOf:'--faststart'.
idx == 0 ifTrue:[
- idx := CommandLineArguments indexOf:'--fastStart'.
+ idx := CommandLineArguments indexOf:'--fastStart'.
].
idx ~~ 0 ifTrue:[
- CommandLineArguments removeAtIndex:idx.
+ CommandLineArguments removeAtIndex:idx.
] ifFalse:[
- CallbackSignal := QuerySignal new.
- [
- Class withoutUpdatingChangesDo:[
- (self fileIn:(self commandName , '_r.rc')) ifFalse:[
- "no _r.rc file where executable is; try default smalltalk_r.rc"
- self fileIn:'smalltalk_r.rc'
- ].
- ]
- ] on:CallbackSignal do:[:ex|
- "/ now, display and view-stuff works;
- "/ back to the previous debugging interface
-
- Inspector := insp.
- Debugger := deb.
-
- "/ reinstall Transcript, if not changed during restart.
- "/ if there was no Transcript, go to stderr
-
- (transcript notNil and:[Transcript == Stderr]) ifTrue:[
- Transcript := transcript.
- ].
- Initializing := false.
- ex proceed.
- ].
- CallbackSignal := nil.
+ CallbackSignal := QuerySignal new.
+ [
+ Class withoutUpdatingChangesDo:[
+ (self fileIn:(self commandName , '_r.rc')) ifFalse:[
+ "no _r.rc file where executable is; try default smalltalk_r.rc"
+ self fileIn:'smalltalk_r.rc'
+ ].
+ ]
+ ] on:CallbackSignal do:[:ex|
+ "/ now, display and view-stuff works;
+ "/ back to the previous debugging interface
+
+ Inspector := insp.
+ Debugger := deb.
+
+ "/ reinstall Transcript, if not changed during restart.
+ "/ if there was no Transcript, go to stderr
+
+ (transcript notNil and:[Transcript == Stderr]) ifTrue:[
+ Transcript := transcript.
+ ].
+ Initializing := false.
+ ex proceed.
+ ].
+ CallbackSignal := nil.
].
"/ reinitialization (restart) of Display is normally performed
"/ in the restart script. If this has not been run for some reason,
"/ do in now.
Initializing ifTrue:[
- Display notNil ifTrue:[
- [
- Display reinitializeFor:Screen defaultDisplayName.
- ] on:Screen deviceOpenErrorSignal do:[
- 'Smalltalk [error]: Cannot restart connection to: ' errorPrint.
- Screen defaultDisplayName errorPrintCR.
- OperatingSystem exit:1.
- ].
- ].
- "/ now, display and view-stuff works;
- "/ back to the previous debugging interface
-
- Inspector := insp.
- Debugger := deb.
-
- "/ reinstall Transcript, if not changed during restart.
- "/ if there was no Transcript, go to stderr
-
- (transcript notNil and:[Transcript == Stderr]) ifTrue:[
- Transcript := transcript.
- ].
- Initializing := false.
+ Display notNil ifTrue:[
+ [
+ Display reinitializeFor:Screen defaultDisplayName.
+ ] on:Screen deviceOpenErrorSignal do:[
+ 'Smalltalk [error]: Cannot restart connection to: ' errorPrint.
+ Screen defaultDisplayName errorPrintCR.
+ OperatingSystem exit:1.
+ ].
+ ].
+ "/ now, display and view-stuff works;
+ "/ back to the previous debugging interface
+
+ Inspector := insp.
+ Debugger := deb.
+
+ "/ reinstall Transcript, if not changed during restart.
+ "/ if there was no Transcript, go to stderr
+
+ (transcript notNil and:[Transcript == Stderr]) ifTrue:[
+ Transcript := transcript.
+ ].
+ Initializing := false.
].
Screen notNil ifTrue:[
- "clean up leftover screens (and views) that haven't been reopened.
- Operate on a copy, since brokenConnection removes us from AllScreens"
- Screen allScreens copy do:[:eachDisplay |
- eachDisplay isOpen ifFalse:[
- 'Smalltalk [info]: cannot reopen secondary display: ' errorPrint.
- eachDisplay errorPrintCR.
- eachDisplay cleanupAfterDispatch; brokenConnection.
- ]
- ].
+ "clean up leftover screens (and views) that haven't been reopened.
+ Operate on a copy, since brokenConnection removes us from AllScreens"
+ Screen allScreens copy do:[:eachDisplay |
+ eachDisplay isOpen ifFalse:[
+ 'Smalltalk [info]: cannot reopen secondary display: ' errorPrint.
+ eachDisplay errorPrintCR.
+ eachDisplay cleanupAfterDispatch; brokenConnection.
+ ]
+ ].
].
deb := insp := transcript := nil. "avoid dangling refs"
@@ -3730,11 +3730,11 @@
int clr = 0;
if (__isString(aMessageStringOrNil)) {
- msg = __stringVal(aMessageStringOrNil);
+ msg = __stringVal(aMessageStringOrNil);
}
if (__isSmallInteger(rgbValueOrNil)) {
- clr = __intVal(rgbValueOrNil);
- __win32_splashMessageColor(clr);
+ clr = __intVal(rgbValueOrNil);
+ __win32_splashMessageColor(clr);
}
__win32_splashMessage(msg);
#endif
@@ -3763,145 +3763,145 @@
while reading patches- and rc-file, do not add things into change-file
"
Class withoutUpdatingChangesDo:[
- |commandFile defaultRC prevCatchSetting|
-
- didReadRCFile := false.
-
- StandAlone ifFalse:[
- "/
- "/ look for any '-q', '-e' or '-f' command line arguments
- "/ and handle them;
- "/ read startup and patches file
- "/
- idx := CommandLineArguments indexOf:'-q'.
- idx == 0 ifTrue:[
- idx := CommandLineArguments indexOf:'--silent'.
- ].
- idx ~~ 0 ifTrue:[
- Object infoPrinting:false.
- ObjectMemory infoPrinting:false.
- CommandLineArguments removeAtIndex:idx.
- ].
-
- "/ look for a '-e filename' or '--execute filename' argument
- "/ this will force fileIn of filename only, no standard startup.
-
- idx := CommandLineArguments indexOf:'-e'.
- idx == 0 ifTrue:[
- idx := CommandLineArguments indexOf:'--execute'.
- ].
- idx ~~ 0 ifTrue:[
- arg := CommandLineArguments at:idx + 1.
-
- CommandLineArguments
- removeAtIndex:idx+1; removeAtIndex:idx.
-
- arg = '-' ifTrue:[
- self fileInStream:Stdin
- lazy:nil
- silent:nil
- logged:false
- addPath:nil
- ] ifFalse:[
- self fileIn:arg.
- ].
- self exit
- ].
-
- "/ look for a '-E expr' or '--eval expr' argument
- "/ this will force evaluation of expr only, no standard startup
- idx := CommandLineArguments indexOf:'-E'.
- idx == 0 ifTrue:[
- idx := CommandLineArguments indexOf:'--eval'.
- ].
- idx ~~ 0 ifTrue:[
- arg := CommandLineArguments at:idx + 1.
-
- CommandLineArguments
- removeAtIndex:idx+1; removeAtIndex:idx.
-
- self
- fileInStream:arg readStream
- lazy:nil
- silent:nil
- logged:false
- addPath:nil.
-
- self exit
- ].
-
- "look for a '-f filename' or '--file filename' argument
- this will force evaluation of filename instead of smalltalk.rc"
-
- idx := CommandLineArguments indexOf:'-f'.
- idx == 0 ifTrue:[
- idx := CommandLineArguments indexOf:'--file'.
- ].
- idx ~~ 0 ifTrue:[
- commandFile := CommandLineArguments at:idx+1.
- CommandLineArguments removeAtIndex:idx+1; removeAtIndex:idx.
- ].
- ].
-
- commandFile notNil ifTrue:[
- (self secureFileIn:commandFile) ifFalse:[
- ('Smalltalk [error]: startup file "', commandFile, '" not found.') errorPrintCR.
- OperatingSystem exit:1.
- ].
- ] ifFalse:[
- "/ look for <command>.rc
- "/ if not found, read smalltalk.rc (or stxapp.rc for standAlone operation)
-
- commandFile := self commandName asFilename withSuffix:'rc'.
- (didReadRCFile := self secureFileIn:commandFile) ifFalse:[
- StandAlone ifFalse:[
- defaultRC := 'smalltalk.rc'
- ] ifTrue:[
- defaultRC := 'stxapp.rc'
- ].
-
- didReadRCFile := self secureFileIn:defaultRC.
- didReadRCFile ifFalse:[
- StandAlone ifFalse:[
- 'Smalltalk [warning]: no startup rc-file found. Going into line-by-line interpreter.' infoPrintCR.
- graphicalMode := false.
- ]
- ]
- ].
-
- "/ ('StandAlone is %1' bindWith:StandAlone) printCR.
- "/ ('Headless is %1' bindWith:HeadlessOperation) printCR.
- "/ ('Display is %1' bindWith:Display) printCR.
- "/ ('Screen is %1' bindWith:Screen) printCR.
-
- didReadRCFile ifFalse:[
- self secureFileIn:'private.rc'.
-
- "/
- "/ No RC file found;
- "/ Setup more default stuff
- "/
- StandAlone ifFalse:[
- "/ its a smalltalk - proceed in interpreter.
- 'Smalltalk [warning]: no startup rc-file found. Going into line-by-line interpreter.' infoPrintCR.
- graphicalMode := false.
- ].
-
- "/ setup more defaults...
- ObjectMemory startBackgroundCollectorAt:5.
- ObjectMemory startBackgroundFinalizationAt:5.
- self addStartBlock:[
- Processor startTimeSlicing.
- Processor supportDynamicPriorities:true.
- ObjectMemory backgroundCollectProcess priorityRange:(4 to:9).
- ObjectMemory backgroundFinalizationProcess priorityRange:(4 to:9).
- ].
- ].
- ].
+ |commandFile defaultRC prevCatchSetting|
+
+ didReadRCFile := false.
+
+ StandAlone ifFalse:[
+ "/
+ "/ look for any '-q', '-e' or '-f' command line arguments
+ "/ and handle them;
+ "/ read startup and patches file
+ "/
+ idx := CommandLineArguments indexOf:'-q'.
+ idx == 0 ifTrue:[
+ idx := CommandLineArguments indexOf:'--silent'.
+ ].
+ idx ~~ 0 ifTrue:[
+ Object infoPrinting:false.
+ ObjectMemory infoPrinting:false.
+ CommandLineArguments removeAtIndex:idx.
+ ].
+
+ "/ look for a '-e filename' or '--execute filename' argument
+ "/ this will force fileIn of filename only, no standard startup.
+
+ idx := CommandLineArguments indexOf:'-e'.
+ idx == 0 ifTrue:[
+ idx := CommandLineArguments indexOf:'--execute'.
+ ].
+ idx ~~ 0 ifTrue:[
+ arg := CommandLineArguments at:idx + 1.
+
+ CommandLineArguments
+ removeAtIndex:idx+1; removeAtIndex:idx.
+
+ arg = '-' ifTrue:[
+ self fileInStream:Stdin
+ lazy:nil
+ silent:nil
+ logged:false
+ addPath:nil
+ ] ifFalse:[
+ self fileIn:arg.
+ ].
+ self exit
+ ].
+
+ "/ look for a '-E expr' or '--eval expr' argument
+ "/ this will force evaluation of expr only, no standard startup
+ idx := CommandLineArguments indexOf:'-E'.
+ idx == 0 ifTrue:[
+ idx := CommandLineArguments indexOf:'--eval'.
+ ].
+ idx ~~ 0 ifTrue:[
+ arg := CommandLineArguments at:idx + 1.
+
+ CommandLineArguments
+ removeAtIndex:idx+1; removeAtIndex:idx.
+
+ self
+ fileInStream:arg readStream
+ lazy:nil
+ silent:nil
+ logged:false
+ addPath:nil.
+
+ self exit
+ ].
+
+ "look for a '-f filename' or '--file filename' argument
+ this will force evaluation of filename instead of smalltalk.rc"
+
+ idx := CommandLineArguments indexOf:'-f'.
+ idx == 0 ifTrue:[
+ idx := CommandLineArguments indexOf:'--file'.
+ ].
+ idx ~~ 0 ifTrue:[
+ commandFile := CommandLineArguments at:idx+1.
+ CommandLineArguments removeAtIndex:idx+1; removeAtIndex:idx.
+ ].
+ ].
+
+ commandFile notNil ifTrue:[
+ (self secureFileIn:commandFile) ifFalse:[
+ ('Smalltalk [error]: startup file "', commandFile, '" not found.') errorPrintCR.
+ OperatingSystem exit:1.
+ ].
+ ] ifFalse:[
+ "/ look for <command>.rc
+ "/ if not found, read smalltalk.rc (or stxapp.rc for standAlone operation)
+
+ commandFile := self commandName asFilename withSuffix:'rc'.
+ (didReadRCFile := self secureFileIn:commandFile) ifFalse:[
+ StandAlone ifFalse:[
+ defaultRC := 'smalltalk.rc'
+ ] ifTrue:[
+ defaultRC := 'stxapp.rc'
+ ].
+
+ didReadRCFile := self secureFileIn:defaultRC.
+ didReadRCFile ifFalse:[
+ StandAlone ifFalse:[
+ 'Smalltalk [warning]: no startup rc-file found. Going into line-by-line interpreter.' infoPrintCR.
+ graphicalMode := false.
+ ]
+ ]
+ ].
+
+ "/ ('StandAlone is %1' bindWith:StandAlone) printCR.
+ "/ ('Headless is %1' bindWith:HeadlessOperation) printCR.
+ "/ ('Display is %1' bindWith:Display) printCR.
+ "/ ('Screen is %1' bindWith:Screen) printCR.
+
+ didReadRCFile ifFalse:[
+ self secureFileIn:'private.rc'.
+
+ "/
+ "/ No RC file found;
+ "/ Setup more default stuff
+ "/
+ StandAlone ifFalse:[
+ "/ its a smalltalk - proceed in interpreter.
+ 'Smalltalk [warning]: no startup rc-file found. Going into line-by-line interpreter.' infoPrintCR.
+ graphicalMode := false.
+ ].
+
+ "/ setup more defaults...
+ ObjectMemory startBackgroundCollectorAt:5.
+ ObjectMemory startBackgroundFinalizationAt:5.
+ self addStartBlock:[
+ Processor startTimeSlicing.
+ Processor supportDynamicPriorities:true.
+ ObjectMemory backgroundCollectProcess priorityRange:(4 to:9).
+ ObjectMemory backgroundFinalizationProcess priorityRange:(4 to:9).
+ ].
+ ].
+ ].
].
HeadlessOperation ifTrue:[
- graphicalMode := false.
+ graphicalMode := false.
].
self mainStartup:graphicalMode
@@ -3916,23 +3916,23 @@
|p|
p :=
- [
- |startBlocks|
-
- startBlocks := self startBlocks.
- startBlocks notNil ifTrue:[
- startBlocks do:[:aBlock|
- aBlock value
- ].
- startBlocks removeAll.
- ].
- ] newProcess.
+ [
+ |startBlocks|
+
+ startBlocks := self startBlocks.
+ startBlocks notNil ifTrue:[
+ startBlocks do:[:aBlock|
+ aBlock value
+ ].
+ startBlocks removeAll.
+ ].
+ ] newProcess.
p
- priority:(Processor userSchedulingPriority);
- name:'start block handler';
- beGroupLeader;
- resume.
+ priority:(Processor userSchedulingPriority);
+ name:'start block handler';
+ beGroupLeader;
+ resume.
! !
!Smalltalk class methodsFor:'startup queries'!
@@ -3957,7 +3957,7 @@
args := self commandLineArguments.
index := args indexOf:aString.
(index between:1 and:(args size - 1)) ifTrue:[
- ^ args at:index+1
+ ^ args at:index+1
].
^ nil.
@@ -4250,26 +4250,26 @@
table := IdentityDictionary new:100.
Method allSubInstancesDo:[:aMethod |
- source := nil.
- aMethod sourcePosition notNil ifTrue:[
- aMethod sourceFilename = 'st.src' ifTrue:[
- source := aMethod source.
- ]
- ] ifFalse:[
- source := aMethod source
- ].
-
- source notNil ifTrue:[
- pos := newStream position1Based.
- newStream nextChunkPut:source.
-
- "
- dont change the methods info - maybe some write error
- occurs later, in that case we abort and leave everything
- untouched.
- "
- table at:aMethod put:pos
- ]
+ source := nil.
+ aMethod sourcePosition notNil ifTrue:[
+ aMethod sourceFilename = 'st.src' ifTrue:[
+ source := aMethod source.
+ ]
+ ] ifFalse:[
+ source := aMethod source
+ ].
+
+ source notNil ifTrue:[
+ pos := newStream position1Based.
+ newStream nextChunkPut:source.
+
+ "
+ dont change the methods info - maybe some write error
+ occurs later, in that case we abort and leave everything
+ untouched.
+ "
+ table at:aMethod put:pos
+ ]
].
newStream syncData; close.
@@ -4284,7 +4284,7 @@
source reference"
table keysAndValuesDo:[:aMethod :pos |
- aMethod localSourceFilename:fileName position:pos.
+ aMethod localSourceFilename:fileName position:pos.
"/ aMethod printCR.
].
@@ -4312,18 +4312,18 @@
table := IdentityDictionary new:100.
Method allSubInstancesDo:[:aMethod |
- source := aMethod source.
- source notNil ifTrue:[
- pos := newStream position1Based.
- newStream nextChunkPut:source.
-
- "
- dont change the methods info - maybe some write error
- occurs later, in that case we abort and leave everything
- untouched.
- "
- table at:aMethod put:pos
- ]
+ source := aMethod source.
+ source notNil ifTrue:[
+ pos := newStream position1Based.
+ newStream nextChunkPut:source.
+
+ "
+ dont change the methods info - maybe some write error
+ occurs later, in that case we abort and leave everything
+ untouched.
+ "
+ table at:aMethod put:pos
+ ]
].
newStream syncData; close.
@@ -4338,7 +4338,7 @@
source reference"
table keysAndValuesDo:[:aMethod :pos |
- aMethod localSourceFilename:fileName position:pos.
+ aMethod localSourceFilename:fileName position:pos.
"/ aMethod printCR.
].
@@ -4357,11 +4357,11 @@
(otherwise, the newest revision will be loaded"
^ self
- installAutoloadedClassNamed:clsName
- category:cat
- package:package
- revision:revisionOrNil
- numClassInstVars:nil.
+ installAutoloadedClassNamed:clsName
+ category:cat
+ package:package
+ revision:revisionOrNil
+ numClassInstVars:nil.
!
installAutoloadedClassNamed:clsName category:cat package:package revision:revisionOrNil numClassInstVars:numClassInstVarsOrNil
@@ -4376,36 +4376,36 @@
"/ install if not already compiled-in
(cls := self at:clsSym) isNil ifTrue:[
- Autoload subclass:clsSym
- instanceVariableNames:''
- classVariableNames:''
- poolDictionaries:''
- category:cat
- inEnvironment:Smalltalk.
-
- cls := self at:clsSym.
- cls isNil ifTrue:[
- ('Smalltalk [warning]: failed to install ' , clsName , ' as autoloaded.') infoPrintCR.
- ] ifFalse:[
- cls package:package asSymbol.
- revisionOrNil notNil ifTrue:[
- cls setBinaryRevision:revisionOrNil
- ]
- ]
+ Autoload subclass:clsSym
+ instanceVariableNames:''
+ classVariableNames:''
+ poolDictionaries:''
+ category:cat
+ inEnvironment:Smalltalk.
+
+ cls := self at:clsSym.
+ cls isNil ifTrue:[
+ ('Smalltalk [warning]: failed to install ' , clsName , ' as autoloaded.') infoPrintCR.
+ ] ifFalse:[
+ cls package:package asSymbol.
+ revisionOrNil notNil ifTrue:[
+ cls setBinaryRevision:revisionOrNil
+ ]
+ ]
] ifFalse:[
- "/ class already present - however, if unloaded, check for category/package change
- cls isLoaded ifFalse:[
- package ~= cls package ifTrue:[
- cls withoutUpdatingChangesDo:[
- cls package:package asSymbol.
- ].
- ].
- cat ~= cls category ifTrue:[
- cls withoutUpdatingChangesDo:[
- cls category:cat.
- ].
- ].
- ].
+ "/ class already present - however, if unloaded, check for category/package change
+ cls isLoaded ifFalse:[
+ package ~= cls package ifTrue:[
+ cls withoutUpdatingChangesDo:[
+ cls package:package asSymbol.
+ ].
+ ].
+ cat ~= cls category ifTrue:[
+ cls withoutUpdatingChangesDo:[
+ cls category:cat.
+ ].
+ ].
+ ].
].
^ cls.
@@ -4424,15 +4424,15 @@
"/ along the package-path
self packagePath do:[:eachPathComponent |
- (dirsConsulted includes:eachPathComponent) ifFalse:[
- self
- recursiveInstallAutoloadedClassesFrom:eachPathComponent
- rememberIn:dirsConsulted
- maxLevels:15
- noAutoload:false
- packageTop:eachPathComponent
- showSplashInLevels:2.
- ]
+ (dirsConsulted includes:eachPathComponent) ifFalse:[
+ self
+ recursiveInstallAutoloadedClassesFrom:eachPathComponent
+ rememberIn:dirsConsulted
+ maxLevels:15
+ noAutoload:false
+ packageTop:eachPathComponent
+ showSplashInLevels:2.
+ ]
].
self splashInfo:nil.
@@ -4454,15 +4454,15 @@
f isNil ifTrue:[f := self getPackageFileName:anAbbrevFilePath].
f notNil ifTrue:[
- f := f asFilename.
- f isDirectory ifTrue:[
- f := f construct:'abbrev.stc'
- ].
- [
- s := f readStream.
- self installAutoloadedClassesFromStream:s.
- s close.
- ] on:FileStream openErrorSignal do:[:ex| "do nothing"].
+ f := f asFilename.
+ f isDirectory ifTrue:[
+ f := f construct:'abbrev.stc'
+ ].
+ [
+ s := f readStream.
+ self installAutoloadedClassesFromStream:s.
+ s close.
+ ] on:FileStream openErrorSignal do:[:ex| "do nothing"].
]
"
@@ -4481,76 +4481,76 @@
|s2 l abbrevFileName info clsName cls abbrev package cat numClassInstVars words w|
anAbbrevFileStream isFileStream ifTrue:[
- abbrevFileName := anAbbrevFileStream pathName.
- info := 'declared from: ', abbrevFileName.
+ abbrevFileName := anAbbrevFileStream pathName.
+ info := 'declared from: ', abbrevFileName.
].
KnownPackages isNil ifTrue:[
- KnownPackages := Set new.
+ KnownPackages := Set new.
].
"/ yes, create any required nameSpace, without asking user.
Class createNameSpaceQuerySignal answer:true do:[
- [anAbbrevFileStream atEnd] whileFalse:[
- l := anAbbrevFileStream nextLine withoutSeparators.
- l notEmpty ifTrue:[
- "/ must do it manually, caring for quoted strings.
+ [anAbbrevFileStream atEnd] whileFalse:[
+ l := anAbbrevFileStream nextLine withoutSeparators.
+ l notEmpty ifTrue:[
+ "/ must do it manually, caring for quoted strings.
"/ words := line asCollectionOfWords.
- words := OrderedCollection new.
- s2 := l readStream.
- [s2 atEnd] whileFalse:[
- s2 skipSeparators.
- s2 peek == $' ifTrue:[
- s2 next.
- w := s2 upTo:$'.
- s2 skipSeparators.
- ] ifFalse:[
- w := s2 upToSeparator
- ].
- words add:w
- ].
- words size < 3 ifTrue:[
- 'Smalltalk [warning]: bad abbrev entry' errorPrint.
- anAbbrevFileStream isFileStream ifTrue:[
- ' (in ''' errorPrint.
- anAbbrevFileStream pathName errorPrint.
- ''')' errorPrint
- ].
- ': ' errorPrint. l errorPrintCR
- ] ifFalse:[
- clsName := (words at:1) asSymbol.
- abbrev := (words at:2).
- package := (words at:3) asSymbol.
- cat := words at:4 ifAbsent:nil.
- numClassInstVars := words at:5 ifAbsent:'0'.
- numClassInstVars := Integer readFrom:numClassInstVars onError:[0].
+ words := OrderedCollection new.
+ s2 := l readStream.
+ [s2 atEnd] whileFalse:[
+ s2 skipSeparators.
+ s2 peek == $' ifTrue:[
+ s2 next.
+ w := s2 upTo:$'.
+ s2 skipSeparators.
+ ] ifFalse:[
+ w := s2 upToSeparator
+ ].
+ words add:w
+ ].
+ words size < 3 ifTrue:[
+ 'Smalltalk [warning]: bad abbrev entry' errorPrint.
+ anAbbrevFileStream isFileStream ifTrue:[
+ ' (in ''' errorPrint.
+ anAbbrevFileStream pathName errorPrint.
+ ''')' errorPrint
+ ].
+ ': ' errorPrint. l errorPrintCR
+ ] ifFalse:[
+ clsName := (words at:1) asSymbol.
+ abbrev := (words at:2).
+ package := (words at:3) asSymbol.
+ cat := words at:4 ifAbsent:nil.
+ numClassInstVars := words at:5 ifAbsent:'0'.
+ numClassInstVars := Integer readFrom:numClassInstVars onError:[0].
"/ KnownPackages add:package.
- (cat size == 0) ifTrue:[
- cat := 'autoloaded'
- ].
-
- "/ on the fly, update the abbreviations
- self setFilename:abbrev forClass:clsName package:package.
-
- "/ ' autoloaded: ' print. clsName print. ' in ' print. cat printCR.
-
- cls := self
- installAutoloadedClassNamed:clsName
- category:cat
- package:package
- revision:nil
- numClassInstVars:numClassInstVars.
+ (cat size == 0) ifTrue:[
+ cat := 'autoloaded'
+ ].
+
+ "/ on the fly, update the abbreviations
+ self setFilename:abbrev forClass:clsName package:package.
+
+ "/ ' autoloaded: ' print. clsName print. ' in ' print. cat printCR.
+
+ cls := self
+ installAutoloadedClassNamed:clsName
+ category:cat
+ package:package
+ revision:nil
+ numClassInstVars:numClassInstVars.
"/ info notNil ifTrue:[
"/ cls setComment:info.
"/ ].
- ]
- ]
- ]
+ ]
+ ]
+ ]
]
!
@@ -4567,11 +4567,11 @@
"turn on/off loading of binary objects"
aBoolean ifTrue:[
- (ObjectFileLoader notNil and:[ObjectFileLoader canLoadObjectFiles]) ifTrue:[
- LoadBinaries := true.
- ^ self
- ].
- 'Smalltalk [info]: this system does not support binary loading' infoPrintCR.
+ (ObjectFileLoader notNil and:[ObjectFileLoader canLoadObjectFiles]) ifTrue:[
+ LoadBinaries := true.
+ ^ self
+ ].
+ 'Smalltalk [info]: this system does not support binary loading' infoPrintCR.
].
LoadBinaries := false
@@ -4612,14 +4612,14 @@
Experimental and not yet used."
Method allSubInstancesDo:[:aMethod |
- |newMethod|
-
- aMethod hasPrimitiveCode ifFalse:[
- newMethod := aMethod asByteCodeMethod.
- newMethod ~~ aMethod ifTrue:[
- aMethod becomeSameAs:newMethod
- ]
- ].
+ |newMethod|
+
+ aMethod hasPrimitiveCode ifFalse:[
+ newMethod := aMethod asByteCodeMethod.
+ newMethod ~~ aMethod ifTrue:[
+ aMethod becomeSameAs:newMethod
+ ]
+ ].
].
"
@@ -4638,9 +4638,9 @@
If a file called NOPACKAGES is found, no further searching is done in that directory or below."
self
- recursiveInstallAutoloadedClassesFrom:aDirectory rememberIn:dirsConsulted
- maxLevels:maxLevels noAutoload:noAutoloadIn packageTop:packageTopPath
- showSplashInLevels:0.
+ recursiveInstallAutoloadedClassesFrom:aDirectory rememberIn:dirsConsulted
+ maxLevels:maxLevels noAutoload:noAutoloadIn packageTop:packageTopPath
+ showSplashInLevels:0.
"
Smalltalk installAutoloadedClasses
@@ -4662,48 +4662,48 @@
maxLevels == 0 ifTrue:[
"/ 'Smalltalk [warning]: max directory nesting reached.' infoPrintCR.
- ^ self
+ ^ self
].
dir := aDirectory asFilename.
dirName := dir pathName.
(dirsConsulted includes:dirName) ifTrue:[
- ^ self
+ ^ self
].
dirsConsulted add:dirName.
(dir construct:'NOPACKAGES') exists ifTrue:[
- ^ self.
+ ^ self.
].
(dir construct:'NOSUBAUTOLOAD') exists ifTrue:[
- ^ self.
+ ^ self.
].
noAutoloadHere := noAutoloadIn.
noAutoloadHere ifFalse:[
- (dir construct:'NOAUTOLOAD') exists ifTrue:[
- noAutoloadHere := true.
- ].
+ (dir construct:'NOAUTOLOAD') exists ifTrue:[
+ noAutoloadHere := true.
+ ].
] ifTrue:[
- (dir construct:'AUTOLOAD') exists ifTrue:[
- noAutoloadHere := false.
- ].
+ (dir construct:'AUTOLOAD') exists ifTrue:[
+ noAutoloadHere := false.
+ ].
].
((dir construct:'loadAll') exists
or:[(dir construct:'abbrev.stc') exists
or:[(dir construct:(dir baseName , '.prj')) exists]]) ifTrue:[
- KnownPackages isNil ifTrue:[
- KnownPackages := Set new.
- ].
- pkgName := dirName copyFrom:(packageTopPath asFilename pathName) size + 1 + 1.
- KnownPackages add:pkgName
+ KnownPackages isNil ifTrue:[
+ KnownPackages := Set new.
+ ].
+ pkgName := dirName copyFrom:(packageTopPath asFilename pathName) size + 1 + 1.
+ KnownPackages add:pkgName
].
showSplashInLevels >= 0 ifTrue:[
- self showSplashMessage:('Smalltalk [info]: installing autoloaded classes found under "%1"...'
- bindWith:(dirName contractAtBeginningTo:35)).
+ self showSplashMessage:('Smalltalk [info]: installing autoloaded classes found under "%1"...'
+ bindWith:(dirName contractAtBeginningTo:35)).
].
"/
@@ -4711,60 +4711,60 @@
"/ below; however, still traverse the directories to find packages ...
"/
noAutoloadHere ifFalse:[
- [
- abbrevStream := (dir construct:'abbrev.stc') asFilename readStream.
- self installAutoloadedClassesFromStream:abbrevStream.
- abbrevStream close.
- ] on:FileStream openErrorSignal do:[:ex| "ignore this file"].
+ [
+ abbrevStream := (dir construct:'abbrev.stc') asFilename readStream.
+ self installAutoloadedClassesFromStream:abbrevStream.
+ abbrevStream close.
+ ] on:FileStream openErrorSignal do:[:ex| "ignore this file"].
].
[
- directoryContents := dir directoryContents.
+ directoryContents := dir directoryContents.
] on:FileStream openErrorSignal do:[:ex|
- "non-accessable directory: we are done"
- ^ self
+ "non-accessable directory: we are done"
+ ^ self
].
directoryContents do:[:aFilename |
- |f|
-
- (#(
- 'objbc'
- 'doc'
- 'CVS'
- 'bitmaps'
- 'resources'
- 'source'
- 'not_delivered'
- 'not_ported'
- ) includes:aFilename) ifFalse:[
- ((dir baseName ~= 'stx')
- or:[
- (#(
- 'configurations'
- 'include'
- 'rules'
- 'stc'
- 'support'
- ) includes:aFilename) not])
- ifTrue:[
- f := dir construct:aFilename.
- f isDirectory ifTrue:[
- self
- recursiveInstallAutoloadedClassesFrom:f
- rememberIn:dirsConsulted
- maxLevels:maxLevels-1
- noAutoload:noAutoloadHere
- packageTop:packageTopPath
- showSplashInLevels:showSplashInLevels - 1.
- ]
- ]
- ].
+ |f|
+
+ (#(
+ 'objbc'
+ 'doc'
+ 'CVS'
+ 'bitmaps'
+ 'resources'
+ 'source'
+ 'not_delivered'
+ 'not_ported'
+ ) includes:aFilename) ifFalse:[
+ ((dir baseName ~= 'stx')
+ or:[
+ (#(
+ 'configurations'
+ 'include'
+ 'rules'
+ 'stc'
+ 'support'
+ ) includes:aFilename) not])
+ ifTrue:[
+ f := dir construct:aFilename.
+ f isDirectory ifTrue:[
+ self
+ recursiveInstallAutoloadedClassesFrom:f
+ rememberIn:dirsConsulted
+ maxLevels:maxLevels-1
+ noAutoload:noAutoloadHere
+ packageTop:packageTopPath
+ showSplashInLevels:showSplashInLevels - 1.
+ ]
+ ]
+ ].
].
showSplashInLevels >= 0 ifTrue:[
- self showSplashMessage:('Smalltalk [info]: installing autoloaded classes from "%1"...'
- bindWith:(dirName contractAtBeginningTo:35)).
+ self showSplashMessage:('Smalltalk [info]: installing autoloaded classes from "%1"...'
+ bindWith:(dirName contractAtBeginningTo:35)).
].
"
@@ -4833,10 +4833,10 @@
"read in the named file - look for it in some standard places;
return true if ok, false if failed.
This method can load almost anything which makes sense:
- .st - source files
- .cls - binary smalltalk bytecode files
- .so - binary compiled machine code class libraries
- [.class - java bytecode -- soon to come]"
+ .st - source files
+ .cls - binary smalltalk bytecode files
+ .so - binary compiled machine code class libraries
+ [.class - java bytecode -- soon to come]"
^ self fileIn:aFileName lazy:nil silent:nil logged:false
@@ -4907,10 +4907,10 @@
If silent is true, no compiler messages are output to the transcript.
Giving nil for silent/lazy will use the current settings.
This method can load almost anything which makes sense:
- .st - source files
- .cls - binary smalltalk bytecode files
- .so - binary compiled machine code class libraries
- [.class - java bytecode -- soon to come]"
+ .st - source files
+ .cls - binary smalltalk bytecode files
+ .so - binary compiled machine code class libraries
+ [.class - java bytecode -- soon to come]"
|fileNameString aStream path morePath bos|
@@ -4921,42 +4921,42 @@
"
(ObjectFileLoader notNil
and:[ObjectFileLoader hasValidBinaryExtension:fileNameString]) ifTrue:[
- "/ LoadBinaries ifFalse:[^ false].
- path := self getBinaryFileName:fileNameString.
- path isNil ifTrue:[
- path := self getSystemFileName:fileNameString.
- ].
- path isNil ifTrue:[^ false].
- ^ (ObjectFileLoader loadObjectFile:path) notNil
+ "/ LoadBinaries ifFalse:[^ false].
+ path := self getBinaryFileName:fileNameString.
+ path isNil ifTrue:[
+ path := self getSystemFileName:fileNameString.
+ ].
+ path isNil ifTrue:[^ false].
+ ^ (ObjectFileLoader loadObjectFile:path) notNil
].
(fileNameString asFilename hasSuffix:'cls') ifTrue:[
- BinaryObjectStorage notNil ifTrue:[
- aStream := self systemFileStreamFor:fileNameString.
+ BinaryObjectStorage notNil ifTrue:[
+ aStream := self systemFileStreamFor:fileNameString.
"/ path := self getBinaryFileName:fileNameString.
"/ path isNil ifTrue:[^ false].
"/ aStream := path asFilename readStream.
- aStream notNil ifTrue:[
- aStream binary.
- bos := BinaryObjectStorage onOld:aStream.
- bos next.
- bos close.
- ^ true
- ].
- ^ false
- ]
+ aStream notNil ifTrue:[
+ aStream binary.
+ bos := BinaryObjectStorage onOld:aStream.
+ bos next.
+ bos close.
+ ^ true
+ ].
+ ^ false
+ ]
].
aStream := self systemFileStreamFor:fileNameString.
aStream isNil ifTrue:[^ false].
(fileNameString includes:$/) ifTrue:[
- "/ temporarily prepend the files directory
- "/ to the searchPath.
- "/ This allows fileIn-driver files to refer to local
- "/ files via a relative path, and drivers to fileIn other
- "/ drivers ...
- morePath := aStream pathName asFilename directoryName.
+ "/ temporarily prepend the files directory
+ "/ to the searchPath.
+ "/ This allows fileIn-driver files to refer to local
+ "/ files via a relative path, and drivers to fileIn other
+ "/ drivers ...
+ morePath := aStream pathName asFilename directoryName.
].
^ self fileInStream:aStream lazy:lazy silent:silent logged:logged addPath:morePath
@@ -4997,8 +4997,8 @@
"read in the last changes file - bringing the system to the state it
had when left the last time.
WARNING: this method is rubbish: it should only read things after the
- last '**snapshot**' - entry
- (instead of the complete changes file)."
+ last '**snapshot**' - entry
+ (instead of the complete changes file)."
"
do NOT update the changes file now ...
@@ -5017,11 +5017,11 @@
The file is first searched for using the class name, then the abbreviated name."
^ self
- fileInClass:aClassName
- package:nil
- initialize:true
- lazy:false
- silent:nil
+ fileInClass:aClassName
+ package:nil
+ initialize:true
+ lazy:false
+ silent:nil
"Modified: / 9.1.1998 / 14:41:46 / cg"
!
@@ -5042,9 +5042,9 @@
(path := self getBinaryFileName:aFileName) isNil ifTrue:[^ false].
ok := (ObjectFileLoader loadClass:aClassName fromObjectFile:path) notNil.
ok ifTrue:[
- SilentLoading ifFalse:[
- Transcript show:' loaded ' , aClassName , ' from ' ; showCR:aFileName.
- ]
+ SilentLoading ifFalse:[
+ Transcript show:' loaded ' , aClassName , ' from ' ; showCR:aFileName.
+ ]
].
^ ok
@@ -5063,11 +5063,11 @@
The file is first searched for using the class name, then the abbreviated name."
^ self
- fileInClass:aClassName
- package:nil
- initialize:doInit
- lazy:false
- silent:nil
+ fileInClass:aClassName
+ package:nil
+ initialize:doInit
+ lazy:false
+ silent:nil
"Modified: / 9.1.1998 / 14:42:02 / cg"
!
@@ -5079,11 +5079,11 @@
The file is first searched for using the class name, then the abbreviated name."
^ self
- fileInClass:aClassName
- package:nil
- initialize:doInit
- lazy:loadLazy
- silent:nil
+ fileInClass:aClassName
+ package:nil
+ initialize:doInit
+ lazy:loadLazy
+ silent:nil
"Modified: / 9.1.1998 / 14:42:19 / cg"
!
@@ -5099,11 +5099,11 @@
nil uses the value from SilentLoading."
^ self
- fileInClass:aClassName
- package:nil
- initialize:doInit
- lazy:loadLazy
- silent:beSilent
+ fileInClass:aClassName
+ package:nil
+ initialize:doInit
+ lazy:loadLazy
+ silent:beSilent
"Modified: / 9.1.1998 / 14:42:28 / cg"
!
@@ -5115,11 +5115,11 @@
The file is first searched for using the class name, then the abbreviated name."
^ self
- fileInClass:aClassName
- package:package
- initialize:true
- lazy:false
- silent:nil
+ fileInClass:aClassName
+ package:package
+ initialize:true
+ lazy:false
+ silent:nil
"Created: / 08-01-2007 / 10:06:09 / cg"
!
@@ -5140,305 +5140,305 @@
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 fileIn:(classFileName,'.st') lazy:loadLazy silent:beSilent.
- ]
+ classFileName asFilename suffix notEmptyOrNil ifTrue:[
+ ok := self fileIn:classFileName lazy:loadLazy silent:beSilent.
+ ] ifFalse:[
+ ok := self fileIn:(classFileName,'.st') lazy:loadLazy silent:beSilent.
+ ]
] ifFalse:[
- classFileName := classFileName copyReplaceAll:$: with:$_.
- [
- Class withoutUpdatingChangesDo:[
- |zarFn zar entry|
-
- ok := false.
-
- package notNil ifTrue:[
- packageDir := package asString.
- packageDir := packageDir copyReplaceAll:$: with:$/.
- ].
-
- 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 , '.cls').
- packageFile isNil ifTrue:[
- packageFile := (packageDir , '/classes/' , classFileName , '.cls').
- ].
- (ok := self fileIn:packageFile lazy:loadLazy silent:beSilent)
- ifFalse:[
- alternativeClassFileName notNil ifTrue:[
- packageFile := self getPackageFileName:(packageDir , '/classes/' , alternativeClassFileName , '.cls').
- packageFile isNil ifTrue:[
- packageFile := (packageDir , '/classes/' , alternativeClassFileName , '.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 , '.st'.
- (ok := self fileIn:filenameToSet lazy:loadLazy silent:beSilent)
- ifFalse:[
- alternativeClassFileName notNil ifTrue:[
- filenameToSet := alternativeClassFileName , '.st'.
- ok := self fileIn:filenameToSet lazy:loadLazy silent:beSilent
- ].
- ok ifFalse:[
- "
- ... and in the standard source-directory
- "
- filenameToSet := 'source/' , classFileName , '.st'.
- (ok := self fileIn:filenameToSet lazy:loadLazy silent:beSilent)
- ifFalse:[
- alternativeClassFileName notNil ifTrue:[
- filenameToSet := 'source/' , alternativeClassFileName , '.st'.
- ok := self fileIn: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 getPackageFileName:(packageDir , '/source/' , classFileName , '.st').
- packageFile isNil ifTrue:[
- packageFile := (packageDir , '/source/' , classFileName , '.st').
- ].
- filenameToSet := packageFile.
- (ok := self fileIn:packageFile lazy:loadLazy silent:beSilent)
- ifFalse:[
- alternativeClassFileName notNil ifTrue:[
- packageFile := self getPackageFileName:(packageDir , '/source/' , alternativeClassFileName , '.st').
- packageFile isNil ifTrue:[
- packageFile := (packageDir , '/source/' , alternativeClassFileName , '.st').
- ].
- filenameToSet := packageFile.
- ok := self fileIn:packageFile lazy:loadLazy silent:beSilent
- ].
- ok ifFalse:[
- packageFile := self getPackageFileName:(packageDir , '/' , classFileName , '.st').
- packageFile isNil ifTrue:[
- packageFile := (packageDir , '/' , classFileName , '.st').
- ].
- filenameToSet := packageFile.
- (ok := self fileIn:packageFile lazy:loadLazy silent:beSilent)
- ifFalse:[
- alternativeClassFileName notNil ifTrue:[
- packageFile := self getPackageFileName:(packageDir , '/' , alternativeClassFileName , '.st').
- packageFile isNil ifTrue:[
- packageFile := (packageDir , '/' , alternativeClassFileName , '.st').
- ].
- filenameToSet := packageFile.
- ok := self fileIn:packageFile lazy:loadLazy silent:beSilent
- ].
- ok ifFalse:[
- "
- ... and in the standard source-directory
- "
- filenameToSet := 'source/' , packageDir , '/' , classFileName , '.st'.
- (ok := self fileIn:filenameToSet lazy:loadLazy silent:beSilent)
- ifFalse:[
- alternativeClassFileName notNil ifTrue:[
- filenameToSet := 'source/' , packageDir , '/' , alternativeClassFileName , '.st'.
- ok := self fileIn: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 asFilename withSuffix:'zip'.
- zarFn := self getSourceFileName:zarFn.
- ].
- zarFn notNil 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.
- 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:$_.
+ [
+ Class withoutUpdatingChangesDo:[
+ |zarFn zar entry|
+
+ ok := false.
+
+ package notNil ifTrue:[
+ packageDir := package asString.
+ packageDir := packageDir copyReplaceAll:$: with:$/.
+ ].
+
+ 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 , '.cls').
+ packageFile isNil ifTrue:[
+ packageFile := (packageDir , '/classes/' , classFileName , '.cls').
+ ].
+ (ok := self fileIn:packageFile lazy:loadLazy silent:beSilent)
+ ifFalse:[
+ alternativeClassFileName notNil ifTrue:[
+ packageFile := self getPackageFileName:(packageDir , '/classes/' , alternativeClassFileName , '.cls').
+ packageFile isNil ifTrue:[
+ packageFile := (packageDir , '/classes/' , alternativeClassFileName , '.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 , '.st'.
+ (ok := self fileIn:filenameToSet lazy:loadLazy silent:beSilent)
+ ifFalse:[
+ alternativeClassFileName notNil ifTrue:[
+ filenameToSet := alternativeClassFileName , '.st'.
+ ok := self fileIn:filenameToSet lazy:loadLazy silent:beSilent
+ ].
+ ok ifFalse:[
+ "
+ ... and in the standard source-directory
+ "
+ filenameToSet := 'source/' , classFileName , '.st'.
+ (ok := self fileIn:filenameToSet lazy:loadLazy silent:beSilent)
+ ifFalse:[
+ alternativeClassFileName notNil ifTrue:[
+ filenameToSet := 'source/' , alternativeClassFileName , '.st'.
+ ok := self fileIn: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 getPackageFileName:(packageDir , '/source/' , classFileName , '.st').
+ packageFile isNil ifTrue:[
+ packageFile := (packageDir , '/source/' , classFileName , '.st').
+ ].
+ filenameToSet := packageFile.
+ (ok := self fileIn:packageFile lazy:loadLazy silent:beSilent)
+ ifFalse:[
+ alternativeClassFileName notNil ifTrue:[
+ packageFile := self getPackageFileName:(packageDir , '/source/' , alternativeClassFileName , '.st').
+ packageFile isNil ifTrue:[
+ packageFile := (packageDir , '/source/' , alternativeClassFileName , '.st').
+ ].
+ filenameToSet := packageFile.
+ ok := self fileIn:packageFile lazy:loadLazy silent:beSilent
+ ].
+ ok ifFalse:[
+ packageFile := self getPackageFileName:(packageDir , '/' , classFileName , '.st').
+ packageFile isNil ifTrue:[
+ packageFile := (packageDir , '/' , classFileName , '.st').
+ ].
+ filenameToSet := packageFile.
+ (ok := self fileIn:packageFile lazy:loadLazy silent:beSilent)
+ ifFalse:[
+ alternativeClassFileName notNil ifTrue:[
+ packageFile := self getPackageFileName:(packageDir , '/' , alternativeClassFileName , '.st').
+ packageFile isNil ifTrue:[
+ packageFile := (packageDir , '/' , alternativeClassFileName , '.st').
+ ].
+ filenameToSet := packageFile.
+ ok := self fileIn:packageFile lazy:loadLazy silent:beSilent
+ ].
+ ok ifFalse:[
+ "
+ ... and in the standard source-directory
+ "
+ filenameToSet := 'source/' , packageDir , '/' , classFileName , '.st'.
+ (ok := self fileIn:filenameToSet lazy:loadLazy silent:beSilent)
+ ifFalse:[
+ alternativeClassFileName notNil ifTrue:[
+ filenameToSet := 'source/' , packageDir , '/' , alternativeClassFileName , '.st'.
+ ok := self fileIn: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 asFilename withSuffix:'zip'.
+ zarFn := self getSourceFileName:zarFn.
+ ].
+ zarFn notNil 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.
+ 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
@@ -5452,8 +5452,8 @@
and load it. This install all of its contained classes.
Return true if ok, false if not.
Notice: the argument may not have an extension (by purpose);
- the sharedLib extension (.dll / .so / .sl) is added here, to
- make the caller independent of the underlying operatingSystem."
+ the sharedLib extension (.dll / .so / .sl) is added here, to
+ make the caller independent of the underlying operatingSystem."
|path fn|
@@ -5464,7 +5464,7 @@
path := self getBinaryFileName:fn.
path isNil ifTrue:[
- path := self getSystemFileName:fn.
+ path := self getSystemFileName:fn.
].
path isNil ifTrue:[^ false].
@@ -5483,8 +5483,8 @@
and load it. This installs all of its contained classes.
Return true if ok, false if not.
Notice: the argument may not have an extension (by purpose);
- the sharedLib extension (.dll / .so / .sl) is added here, to
- make the caller independent of the underlying operatingSystem."
+ the sharedLib extension (.dll / .so / .sl) is added here, to
+ make the caller independent of the underlying operatingSystem."
|baseName handle libraryFilename packagePath|
@@ -5492,9 +5492,9 @@
baseName := aClassLibraryName asFilename withSuffix:(ObjectFileLoader sharedLibrarySuffix).
baseName exists ifTrue:[
- "/ load local file first...
- handle := (ObjectFileLoader loadObjectFile:baseName).
- handle notNil ifTrue:[^ true].
+ "/ load local file first...
+ handle := (ObjectFileLoader loadObjectFile:baseName).
+ handle notNil ifTrue:[^ true].
].
packagePath := self getPackageDirectoryForPackage:packageID.
@@ -5502,8 +5502,8 @@
packagePath := packagePath asFilename.
libraryFilename := packagePath / baseName.
libraryFilename exists ifFalse:[
- "in windows (with Borland compiler, DLLs in development environment are under objbc"
- libraryFilename := packagePath / 'objbc' / baseName.
+ "in windows (with Borland compiler, DLLs in development environment are under objbc"
+ libraryFilename := packagePath / 'objbc' / baseName.
].
libraryFilename exists ifFalse:[^ false].
@@ -5541,37 +5541,37 @@
inStream := streamArg.
inStream isNil ifTrue:[^ false].
inStream := ChangeSet isNil
- ifTrue:[ inStream ]
- ifFalse:[ ChangeSet decodedStreamFor:inStream ].
+ ifTrue:[ inStream ]
+ ifFalse:[ ChangeSet decodedStreamFor:inStream ].
lazy notNil ifTrue:[wasLazy := Compiler compileLazy:lazy].
silent notNil ifTrue:[wasSilent := self silentLoading:silent].
morePath notNil ifTrue:[
- oldSystemPath := SystemPath copy.
- SystemPath addFirst:morePath.
- oldRealPath := RealSystemPath.
- RealSystemPath := nil.
+ oldSystemPath := SystemPath copy.
+ SystemPath addFirst:morePath.
+ oldRealPath := RealSystemPath.
+ RealSystemPath := nil.
].
[
- (Class updateChangeFileQuerySignal , Class updateChangeListQuerySignal) answer:logged do:[
- inStream fileIn.
- ]
+ (Class updateChangeFileQuerySignal , Class updateChangeListQuerySignal) answer:logged do:[
+ inStream fileIn.
+ ]
] ensure:[
- morePath notNil ifTrue:[
- "take care, someone could have changed SystemPath during fileIn!!"
- (SystemPath copyFrom:2) = oldSystemPath ifTrue:[
- SystemPath := oldSystemPath.
- RealSystemPath := oldRealPath.
- ] ifFalse:[
- (oldSystemPath includes:morePath) ifFalse:[
- SystemPath remove:morePath ifAbsent:[].
- ].
- RealSystemPath := nil.
- ].
- ].
- lazy notNil ifTrue:[Compiler compileLazy:wasLazy].
- silent notNil ifTrue:[self silentLoading:wasSilent].
- inStream close
+ morePath notNil ifTrue:[
+ "take care, someone could have changed SystemPath during fileIn!!"
+ (SystemPath copyFrom:2) = oldSystemPath ifTrue:[
+ SystemPath := oldSystemPath.
+ RealSystemPath := oldRealPath.
+ ] ifFalse:[
+ (oldSystemPath includes:morePath) ifFalse:[
+ SystemPath remove:morePath ifAbsent:[].
+ ].
+ RealSystemPath := nil.
+ ].
+ ].
+ lazy notNil ifTrue:[Compiler compileLazy:wasLazy].
+ silent notNil ifTrue:[self silentLoading:wasSilent].
+ inStream close
].
^ true
@@ -5586,14 +5586,14 @@
"return true, if a particular class library is already loaded"
ObjectMemory
- binaryModuleInfo
- do:[:entry |
- entry type == #classLibrary ifTrue:[
- entry libraryName = name ifTrue:[
- ^ true "/ already loaded
- ]
- ].
- ].
+ binaryModuleInfo
+ do:[:entry |
+ entry type == #classLibrary ifTrue:[
+ entry libraryName = name ifTrue:[
+ ^ true "/ already loaded
+ ]
+ ].
+ ].
^ false
@@ -5634,8 +5634,8 @@
retVal := false.
(SignalSet with:AbortOperationRequest with:TerminateProcessRequest)
- handle:[:ex | ex return ]
- do:[ retVal := self fileIn:aFileName ].
+ handle:[:ex | ex return ]
+ do:[ retVal := self fileIn:aFileName ].
^ retVal
!
@@ -5647,9 +5647,9 @@
wasSilent := self silentLoading:true.
[
- self fileIn:aFilename
+ self fileIn:aFilename
] ensure:[
- self silentLoading:wasSilent
+ self silentLoading:wasSilent
]
! !
@@ -5665,7 +5665,7 @@
aString := self getBitmapFileName:aFileName.
aString notNil ifTrue:[
- ^ aString asFilename readStreamOrNil
+ ^ aString asFilename readStreamOrNil
].
^ nil
!
@@ -5707,9 +5707,9 @@
|fn|
(aFileName asFilename hasSuffix:'st') ifTrue:[
- fn := aFileName copyWithoutLast:3
+ fn := aFileName copyWithoutLast:3
] ifFalse:[
- fn := aFileName
+ fn := aFileName
].
^ self filenameAbbreviations keyAtEqualValue:fn ifAbsent:[fn].
@@ -5728,11 +5728,11 @@
return a collection of pathes which include that directory."
^ self realSystemPath select:[:dirName |
- |fullPath|
-
- fullPath := dirName asFilename construct:aDirectoryName.
- "/ fullPath exists and:[fullPath isDirectory and:[fullPath isReadable]]
- fullPath isDirectory and:[fullPath isReadable]
+ |fullPath|
+
+ fullPath := dirName asFilename construct:aDirectoryName.
+ "/ fullPath exists and:[fullPath isDirectory and:[fullPath isReadable]]
+ fullPath isDirectory and:[fullPath isReadable]
].
!
@@ -5746,7 +5746,7 @@
aString := self getFileInFileName:aFileName.
aString notNil ifTrue:[
- ^ aString asFilename readStreamOrNil
+ ^ aString asFilename readStreamOrNil
].
^ nil
!
@@ -5830,7 +5830,7 @@
to 14 chars)"
CachedAbbreviations isNil ifTrue:[
- self readAbbreviations
+ self readAbbreviations
].
^ CachedAbbreviations
@@ -5867,7 +5867,7 @@
return the absolute filename or nil if none is found."
BinaryPath isNil ifTrue:[
- BinaryPath := self constructPathFor:BinaryDirName
+ BinaryPath := self constructPathFor:BinaryDirName
].
^ self searchPath:BinaryPath for:aFileName in:BinaryDirName
@@ -5897,56 +5897,56 @@
then in the package directory if existing.
Return a path or nil.
Search order is:
- bitmaps/<pkg>/file
- resources/<pkg>/bitmaps/file
- <pkg>/bitmaps/file
+ bitmaps/<pkg>/file
+ resources/<pkg>/bitmaps/file
+ <pkg>/bitmaps/file
"
|f dir packageDir pF|
((f := aFileName asString) startsWith:'bitmaps/') ifTrue:[
- f := f copyFrom:('bitmaps/' size + 1).
+ f := f copyFrom:('bitmaps/' size + 1).
].
aPackageIDOrNil isNil ifTrue:[
- "/ this will be an error in the future
+ "/ this will be an error in the future
"/ 'Smalltalk [warning]: bitmap file access without package: ' infoPrint. aFileName infoPrintCR.
"/ self halt.
- pF := self searchPath:(self realSystemPath) for:aFileName in:('bitmaps').
- pF notNil ifTrue:[
- ^ pF.
- ].
- f ~= aFileName ifTrue:[
- pF := self searchPath:(self realSystemPath) for:f in:('bitmaps').
- pF notNil ifTrue:[
- ^ pF.
- ].
- ].
- ^ nil
+ pF := self searchPath:(self realSystemPath) for:aFileName in:('bitmaps').
+ pF notNil ifTrue:[
+ ^ pF.
+ ].
+ f ~= aFileName ifTrue:[
+ pF := self searchPath:(self realSystemPath) for:f in:('bitmaps').
+ pF notNil ifTrue:[
+ ^ pF.
+ ].
+ ].
+ ^ nil
].
dir := self projectDirectoryForPackage:aPackageIDOrNil.
dir notNil ifTrue:[
- pF := dir asFilename construct:f.
- pF exists ifTrue:[
- ^ pF.
- ].
- pF := (dir asFilename construct:'bitmaps') construct:f.
- pF exists ifTrue:[
- ^ pF.
- ].
+ pF := dir asFilename construct:f.
+ pF exists ifTrue:[
+ ^ pF.
+ ].
+ pF := (dir asFilename construct:'bitmaps') construct:f.
+ pF exists ifTrue:[
+ ^ pF.
+ ].
].
packageDir := aPackageIDOrNil copyReplaceAll:$: with:$/.
pF := self searchPath:(self realSystemPath) for:aFileName in:('bitmaps/',packageDir).
pF notNil ifTrue:[
- ^ pF.
+ ^ pF.
].
pF := self searchPath:(self realSystemPath) for:aFileName in:('resources/',packageDir,'/bitmaps').
pF notNil ifTrue:[
- ^ pF.
+ ^ pF.
].
^ nil
@@ -5968,7 +5968,7 @@
return the absolute filename or nil if none is found."
FileInPath isNil ifTrue:[
- FileInPath := self constructPathFor:FileInDirName
+ FileInPath := self constructPathFor:FileInDirName
].
^ self searchPath:FileInPath for:aFileName in:FileInDirName
@@ -5986,22 +5986,22 @@
packageSubDirectory := aPackageID asPackageId directory.
checkForPackageDirectory :=
- [:moduleDir |
- |packageDir|
-
- moduleDir isDirectory ifTrue:[
- packageDir := moduleDir construct:packageSubDirectory.
- packageDir isDirectory ifTrue:[
- ^ packageDir
- ]
- ].
- ].
+ [:moduleDir |
+ |packageDir|
+
+ moduleDir isDirectory ifTrue:[
+ packageDir := moduleDir construct:packageSubDirectory.
+ packageDir isDirectory ifTrue:[
+ ^ packageDir
+ ]
+ ].
+ ].
self packagePath do:[:aPath |
- |moduleDir|
-
- moduleDir := aPath asFilename construct:module.
- checkForPackageDirectory value:moduleDir.
+ |moduleDir|
+
+ moduleDir := aPath asFilename construct:module.
+ checkForPackageDirectory value:moduleDir.
].
^ nil
@@ -6025,20 +6025,20 @@
"/ search along packagePath ...
f := self searchPath:self packagePath for:aFileName in:nil.
f isNil ifTrue:[
- "/ search under packages-directory along systemPath ...
- f := self searchPath:self realSystemPath for:aFileName in:PackageDirName.
- "/ kludge - allow for stx-directory to be named differently
- f isNil ifTrue:[
- ((aFileName startsWith:'stx') and:[(aFileName startsWith:'stx' , Filename separator)]) ifTrue:[
- f := '../..' asFilename construct:(aFileName copyFrom:5).
- f exists ifTrue:[
- ^ f pathName
- ].
- ]
- ].
+ "/ search under packages-directory along systemPath ...
+ f := self searchPath:self realSystemPath for:aFileName in:PackageDirName.
+ "/ kludge - allow for stx-directory to be named differently
+ f isNil ifTrue:[
+ ((aFileName startsWith:'stx') and:[(aFileName startsWith:'stx' , Filename separator)]) ifTrue:[
+ f := '../..' asFilename construct:(aFileName copyFrom:5).
+ f exists ifTrue:[
+ ^ f pathName
+ ].
+ ]
+ ].
].
(f notNil and:[(f := f asFilename) exists]) ifTrue:[
- ^ f pathName
+ ^ f pathName
].
^ nil
@@ -6071,7 +6071,7 @@
|pkgOrNil|
aClassOrNil notNil ifTrue:[
- pkgOrNil := aClassOrNil package.
+ pkgOrNil := aClassOrNil package.
].
^ self getResourceFileName:aFileName forPackage:pkgOrNil.
@@ -6086,56 +6086,56 @@
and in a packages directory.
Return the absolute filename or nil if none is found.
Search order is:
- resources/<pkg>/file
- <pkg>/resources/file
+ resources/<pkg>/file
+ <pkg>/resources/file
"
|pF f dir packageDir|
((f := aFileName asString) startsWith:'resources/') ifTrue:[
- f := aFileName copyFrom:('resources/' size + 1).
+ f := aFileName copyFrom:('resources/' size + 1).
].
aPackageIDOrNil isNil ifTrue:[
- "/ this will be an error in the future
+ "/ this will be an error in the future
"/ 'Smalltalk [warning]: resource file access without package: ' infoPrint. aFileName infoPrintCR.
"/ self halt.
- pF := self searchPath:(self realSystemPath) for:aFileName in:('resources').
- pF notNil ifTrue:[
- ^ pF.
- ].
- f ~= aFileName ifTrue:[
- pF := self searchPath:(self realSystemPath) for:f in:('resources').
- pF notNil ifTrue:[
- ^ pF.
- ].
- ].
- ^ nil
+ pF := self searchPath:(self realSystemPath) for:aFileName in:('resources').
+ pF notNil ifTrue:[
+ ^ pF.
+ ].
+ f ~= aFileName ifTrue:[
+ pF := self searchPath:(self realSystemPath) for:f in:('resources').
+ pF notNil ifTrue:[
+ ^ pF.
+ ].
+ ].
+ ^ nil
].
packageDir := aPackageIDOrNil copyReplaceAll:$: with:$/.
pF := self searchPath:(self realSystemPath) for:aFileName in:('resources/',packageDir).
pF notNil ifTrue:[
- ^ pF.
+ ^ pF.
].
dir := self projectDirectoryForPackage:aPackageIDOrNil.
dir notNil ifTrue:[
- pF := (dir asFilename construct:'resources') constructString:f.
- pF asFilename exists ifTrue:[
- ^ pF.
- ].
- pF := (dir asFilename construct:'styles') constructString:f.
- pF asFilename exists ifTrue:[
- ^ pF.
- ].
- "resolve something like: 'ASN/definition.asn1'"
- pF := dir asFilename constructString:f.
- pF asFilename exists ifTrue:[
- ^ pF.
- ].
+ pF := (dir asFilename construct:'resources') constructString:f.
+ pF asFilename exists ifTrue:[
+ ^ pF.
+ ].
+ pF := (dir asFilename construct:'styles') constructString:f.
+ pF asFilename exists ifTrue:[
+ ^ pF.
+ ].
+ "resolve something like: 'ASN/definition.asn1'"
+ pF := dir asFilename constructString:f.
+ pF asFilename exists ifTrue:[
+ ^ pF.
+ ].
].
^ nil
@@ -6159,16 +6159,16 @@
|f|
SourcePath isNil ifTrue:[
- SourcePath := self constructPathFor:SourceDirName
+ SourcePath := self constructPathFor:SourceDirName
].
"/ first, try a source subdir along the path.
SourcePath notNil ifTrue:[
- f := self searchPath:SourcePath for:aFileName in:SourceDirName.
+ f := self searchPath:SourcePath for:aFileName in:SourceDirName.
].
f isNil ifTrue:[
- "/ then, try it itself along the path.
- f := self searchPath:self realSystemPath for:aFileName in:nil
+ "/ then, try it itself along the path.
+ f := self searchPath:self realSystemPath for:aFileName in:nil
].
^ f
@@ -6195,23 +6195,23 @@
fn := aFileNameOrString asFilename.
nameString := fn name.
fn isAbsolute ifTrue:[
- "dont use path for absolute file names"
-
- ^ nameString
+ "dont use path for absolute file names"
+
+ ^ nameString
].
self realSystemPath do:[:dirName |
- |realName|
-
- realName := dirName asFilename construct:nameString.
- "/
- "/ here, we also return true if its a directory
- "/ (Even if unreadable).
- "/ It could be that the file itself is still readable.
- "/
- (realName isDirectory or:[realName isReadable]) ifTrue: [
- ^ realName name
- ]
+ |realName|
+
+ realName := dirName asFilename construct:nameString.
+ "/
+ "/ here, we also return true if its a directory
+ "/ (Even if unreadable).
+ "/ It could be that the file itself is still readable.
+ "/
+ (realName isDirectory or:[realName isReadable]) ifTrue: [
+ ^ realName name
+ ]
].
^ nil
@@ -6237,10 +6237,10 @@
classPackage := aClass package.
img := self imageFromFileNamed:aFileName inPackage:classPackage.
img isNil ifTrue:[
- "/ try under the goodies package ...
- classPackage ~= 'stx:goodies' ifTrue:[
- img := self imageFromFileNamed:aFileName inPackage:'stx:goodies'.
- ]
+ "/ try under the goodies package ...
+ classPackage ~= 'stx:goodies' ifTrue:[
+ img := self imageFromFileNamed:aFileName inPackage:'stx:goodies'.
+ ]
].
^ img
@@ -6255,16 +6255,16 @@
then in the package directory if existing.
Return an image or nil.
Search order is:
- bitmaps/<pkg>/file
- resources/<pkg>/bitmaps/file
- <pkg>/bitmaps/file
+ bitmaps/<pkg>/file
+ resources/<pkg>/bitmaps/file
+ <pkg>/bitmaps/file
"
|path|
path := self getBitmapFileName:aFileName forPackage:aPackage.
path notNil ifTrue:[
- ^ Image fromFile:path.
+ ^ Image fromFile:path.
].
^ nil
@@ -6296,9 +6296,9 @@
|aStream line words n aClassName|
aClassOrClassName isBehavior ifTrue:[
- aClassName := aClassOrClassName name
+ aClassName := aClassOrClassName name
] ifFalse:[
- aClassName := aClassOrClassName
+ aClassName := aClassOrClassName
].
aClassName := aClassName asString.
@@ -6306,26 +6306,26 @@
with:#(2) "/ column
do:[:fileName :col |
- aStream := self systemFileStreamFor:fileName.
- aStream notNil ifTrue:[
- [aStream atEnd] whileFalse:[
- line := aStream nextLine.
- line notNil ifTrue:[
- (line startsWith:'#') ifFalse:[
- words := line asCollectionOfWords.
- (n := words size) > 1 ifTrue:[
- (words at:1) = aClassName ifTrue:[
- n >= col ifTrue:[
- aStream close.
- ^ (words at:col) withoutSeparators
- ]
- ]
- ]
- ]
- ]
- ].
- aStream close
- ].
+ aStream := self systemFileStreamFor:fileName.
+ aStream notNil ifTrue:[
+ [aStream atEnd] whileFalse:[
+ line := aStream nextLine.
+ line notNil ifTrue:[
+ (line startsWith:'#') ifFalse:[
+ words := line asCollectionOfWords.
+ (n := words size) > 1 ifTrue:[
+ (words at:1) = aClassName ifTrue:[
+ n >= col ifTrue:[
+ aStream close.
+ ^ (words at:col) withoutSeparators
+ ]
+ ]
+ ]
+ ]
+ ]
+ ].
+ aStream close
+ ].
].
^ nil
@@ -6394,10 +6394,10 @@
"/ in the directory, from which the project was loaded
prj := Project projectWithId:aPackage.
prj notNil ifTrue:[
- prjDir := prj directory.
+ prjDir := prj directory.
].
(prjDir notNil and:[prjDir asFilename exists]) ifFalse:[
- prjDir := Smalltalk getPackageFileName:(aPackage copyReplaceAll:$: with:$/).
+ prjDir := Smalltalk getPackageFileName:(aPackage copyReplaceAll:$: with:$/).
].
^ prjDir
@@ -6433,10 +6433,10 @@
sigh - all for those poor sys5.3 or MSDOS people with short filenames ..."
self
- withAbbreviationsFromStream:aStream
- do:[:className :abbrev :pkg |
- self setFilename:abbrev forClass:className package:pkg.
- ].
+ withAbbreviationsFromStream:aStream
+ do:[:className :abbrev :pkg |
+ self setFilename:abbrev forClass:className package:pkg.
+ ].
"Modified: / 13.12.1999 / 11:54:17 / cg"
!
@@ -6448,32 +6448,32 @@
|nP|
RealSystemPath isNil ifTrue:[
- OperatingSystem isVMSlike ifTrue:[
- "/ temporary kludge: since we cannot currently
- "/ check for existance of a name like 'volume:',
- "/ leave those in the Path without a check.
- RealSystemPath := SystemPath select:[:dirName | |f|
- f := dirName asFilename.
- f isVolumeOnly or:[(f isDirectory) and:[f isReadable]]
- ]
- ] ifFalse:[
- RealSystemPath := SystemPath
- select:[:eachDirectoryName | |f|
- f := eachDirectoryName asFilename.
- (f isDirectory) and:[f isReadable]
- ] thenCollect:[:eachDirectoryName|
- eachDirectoryName asFilename pathName.
- ].
-
- "/ remove duplicates (but keep order)
- nP := OrderedCollection new.
- RealSystemPath do:[:p |
- (nP includes:p) ifFalse:[
- nP add:p
- ]
- ].
- RealSystemPath := nP.
- ].
+ OperatingSystem isVMSlike ifTrue:[
+ "/ temporary kludge: since we cannot currently
+ "/ check for existance of a name like 'volume:',
+ "/ leave those in the Path without a check.
+ RealSystemPath := SystemPath select:[:dirName | |f|
+ f := dirName asFilename.
+ f isVolumeOnly or:[(f isDirectory) and:[f isReadable]]
+ ]
+ ] ifFalse:[
+ RealSystemPath := SystemPath
+ select:[:eachDirectoryName | |f|
+ f := eachDirectoryName asFilename.
+ (f isDirectory) and:[f isReadable]
+ ] thenCollect:[:eachDirectoryName|
+ eachDirectoryName asFilename pathName.
+ ].
+
+ "/ remove duplicates (but keep order)
+ nP := OrderedCollection new.
+ RealSystemPath do:[:p |
+ (nP includes:p) ifFalse:[
+ nP add:p
+ ]
+ ].
+ RealSystemPath := nP.
+ ].
].
^ RealSystemPath
!
@@ -6489,40 +6489,40 @@
maxLevels == 0 ifTrue:[
"/ 'Smalltalk [warning]: max directory nesting reached.' infoPrintCR.
- ^ self
+ ^ self
].
dir := aDirectory asFilename.
dir exists ifFalse:[^ self].
[
- abbrevStream := (dir construct:'abbrev.stc') asFilename readStream.
- self readAbbreviationsFromStream:abbrevStream.
- abbrevStream close.
+ abbrevStream := (dir construct:'abbrev.stc') asFilename readStream.
+ self readAbbreviationsFromStream:abbrevStream.
+ abbrevStream close.
] on:FileStream openErrorSignal do:[:ex| "ignore this file"].
[
- directoryContents := dir directoryContents.
+ directoryContents := dir directoryContents.
] on:FileStream openErrorSignal do:[:ex|
- "non-accessable directory: we are done"
- ^ self
+ "non-accessable directory: we are done"
+ ^ self
].
directoryContents do:[:aFilename |
- |f|
-
- (#(
- 'doc'
- 'CVS'
- 'bitmaps'
- 'resources'
- 'source'
- ) includes:aFilename) ifFalse:[
- f := dir construct:aFilename.
- f isDirectory ifTrue:[
- self recursiveReadAllAbbreviationsFrom:f maxLevels:maxLevels-1
- ]
- ].
+ |f|
+
+ (#(
+ 'doc'
+ 'CVS'
+ 'bitmaps'
+ 'resources'
+ 'source'
+ ) includes:aFilename) ifFalse:[
+ f := dir construct:aFilename.
+ f isDirectory ifTrue:[
+ self recursiveReadAllAbbreviationsFrom:f maxLevels:maxLevels-1
+ ]
+ ].
].
!
@@ -6533,17 +6533,17 @@
|prjDir rsrcDir|
aPackage notNil ifTrue:[
- prjDir := self projectDirectoryForPackage:aPackage.
-
- (prjDir notNil
- and:[(prjDir := prjDir asFilename) exists
- and:[(rsrcDir := prjDir construct:'resources') exists]]) ifTrue:[
- ^ rsrcDir
- ].
- rsrcDir := self getSystemFileName:('resources/' , (aPackage copyReplaceAll:$: with:$/)).
- rsrcDir notNil ifTrue:[
- ^ rsrcDir asFilename
- ].
+ prjDir := self projectDirectoryForPackage:aPackage.
+
+ (prjDir notNil
+ and:[(prjDir := prjDir asFilename) exists
+ and:[(rsrcDir := prjDir construct:'resources') exists]]) ifTrue:[
+ ^ rsrcDir
+ ].
+ rsrcDir := self getSystemFileName:('resources/' , (aPackage copyReplaceAll:$: with:$/)).
+ rsrcDir notNil ifTrue:[
+ ^ rsrcDir asFilename
+ ].
].
^ nil
@@ -6572,7 +6572,7 @@
aString := self getResourceFileName:aFileName forClass:aClassOrNil.
aString notNil ifTrue:[
- ^ aString asFilename readStreamOrNil
+ ^ aString asFilename readStreamOrNil
].
^ nil
!
@@ -6585,26 +6585,26 @@
((f := aFileName asFilename) isAbsolute
or:[f isExplicitRelative]) ifTrue:[
- "/
- "/ dont use path for absolute or explicit .-relative file names
- "/
- ^ aFileName
+ "/
+ "/ dont use path for absolute or explicit .-relative file names
+ "/
+ ^ aFileName
].
aPath notNil ifTrue:[
- aPath do:[:dirName |
- |realName dir|
-
- dir := dirName asFilename.
- aDirName notNil ifTrue:[
- realName := (dir construct:aDirName) construct:aFileName.
- ] ifFalse:[
- realName := dir construct:aFileName.
- ].
- (realName isReadable) ifTrue:[
- ^ realName name
- ]
- ].
+ aPath do:[:dirName |
+ |realName dir|
+
+ dir := dirName asFilename.
+ aDirName notNil ifTrue:[
+ realName := (dir construct:aDirName) construct:aFileName.
+ ] ifFalse:[
+ realName := dir construct:aFileName.
+ ].
+ (realName isReadable) ifTrue:[
+ ^ realName name
+ ]
+ ].
].
"/ not needed - executing dir is always in SearchPath
@@ -6621,55 +6621,55 @@
|classNameSymbol oldAbbrev oldPath newPath cls abbrevs|
CachedAbbreviations isNil ifTrue:[
- CachedAbbreviations := IdentityDictionary new.
+ CachedAbbreviations := IdentityDictionary new.
].
abbrevs := CachedAbbreviations.
aClassNameString ~= aFileNameString ifTrue:[
- classNameSymbol := aClassNameString asSymbol.
- oldAbbrev := abbrevs at:classNameSymbol ifAbsent:nil.
- oldAbbrev notNil ifTrue:[
- oldAbbrev ~= aFileNameString ifTrue:[
- oldAbbrev asFilename isAbsolute
- ifTrue:[ oldPath := oldAbbrev ]
- ifFalse:[ oldPath := (self projectDirectoryForPackage:aPackageNameString) asFilename constructString: oldAbbrev ].
- aFileNameString asFilename isAbsolute
- ifTrue:[ newPath := aFileNameString ]
- ifFalse:[ newPath := (self projectDirectoryForPackage:aPackageNameString) asFilename constructString: aFileNameString ].
-
- oldPath ~= newPath ifTrue:[
- StandAlone ifFalse:[
- ('Smalltalk [warning]: autoload path change for: ',aClassNameString,' in package ',aPackageNameString) infoPrintCR.
- ('Smalltalk [info]: old: ',oldPath) infoPrintCR.
- ('Smalltalk [info]: new: ',newPath) infoPrintCR.
- ]
- ]
- ].
- "overwrite old abbreviation with new one,
- to allow fixing of bad abbrev files"
- ].
-
- cls := self classNamed:aFileNameString.
- cls notNil ifTrue:[
- cls name ~= aClassNameString ifTrue:[
- "/ ok, there is a class named after this abbrev ...
- "/ this is only a conflict, if the other class has no
- "/ abbreviation (or the same).
- (abbrevs at:(cls name asSymbol) ifAbsent:cls name) = aFileNameString ifTrue:[
- cls isNameSpace ifFalse:[
- aPackageNameString = cls package ifTrue:[
- StandAlone ifFalse:[
- ('Smalltalk [warning]: conflict for: ' , cls name ,
- ' in package ' , aPackageNameString) infoPrintCR.
- ('Smalltalk [warning]: (' , aClassNameString , ' -> ' , aFileNameString
- , ')') infoPrintCR
- ]
- ]
- ]
- ]
- ]
- ].
- abbrevs at:classNameSymbol put:aFileNameString.
+ classNameSymbol := aClassNameString asSymbol.
+ oldAbbrev := abbrevs at:classNameSymbol ifAbsent:nil.
+ oldAbbrev notNil ifTrue:[
+ oldAbbrev ~= aFileNameString ifTrue:[
+ oldAbbrev asFilename isAbsolute
+ ifTrue:[ oldPath := oldAbbrev ]
+ ifFalse:[ oldPath := (self projectDirectoryForPackage:aPackageNameString) asFilename constructString: oldAbbrev ].
+ aFileNameString asFilename isAbsolute
+ ifTrue:[ newPath := aFileNameString ]
+ ifFalse:[ newPath := (self projectDirectoryForPackage:aPackageNameString) asFilename constructString: aFileNameString ].
+
+ oldPath ~= newPath ifTrue:[
+ StandAlone ifFalse:[
+ ('Smalltalk [warning]: autoload path change for: ',aClassNameString,' in package ',aPackageNameString) infoPrintCR.
+ ('Smalltalk [info]: old: ',oldPath) infoPrintCR.
+ ('Smalltalk [info]: new: ',newPath) infoPrintCR.
+ ]
+ ]
+ ].
+ "overwrite old abbreviation with new one,
+ to allow fixing of bad abbrev files"
+ ].
+
+ cls := self classNamed:aFileNameString.
+ cls notNil ifTrue:[
+ cls name ~= aClassNameString ifTrue:[
+ "/ ok, there is a class named after this abbrev ...
+ "/ this is only a conflict, if the other class has no
+ "/ abbreviation (or the same).
+ (abbrevs at:(cls name asSymbol) ifAbsent:cls name) = aFileNameString ifTrue:[
+ cls isNameSpace ifFalse:[
+ aPackageNameString = cls package ifTrue:[
+ StandAlone ifFalse:[
+ ('Smalltalk [warning]: conflict for: ' , cls name ,
+ ' in package ' , aPackageNameString) infoPrintCR.
+ ('Smalltalk [warning]: (' , aClassNameString , ' -> ' , aFileNameString
+ , ')') infoPrintCR
+ ]
+ ]
+ ]
+ ]
+ ]
+ ].
+ abbrevs at:classNameSymbol put:aFileNameString.
]
!
@@ -6684,9 +6684,9 @@
|aStream line words n aClassName|
aClassOrClassName isBehavior ifTrue:[
- aClassName := aClassOrClassName name
+ aClassName := aClassOrClassName name
] ifFalse:[
- aClassName := aClassOrClassName
+ aClassName := aClassOrClassName
].
aClassName := aClassName asString.
@@ -6694,26 +6694,26 @@
with:#(3 2) "/ column
do:[:fileName :col |
- aStream := self systemFileStreamFor:fileName.
- aStream notNil ifTrue:[
- [aStream atEnd] whileFalse:[
- line := aStream nextLine.
- line notNil ifTrue:[
- (line startsWith:'#') ifFalse:[
- words := line asCollectionOfWords.
- (n := words size) > 1 ifTrue:[
- (words at:1) = aClassName ifTrue:[
- n >= col ifTrue:[
- aStream close.
- ^ (words at:col) withoutSeparators
- ]
- ]
- ]
- ]
- ]
- ].
- aStream close
- ].
+ aStream := self systemFileStreamFor:fileName.
+ aStream notNil ifTrue:[
+ [aStream atEnd] whileFalse:[
+ line := aStream nextLine.
+ line notNil ifTrue:[
+ (line startsWith:'#') ifFalse:[
+ words := line asCollectionOfWords.
+ (n := words size) > 1 ifTrue:[
+ (words at:1) = aClassName ifTrue:[
+ n >= col ifTrue:[
+ aStream close.
+ ^ (words at:col) withoutSeparators
+ ]
+ ]
+ ]
+ ]
+ ]
+ ].
+ aStream close
+ ].
].
^ nil
@@ -6739,7 +6739,7 @@
aString := self getSourceFileName:aFileName.
aString notNil ifTrue:[
- ^ aString asFilename readStreamOrNil
+ ^ aString asFilename readStreamOrNil
].
^ nil
!
@@ -6753,7 +6753,7 @@
aString := self getSystemFileName:aFileName.
aString notNil ifTrue:[
- ^ aString asFilename readStreamOrNil
+ ^ aString asFilename readStreamOrNil
].
^ nil
!
@@ -6790,42 +6790,42 @@
withAbbreviationsFromStream:aStream do:aBlock
"read classname to filename mappings from aStream.
Evaluate aBlock for each tuple:
- class-name , abbrev-name, package
+ class-name , abbrev-name, package
Sigh - all for those poor sys5.3 or MSDOS people with short filenames..."
|line words nm abbrev pkg s w|
[aStream atEnd] whileFalse:[
- line := aStream nextLine.
- line notNil ifTrue:[
- (line startsWith:'#') ifFalse:[
-
- "/ must do it manually, caring for quoted strings.
+ line := aStream nextLine.
+ line notNil ifTrue:[
+ (line startsWith:'#') ifFalse:[
+
+ "/ must do it manually, caring for quoted strings.
"/ words := line asCollectionOfWords.
- words := OrderedCollection new.
- s := line readStream.
- [s atEnd] whileFalse:[
- s skipSeparators.
- s peek == $' ifTrue:[
- s next.
- w := s upTo:$'.
- s skipSeparators.
- ] ifFalse:[
- w := s upToSeparator
- ].
- words add:w
- ].
- words size >= 3 ifTrue:[
- nm := (words at:1) withoutSeparators.
- abbrev := (words at:2) withoutSeparators.
- pkg := (words at:3) withoutSeparators.
- aBlock value:nm value:abbrev value:pkg.
- ] ifFalse:[
- ('Smalltalk [warning]: malformed line in ' , (aStream pathName)) infoPrintCR.
- ]
- ]
- ]
+ words := OrderedCollection new.
+ s := line readStream.
+ [s atEnd] whileFalse:[
+ s skipSeparators.
+ s peek == $' ifTrue:[
+ s next.
+ w := s upTo:$'.
+ s skipSeparators.
+ ] ifFalse:[
+ w := s upToSeparator
+ ].
+ words add:w
+ ].
+ words size >= 3 ifTrue:[
+ nm := (words at:1) withoutSeparators.
+ abbrev := (words at:2) withoutSeparators.
+ pkg := (words at:3) withoutSeparators.
+ aBlock value:nm value:abbrev value:pkg.
+ ] ifFalse:[
+ ('Smalltalk [warning]: malformed line in ' , (aStream pathName)) infoPrintCR.
+ ]
+ ]
+ ]
].
"Modified: / 13.12.1999 / 11:54:17 / cg"
@@ -6910,7 +6910,7 @@
"remove all undeclared variables"
(Smalltalk at:#Undeclared) do:[:eachKey |
- Smalltalk removeKey:(self undeclaredPrefix , eachKey) asSymbol.
+ Smalltalk removeKey:(self undeclaredPrefix , eachKey) asSymbol.
].
(Smalltalk at:#Undeclared) removeAll.
Smalltalk removeKey:#Undeclared.
@@ -6997,7 +6997,7 @@
exp = __MKUINT(__getExpirationTime());
%}.
exp == 0 ifTrue:[
- ^ nil
+ ^ nil
].
^ Timestamp new fromOSTime:(exp * 1000). "OSTime is ms since 1970"
@@ -7034,28 +7034,28 @@
lang := Language.
(lang == #de) ifTrue:[
- proto := 'Willkommen bei %1 (Version %2 von %3)'
+ proto := 'Willkommen bei %1 (Version %2 von %3)'
] ifFalse:[ (lang == #fr) ifTrue:[
- proto := 'Salut, Bienvenue à %1 (version %2 de %3)'
+ proto := 'Salut, Bienvenue à %1 (version %2 de %3)'
] ifFalse:[ (lang == #it) ifTrue:[
- proto := 'Ciao, benvenuto al %1 (versione %2 di %3)'
+ proto := 'Ciao, benvenuto al %1 (versione %2 di %3)'
] ifFalse:[ (lang == #es) ifTrue:[
"/ proto := 'Hola, bienvenida a %1 (versión %2 de %3)'
] ifFalse:[ (lang == #es) ifTrue:[
"/ proto := 'Oi, benvindo a %1 (versão %2 de %3)'
] ifFalse:[ (lang == #no) ifTrue:[
- proto := 'Hei, verdenmottakelse til %1 (versjon %2 av %3)'
+ proto := 'Hei, verdenmottakelse til %1 (versjon %2 av %3)'
]]]]]].
"/ ... more needed here ...
proto isNil ifTrue:[
- proto := 'Hello World - here is %1 version %2 of %3'.
+ proto := 'Hello World - here is %1 version %2 of %3'.
].
^ proto bindWith:('SmallTalk/X' allBold)
- with:(self versionString)
- with:(self versionDate)
+ with:(self versionString)
+ with:(self versionDate)
"
Smalltalk language:#us.
@@ -7124,7 +7124,7 @@
classes changes).
ST/X revision Naming is:
- <major>.<minor>.<revision>.<release>"
+ <major>.<minor>.<revision>.<release>"
^ 5
@@ -7144,7 +7144,7 @@
classes need rework.
ST/X revision Naming is:
- <major>.<minor>.<revision>.<release>"
+ <major>.<minor>.<revision>.<release>"
^ 4
@@ -7181,7 +7181,7 @@
their way to the outside world.
ST/X revision Naming is:
- <major>.<minor>.<revision>.<release>"
+ <major>.<minor>.<revision>.<release>"
^ 1
@@ -7202,7 +7202,7 @@
to the outside world.
ST/X revision Naming is:
- <major>.<minor>.<revision>.<release>"
+ <major>.<minor>.<revision>.<release>"
^ 6
@@ -7295,9 +7295,9 @@
!Smalltalk class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/Smalltalk.st,v 1.897 2009-10-20 08:37:45 fm Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/Smalltalk.st,v 1.898 2009-10-20 08:39:53 cg Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libbasic/Smalltalk.st,v 1.897 2009-10-20 08:37:45 fm Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/Smalltalk.st,v 1.898 2009-10-20 08:39:53 cg Exp $'
! !