Metaclass.st
changeset 375 e5019c22f40e
parent 362 4131e87e79ec
child 379 5b5a130ccd09
equal deleted inserted replaced
374:7eb5bedfaa1c 375:e5019c22f40e
    19 
    19 
    20 Metaclass comment:'
    20 Metaclass comment:'
    21 COPYRIGHT (c) 1988 by Claus Gittinger
    21 COPYRIGHT (c) 1988 by Claus Gittinger
    22 	      All Rights Reserved
    22 	      All Rights Reserved
    23 
    23 
    24 $Header: /cvs/stx/stx/libbasic/Metaclass.st,v 1.27 1995-07-22 19:23:05 claus Exp $
    24 $Header: /cvs/stx/stx/libbasic/Metaclass.st,v 1.28 1995-08-08 00:47:25 claus Exp $
    25 '!
    25 '!
    26 
    26 
    27 !Metaclass class methodsFor:'documentation'!
    27 !Metaclass class methodsFor:'documentation'!
    28 
    28 
    29 copyright
    29 copyright
    40 "
    40 "
    41 !
    41 !
    42 
    42 
    43 version
    43 version
    44 "
    44 "
    45 $Header: /cvs/stx/stx/libbasic/Metaclass.st,v 1.27 1995-07-22 19:23:05 claus Exp $
    45 $Header: /cvs/stx/stx/libbasic/Metaclass.st,v 1.28 1995-08-08 00:47:25 claus Exp $
    46 "
    46 "
    47 !
    47 !
    48 
    48 
    49 documentation
    49 documentation
    50 "
    50 "
   749     |newClass newMetaclass nClassInstVars oldClass 
   749     |newClass newMetaclass nClassInstVars oldClass 
   750      allSubclasses t oldVars
   750      allSubclasses t oldVars
   751      oldNames newNames addedNames
   751      oldNames newNames addedNames
   752      oldOffsets newOffsets offset changeSet delta
   752      oldOffsets newOffsets offset changeSet delta
   753      oldToNew newSubMeta newSub oldSubMeta oldSuper
   753      oldToNew newSubMeta newSub oldSubMeta oldSuper
   754      commonClassInstVars|
   754      commonClassInstVars currentProject|
   755 
   755 
   756     "
   756     "
   757      cleanup needed here: extract common things with name:inEnvironment:...
   757      cleanup needed here: extract common things with name:inEnvironment:...
   758      and restructure things ... currently way too complex.
   758      and restructure things ... currently way too complex.
   759     "
   759     "
   844     newClass classVariableString:(oldClass classVariableString).
   844     newClass classVariableString:(oldClass classVariableString).
   845     newClass setComment:(oldClass comment).
   845     newClass setComment:(oldClass comment).
   846     newClass category:(oldClass category).
   846     newClass category:(oldClass category).
   847     newClass primitiveSpec:(oldClass primitiveSpec).
   847     newClass primitiveSpec:(oldClass primitiveSpec).
   848 
   848 
       
   849     "/ set the new classes package
       
   850 
       
   851     Project notNil ifTrue:[
       
   852 	currentProject := Project current.
       
   853 	currentProject notNil ifTrue:[
       
   854 	    newMetaclass package:(currentProject packageName).
       
   855 	    newClass package:(currentProject packageName).
       
   856 	]
       
   857     ].
       
   858 
   849     changeSet := Set new.
   859     changeSet := Set new.
   850     ((oldNames size == 0) 
   860     ((oldNames size == 0) 
   851     or:[newNames startsWith:oldNames]) ifTrue:[
   861     or:[newNames startsWith:oldNames]) ifTrue:[
   852 	"new variable(s) has/have been added - old methods still work"
   862 	"new variable(s) has/have been added - old methods still work"
   853 
   863