ClassDefinitionChange.st
branchjv
changeset 3857 878ff5dde744
parent 3851 525e62236712
parent 3855 ea6eae92e1ab
child 3862 476566b38577
equal deleted inserted replaced
3854:0590e72fca22 3857:878ff5dde744
       
     1 "{ Encoding: utf8 }"
       
     2 
     1 "
     3 "
     2  COPYRIGHT (c) 1993 by Claus Gittinger
     4  COPYRIGHT (c) 1993 by Claus Gittinger
     3 	      All Rights Reserved
     5 	      All Rights Reserved
     4 
     6 
     5  This software is furnished under a license and may be used
     7  This software is furnished under a license and may be used
   330     ^ src
   332     ^ src
   331 
   333 
   332     "Modified: / 10-08-2012 / 11:53:54 / cg"
   334     "Modified: / 10-08-2012 / 11:53:54 / cg"
   333 !
   335 !
   334 
   336 
   335 superClassName 
   337 superClassName
       
   338     "returns nil, if no superclass"
       
   339 
   336     |nm|
   340     |nm|
   337 
   341 
   338     nm := superClassName.
   342     nm := superClassName.
   339     nm isNil ifTrue:[^ 'nil'].
   343     nm isNil ifTrue:[^ nil " 'nil' "].
   340     "/ convert VW namespace syntax
   344     "/ convert VW namespace syntax
   341     (nm includes:$.) ifTrue:[
   345     (nm includes:$.) ifTrue:[
   342         ^ nm copyReplaceAll:$. withAll:'::'.
   346         ^ nm copyReplaceAll:$. withAll:'::'.
   343     ].
   347     ].
   344     ^ nm
   348     ^ nm
   511                 nextPutAll:' addClassVarName:';
   515                 nextPutAll:' addClassVarName:';
   512                 nextPutAll:className asString storeString
   516                 nextPutAll:className asString storeString
   513           ].
   517           ].
   514     ].
   518     ].
   515 
   519 
   516     superClassNameUsed := self superClassName.
   520     superClassNameUsed := (self superClassName) ? 'nil'.
   517     "Strip of namespace"
   521     "Strip of namespace"
   518     nsOrNil notNil ifTrue:[
   522     nsOrNil notNil ifTrue:[
   519         (superClassNameUsed startsWith: nsOrNil) ifTrue:[
   523         (superClassNameUsed startsWith: nsOrNil) ifTrue:[
   520             superClassNameUsed := superClassNameUsed copyFrom: nsOrNil size + 3
   524             superClassNameUsed := superClassNameUsed copyFrom: nsOrNil size + 3
   521         ].
   525         ].
   605                 nextPutAll:' addClassVarName:';
   609                 nextPutAll:' addClassVarName:';
   606                 nextPutAll:className asString storeString
   610                 nextPutAll:className asString storeString
   607           ].
   611           ].
   608     ].
   612     ].
   609 
   613 
   610     superClassNameUsed := self superClassName.
   614     superClassNameUsed := self superClassName ? 'nil'.
   611     classNameUsed := self classNameWithoutNamespace.
   615     classNameUsed := self classNameWithoutNamespace.
   612 
   616 
   613     ^ String streamContents:[:stream |
   617     ^ String streamContents:[:stream |
   614         self isPrivateClassDefinitionChange ifFalse:[
   618         self isPrivateClassDefinitionChange ifFalse:[
   615             stream 
   619             stream 
   913 ! !
   917 ! !
   914 
   918 
   915 !ClassDefinitionChange class methodsFor:'documentation'!
   919 !ClassDefinitionChange class methodsFor:'documentation'!
   916 
   920 
   917 version
   921 version
   918     ^ '$Header: /cvs/stx/stx/libbasic3/ClassDefinitionChange.st,v 1.96 2015-03-24 18:01:04 cg Exp $'
   922     ^ '$Header: /cvs/stx/stx/libbasic3/ClassDefinitionChange.st,v 1.97 2015-04-19 22:28:16 cg Exp $'
   919 !
   923 !
   920 
   924 
   921 version_CVS
   925 version_CVS
   922     ^ '$Header: /cvs/stx/stx/libbasic3/ClassDefinitionChange.st,v 1.96 2015-03-24 18:01:04 cg Exp $'
   926     ^ '$Header: /cvs/stx/stx/libbasic3/ClassDefinitionChange.st,v 1.97 2015-04-19 22:28:16 cg Exp $'
   923 !
   927 !
   924 
   928 
   925 version_HG
   929 version_HG
   926 
   930 
   927     ^ '$Changeset: <not expanded> $'
   931     ^ '$Changeset: <not expanded> $'
   928 !
   932 !
   929 
   933 
   930 version_SVN
   934 version_SVN
   931     ^ '$Id: ClassDefinitionChange.st,v 1.96 2015-03-24 18:01:04 cg Exp $'
   935     ^ '$Id: ClassDefinitionChange.st,v 1.97 2015-04-19 22:28:16 cg Exp $'
   932 ! !
   936 ! !
   933 
   937