3908 |
3908 |
3909 classOfChange:changeNr ifAbsent:exceptionBlock |
3909 classOfChange:changeNr ifAbsent:exceptionBlock |
3910 "answer the class that is subject to the chamge at changeNr. |
3910 "answer the class that is subject to the chamge at changeNr. |
3911 The classes owning class may be autoloaded, if autoloadAsRequired is true." |
3911 The classes owning class may be autoloaded, if autoloadAsRequired is true." |
3912 |
3912 |
3913 |className cls isMeta nameSpaceForApply| |
3913 |className cls isMeta nameSpaceForApply path ownerName owner| |
3914 |
3914 |
3915 className := self realClassNameOfChange:changeNr. |
3915 className := self realClassNameOfChange:changeNr. |
3916 className isNil ifTrue:[ |
3916 className isNil ifTrue:[ |
3917 ^ exceptionBlock value:nil |
3917 ^ exceptionBlock value:nil |
3918 ]. |
3918 ]. |
3919 |
3919 |
3920 isMeta := false. |
3920 isMeta := false. |
3921 (className endsWith:' class') ifTrue:[ |
3921 (className endsWith:' class') ifTrue:[ |
3922 className := className copyWithoutLast:6. |
3922 className := className copyWithoutLast:6. |
3923 isMeta := true. |
3923 isMeta := true. |
|
3924 ]. |
|
3925 |
|
3926 autoloadAsRequired value ifTrue:[ |
|
3927 path := className asCollectionOfSubstringsSeparatedByAll:'::'. |
|
3928 path size > 2 ifTrue:[ |
|
3929 "/ ensure that the owningClass is loaded - this will load the private classes as well |
|
3930 "/ Transcript showCR:'loading owner'. |
|
3931 ownerName := path first,'::',path second. |
|
3932 owner := Smalltalk classNamed:ownerName. |
|
3933 owner autoload. |
|
3934 ]. |
3924 ]. |
3935 ]. |
3925 |
3936 |
3926 nameSpaceForApply := self nameSpaceForApply. |
3937 nameSpaceForApply := self nameSpaceForApply. |
3927 autoloadAsRequired value ifTrue:[ |
3938 autoloadAsRequired value ifTrue:[ |
3928 cls := nameSpaceForApply classNamed:className. |
3939 cls := nameSpaceForApply classNamed:className. |