Smalltalk.st
changeset 2405 939f4e751ef3
parent 2379 ce467f2b5591
child 2418 5a62914080b1
equal deleted inserted replaced
2404:77c6111ce6ba 2405:939f4e751ef3
     9  other person.  No title to or ownership of the software is
     9  other person.  No title to or ownership of the software is
    10  hereby transferred.
    10  hereby transferred.
    11 "
    11 "
    12 
    12 
    13 Object subclass:#Smalltalk
    13 Object subclass:#Smalltalk
    14         instanceVariableNames:''
    14 	instanceVariableNames:''
    15         classVariableNames:'StartBlocks ImageStartBlocks ExitBlocks CachedClasses SystemPath
    15 	classVariableNames:'StartBlocks ImageStartBlocks ExitBlocks CachedClasses SystemPath
    16                 StartupClass StartupSelector StartupArguments CommandLine
    16 		StartupClass StartupSelector StartupArguments CommandLine
    17                 CommandLineArguments CachedAbbreviations SilentLoading
    17 		CommandLineArguments CachedAbbreviations SilentLoading
    18                 Initializing StandAlone LogDoits LoadBinaries RealSystemPath
    18 		Initializing StandAlone LogDoits LoadBinaries RealSystemPath
    19                 ResourcePath SourcePath BitmapPath BinaryPath FileInPath
    19 		ResourcePath SourcePath BitmapPath BinaryPath FileInPath
    20                 ImageStartTime ImageRestartTime DemoMode'
    20 		ImageStartTime ImageRestartTime DemoMode'
    21         poolDictionaries:''
    21 	poolDictionaries:''
    22         category:'System-Support'
    22 	category:'System-Support'
    23 !
    23 !
    24 
    24 
    25 !Smalltalk class methodsFor:'documentation'!
    25 !Smalltalk class methodsFor:'documentation'!
    26 
    26 
    27 copyright
    27 copyright
   705 
   705 
   706     |oldName oldSym newSym names oldCVSym newCVSym value oldNameToNewName
   706     |oldName oldSym newSym names oldCVSym newCVSym value oldNameToNewName
   707      oldNameSpace newNameSpace oldBaseName privateClasses|
   707      oldNameSpace newNameSpace oldBaseName privateClasses|
   708 
   708 
   709     oldName := aClass name.
   709     oldName := aClass name.
   710     oldNameSpace := aClass nameSpace.
   710     aClass isPrivate ifTrue:[
       
   711         oldNameSpace := aClass topOwningClass nameSpace.
       
   712     ] ifFalse:[
       
   713         oldNameSpace := aClass nameSpace.
       
   714     ].
   711     oldBaseName := aClass nameWithoutNameSpacePrefix.
   715     oldBaseName := aClass nameWithoutNameSpacePrefix.
   712     oldSym := oldName asSymbol.
   716     oldSym := oldName asSymbol.
   713     privateClasses := aClass privateClasses.
   717     privateClasses := aClass privateClasses.
   714 
   718 
   715     ((self at:oldSym) ~~ aClass) ifTrue:[
   719     ((self at:oldSym) ~~ aClass) ifTrue:[
   785 "/        ]
   789 "/        ]
   786     ].
   790     ].
   787 
   791 
   788     aClass addChangeRecordForClassRename:oldSym to:newSym.
   792     aClass addChangeRecordForClassRename:oldSym to:newSym.
   789 
   793 
   790     newNameSpace := aClass nameSpace.
   794     aClass isPrivate ifTrue:[
       
   795         newNameSpace := aClass topOwningClass nameSpace.
       
   796     ] ifFalse:[    
       
   797         newNameSpace := aClass nameSpace.
       
   798     ].
       
   799 
       
   800     privateClasses notNil ifTrue:[
       
   801         "/ must rename privateClasses as well
       
   802         privateClasses do:[:aPrivateClass |
       
   803             self renameClass:aPrivateClass
       
   804                  to:(newSym , '::' , aPrivateClass nameWithoutPrefix)   
       
   805         ]
       
   806     ].
       
   807 
   791     oldNameSpace ~~ newNameSpace ifTrue:[
   808     oldNameSpace ~~ newNameSpace ifTrue:[
   792         privateClasses notNil ifTrue:[
       
   793             "/ must rename privateClasses as well
       
   794             privateClasses do:[:aPrivateClass |
       
   795                 self renameClass:aPrivateClass
       
   796                      to:(newNameSpace name , '::' , aPrivateClass nameWithoutNameSpacePrefix)   
       
   797             ]
       
   798         ].
       
   799 
       
   800         "/ all those referencing the class from the old nameSpace
   809         "/ all those referencing the class from the old nameSpace
   801         "/ must be recompiled ...
   810         "/ must be recompiled ...
   802         "/ (to now access the global from smalltalk)
   811         "/ (to now access the global from smalltalk)
   803 
   812 
   804         oldNameSpace ~~ Smalltalk ifTrue:[
   813         oldNameSpace ~~ Smalltalk ifTrue:[
   823         ]
   832         ]
   824     ].
   833     ].
   825 
   834 
   826     "Created: 29.10.1995 / 19:58:32 / cg"
   835     "Created: 29.10.1995 / 19:58:32 / cg"
   827     "Modified: 18.6.1996 / 14:20:50 / stefan"
   836     "Modified: 18.6.1996 / 14:20:50 / stefan"
   828     "Modified: 29.1.1997 / 23:26:57 / cg"
   837     "Modified: 14.2.1997 / 18:56:38 / cg"
   829 ! !
   838 ! !
   830 
   839 
   831 !Smalltalk class methodsFor:'copying'!
   840 !Smalltalk class methodsFor:'copying'!
   832 
   841 
   833 deepCopy
   842 deepCopy
  3608 ! !
  3617 ! !
  3609 
  3618 
  3610 !Smalltalk class methodsFor:'documentation'!
  3619 !Smalltalk class methodsFor:'documentation'!
  3611 
  3620 
  3612 version
  3621 version
  3613     ^ '$Header: /cvs/stx/stx/libbasic/Smalltalk.st,v 1.225 1997-02-12 01:22:02 ca Exp $'
  3622     ^ '$Header: /cvs/stx/stx/libbasic/Smalltalk.st,v 1.226 1997-02-14 17:59:06 cg Exp $'
  3614 ! !
  3623 ! !