--- a/Metaclass.st Mon Oct 12 19:29:14 2009 +0200
+++ b/Metaclass.st Mon Oct 12 19:29:34 2009 +0200
@@ -404,8 +404,8 @@
superclass superclassNamespace nm useStoreString boldOn boldOff pkg|
syntaxHilighting ifTrue:[
- boldOn := [aStream bold].
- boldOff := [aStream normal].
+ boldOn := [aStream bold].
+ boldOff := [aStream normal].
].
fullName := FileOutNameSpaceQuerySignal query == true.
@@ -413,12 +413,12 @@
ns := aClass topNameSpace.
(showPackage and:[owner isNil]) ifTrue:[
- pkg := aClass getPackage.
- (pkg notNil and:[pkg ~= Project noProjectID]) ifTrue:[
- aStream nextPutAll:'"{ Package: '''.
- aStream nextPutAll:aClass package asString.
- aStream nextPutAll:''' }"'; cr; cr.
- ]
+ pkg := aClass getPackage.
+ (pkg notNil and:[pkg ~= PackageId noProjectID]) ifTrue:[
+ aStream nextPutAll:'"{ Package: '''.
+ aStream nextPutAll:aClass package asString.
+ aStream nextPutAll:''' }"'; cr; cr.
+ ]
].
"/ the backward compatible namespace directive is only used
@@ -427,109 +427,109 @@
"/ and there is no need to complicate global lookup in stc...
owner notNil ifTrue:[
- forceNoNameSpace := ForceNoNameSpaceQuerySignal query == true.
- forceNoNameSpace ifFalse:[
- fullName := true.
- ]
+ forceNoNameSpace := ForceNoNameSpaceQuerySignal query == true.
+ forceNoNameSpace ifFalse:[
+ fullName := true.
+ ]
].
fullName ifFalse:[
- (owner isNil or:[forceNameSpace]) ifTrue:[
- (ns notNil and:[ns ~~ Smalltalk]) ifTrue:[
- nsName := ns name.
- (nsName includes:$:) ifTrue:[
- nsName := '''' , nsName , ''''
- ].
- aStream nextPutAll:'"{ NameSpace: '.
- boldOn value.
- aStream nextPutAll:nsName.
- boldOff value.
- aStream nextPutAll:' }"'; cr; cr.
- ]
- ].
+ (owner isNil or:[forceNameSpace]) ifTrue:[
+ (ns notNil and:[ns ~~ Smalltalk]) ifTrue:[
+ nsName := ns name.
+ (nsName includes:$:) ifTrue:[
+ nsName := '''' , nsName , ''''
+ ].
+ aStream nextPutAll:'"{ NameSpace: '.
+ boldOn value.
+ aStream nextPutAll:nsName.
+ boldOff value.
+ aStream nextPutAll:' }"'; cr; cr.
+ ]
+ ].
].
"take care of nil-superclass"
superclass := aClass superclass.
superclass isNil ifTrue:[
- s := 'nil'
+ s := 'nil'
] ifFalse:[
- superclassNamespace := superclass nameSpace.
+ superclassNamespace := superclass nameSpace.
- "/ be careful: if the superclasses ns is Smalltalk,
- "/ AND this is the definition of a private class,
- "/ AND a private class with the same name as my superclas
- "/ exists in my owning class,
- "/ THEN we MUST add the smalltalk-prefix.
- "/ (otherwise, we get the private class as superclass when accepting the
- "/ next time)
- (owner notNil
- and:[ superclassNamespace == Smalltalk
- and:[ (owner privateClassesAt:superclass name) notNil ]]) ifTrue:[
- s := superclass nameWithNameSpacePrefix.
- ] ifFalse:[
- fullName ifTrue:[
- s := superclass name.
- ] ifFalse:[
- (ns == superclassNamespace
- and:[superclass owningClass isNil]) ifTrue:[
- "/ superclass is in the same namespace and not private;
- "/ still prepend namespace prefix for private classes,
- "/ to avoid confusing stc, which needs that information.
- "/ LATE note (AUG2002) - no longer; stc was fixed.
+ "/ be careful: if the superclasses ns is Smalltalk,
+ "/ AND this is the definition of a private class,
+ "/ AND a private class with the same name as my superclas
+ "/ exists in my owning class,
+ "/ THEN we MUST add the smalltalk-prefix.
+ "/ (otherwise, we get the private class as superclass when accepting the
+ "/ next time)
+ (owner notNil
+ and:[ superclassNamespace == Smalltalk
+ and:[ (owner privateClassesAt:superclass name) notNil ]]) ifTrue:[
+ s := superclass nameWithNameSpacePrefix.
+ ] ifFalse:[
+ fullName ifTrue:[
+ s := superclass name.
+ ] ifFalse:[
+ (ns == superclassNamespace
+ and:[superclass owningClass isNil]) ifTrue:[
+ "/ superclass is in the same namespace and not private;
+ "/ still prepend namespace prefix for private classes,
+ "/ to avoid confusing stc, which needs that information.
+ "/ LATE note (AUG2002) - no longer; stc was fixed.
"/ owner notNil ifTrue:[
"/ s := superclass name
"/ ] ifFalse:[
- s := superclass nameWithoutPrefix
+ s := superclass nameWithoutPrefix
"/ ]
- ] ifFalse:[
- "/ a very special (rare) situation:
- "/ my superclass resides in another nameSpace,
- "/ but there is something else named like this
- "/ to be found in my nameSpace (or a private class)
+ ] ifFalse:[
+ "/ a very special (rare) situation:
+ "/ my superclass resides in another nameSpace,
+ "/ but there is something else named like this
+ "/ to be found in my nameSpace (or a private class)
- superNameWithoutNameSpacePrefix := superclass nameWithoutNameSpacePrefix asSymbol.
- cls := aClass privateClassesAt:superNameWithoutNameSpacePrefix.
- cls isNil ifTrue:[
- (topOwner := aClass topOwningClass) isNil ifTrue:[
- ns := aClass nameSpace.
- ns notNil ifTrue:[
- cls := ns privateClassesAt:superNameWithoutNameSpacePrefix
- ] ifFalse:[
- "/ aClass error:'unexpected nil namespace'
- ]
- ] ifFalse:[
- cls := topOwner nameSpace at:superNameWithoutNameSpacePrefix.
- ]
- ].
- (cls notNil and:[cls ~~ superclass]) ifTrue:[
- s := superclassNamespace name , '::' , superNameWithoutNameSpacePrefix
- ] ifFalse:[
- "/ no class with that name found in my namespace ...
- "/ if the superclass resides in Smalltalk,
- "/ suppress prefix; otherwise, use full prefix.
- (superclassNamespace notNil
- and:[superclassNamespace ~~ Smalltalk]) ifTrue:[
- (owner notNil
- and:[(topOwner := owner topOwningClass) notNil
- and:[superclass topOwningClass notNil
- and:[topOwner nameSpace == superclass topOwningClass "owningClass" nameSpace]
- ]]) ifTrue:[
- s := superNameWithoutNameSpacePrefix
- ] ifFalse:[
- ns == superclass topNameSpace ifTrue:[
- s := superNameWithoutNameSpacePrefix
- ] ifFalse:[
- s := superclass name
- ]
- ]
- ] ifFalse:[
- s := superNameWithoutNameSpacePrefix
- ]
- ]
- ]
- ]
- ]
+ superNameWithoutNameSpacePrefix := superclass nameWithoutNameSpacePrefix asSymbol.
+ cls := aClass privateClassesAt:superNameWithoutNameSpacePrefix.
+ cls isNil ifTrue:[
+ (topOwner := aClass topOwningClass) isNil ifTrue:[
+ ns := aClass nameSpace.
+ ns notNil ifTrue:[
+ cls := ns privateClassesAt:superNameWithoutNameSpacePrefix
+ ] ifFalse:[
+ "/ aClass error:'unexpected nil namespace'
+ ]
+ ] ifFalse:[
+ cls := topOwner nameSpace at:superNameWithoutNameSpacePrefix.
+ ]
+ ].
+ (cls notNil and:[cls ~~ superclass]) ifTrue:[
+ s := superclassNamespace name , '::' , superNameWithoutNameSpacePrefix
+ ] ifFalse:[
+ "/ no class with that name found in my namespace ...
+ "/ if the superclass resides in Smalltalk,
+ "/ suppress prefix; otherwise, use full prefix.
+ (superclassNamespace notNil
+ and:[superclassNamespace ~~ Smalltalk]) ifTrue:[
+ (owner notNil
+ and:[(topOwner := owner topOwningClass) notNil
+ and:[superclass topOwningClass notNil
+ and:[topOwner nameSpace == superclass topOwningClass "owningClass" nameSpace]
+ ]]) ifTrue:[
+ s := superNameWithoutNameSpacePrefix
+ ] ifFalse:[
+ ns == superclass topNameSpace ifTrue:[
+ s := superNameWithoutNameSpacePrefix
+ ] ifFalse:[
+ s := superclass name
+ ]
+ ]
+ ] ifFalse:[
+ s := superNameWithoutNameSpacePrefix
+ ]
+ ]
+ ]
+ ]
+ ]
].
boldOn value.
@@ -540,23 +540,23 @@
useStoreString := false.
(fullName and:[owner isNil]) ifTrue:[
- nm := aClass name.
- useStoreString := true.
+ nm := aClass name.
+ useStoreString := true.
] ifFalse:[
- nm := aClass nameWithoutPrefix.
- nm isValidSmalltalkIdentifier ifFalse:[
- useStoreString := true.
- ].
+ nm := aClass nameWithoutPrefix.
+ nm isValidSmalltalkIdentifier ifFalse:[
+ useStoreString := true.
+ ].
].
aStream nextPut:$#.
useStoreString ifTrue:[
- aStream nextPutAll:''''.
+ aStream nextPutAll:''''.
].
boldOn value.
aStream nextPutAll:nm.
boldOff value.
useStoreString ifTrue:[
- aStream nextPutAll:''''.
+ aStream nextPutAll:''''.
].
aStream crtab.
@@ -582,25 +582,25 @@
aStream crtab.
owner isNil ifTrue:[
- "/ a public class
- aStream nextPutAll:'category:'.
- aClass category isNil ifTrue:[
- s := ''''''
- ] ifFalse:[
- s := aClass category asString storeString
- ].
- aStream nextPutAll:s.
+ "/ a public class
+ aStream nextPutAll:'category:'.
+ aClass category isNil ifTrue:[
+ s := ''''''
+ ] ifFalse:[
+ s := aClass category asString storeString
+ ].
+ aStream nextPutAll:s.
] ifFalse:[
- "/ a private class
- aStream nextPutAll:'privateIn:'.
- boldOn value.
- fullName ifTrue:[
- s := owner name.
- ] ifFalse:[
- s := owner nameWithoutNameSpacePrefix.
- ].
- aStream nextPutAll:s.
- boldOff value.
+ "/ a private class
+ aStream nextPutAll:'privateIn:'.
+ boldOn value.
+ fullName ifTrue:[
+ s := owner name.
+ ] ifFalse:[
+ s := owner nameWithoutNameSpacePrefix.
+ ].
+ aStream nextPutAll:s.
+ boldOff value.
].
aStream cr
@@ -884,11 +884,11 @@
!Metaclass class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/Metaclass.st,v 1.205 2009-10-05 18:12:05 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/Metaclass.st,v 1.206 2009-10-12 17:29:34 cg Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libbasic/Metaclass.st,v 1.205 2009-10-05 18:12:05 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/Metaclass.st,v 1.206 2009-10-12 17:29:34 cg Exp $'
! !
Metaclass initialize!