ClassDefinitionChange.st
author Claus Gittinger <cg@exept.de>
Fri, 09 Feb 2001 17:40:49 +0100
changeset 1046 450ef3136cc3
parent 962 3821ab69b939
child 1101 fd826cb660e6
permissions -rw-r--r--
care for the nameSpace in a class-definition

"
 COPYRIGHT (c) 1993 by Claus Gittinger
	      All Rights Reserved

 This software is furnished under a license and may be used
 only in accordance with the terms of that license and with the
 inclusion of the above copyright notice.   This software may not
 be provided or otherwise made available to, or used by, any
 other person.  No title to or ownership of the software is
 hereby transferred.
"

"{ Package: 'stx:libbasic3' }"

ClassChange subclass:#ClassDefinitionChange
	instanceVariableNames:'definition objectType nameSpaceName classType otherParameters'
	classVariableNames:''
	poolDictionaries:''
	category:'System-Changes'
!

!ClassDefinitionChange class methodsFor:'documentation'!

copyright
"
 COPYRIGHT (c) 1993 by Claus Gittinger
	      All Rights Reserved

 This software is furnished under a license and may be used
 only in accordance with the terms of that license and with the
 inclusion of the above copyright notice.   This software may not
 be provided or otherwise made available to, or used by, any
 other person.  No title to or ownership of the software is
 hereby transferred.
"
!

documentation
"
    instances represent class definition-changes. They are typically
    held in a ChangeSet.

    [author:]
        Claus Gittinger
"
! !

!ClassDefinitionChange methodsFor:'accessing'!

nameSpaceName
    ^ nameSpaceName ? super nameSpaceName
!

nameSpaceName: aNameSpaceName classType: aClassType otherParameters: someOtherParameters
    nameSpaceName := aNameSpaceName.
    classType := aClassType.
    otherParameters := someOtherParameters
!

objectType
    "return the value of the instance variable 'objectType' (automatically generated)"

    ^ objectType
!

objectType:something
    "set the value of the instance variable 'objectType' (automatically generated)"

    objectType := something.
!

source
    "return the source of the change"

    |nsName|

    (nsName := self nameSpaceName) notNil ifTrue:[
        ^ '"{ NameSpace: ' , nsName , ' }"' , 
          Character cr, Character cr , 
          super source 
    ].
    ^ super source
! !

!ClassDefinitionChange methodsFor:'comparing'!

isForSameAs:changeB
    "return true, if the given change represents a change for the same
     thingy as the receiver (i.e. same method, same definition etc.)."

    changeB isClassDefinitionChange ifFalse:[^ false].   

    className ~= changeB className ifTrue:[^ false].
    ^ true





!

sameAs:changeB
    "return true, if the given change represents the same change as the receiver."

    (self isForSameAs:changeB) ifFalse:[^ false].
    ^ self sameSourceAs:changeB



! !

!ClassDefinitionChange methodsFor:'printing & storing'!

printWithoutClassNameOn:aStream
    aStream nextPutAll:('definition of ' , className)


! !

!ClassDefinitionChange methodsFor:'queries'!

isClassDefinitionChange
    ^ true
! !

!ClassDefinitionChange class methodsFor:'documentation'!

version
    ^ '$Header: /cvs/stx/stx/libbasic3/ClassDefinitionChange.st,v 1.23 2001-02-09 16:40:47 cg Exp $'
! !