MethodCategoryChange.st
author Claus Gittinger <cg@exept.de>
Mon, 13 Nov 2006 13:03:50 +0100
changeset 1902 20db5f942dbd
parent 1846 c0f8e12c9611
child 1915 d23534c8ab03
permissions -rw-r--r--
changed #class:selector:category:

"
 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' }"

MethodChange subclass:#MethodCategoryChange
	instanceVariableNames:''
	classVariableNames:''
	poolDictionaries:''
	category:'System-Changes'
!

!MethodCategoryChange 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 method-category changes (as done in the browser). 
    They are typically held in a ChangeSet.

    [author:]
        Claus Gittinger
"
! !

!MethodCategoryChange class methodsFor:'instance creation'!

class:cls selector:sel category:cat 
    ^ self basicNew class:cls selector:sel category:cat


!

className:clsName selector:sel category:cat 
    ^ self basicNew className:clsName selector:sel category:cat

    "Created: / 12-11-2006 / 15:54:25 / cg"
! !

!MethodCategoryChange methodsFor:'accessing'!

class:cls selector:sel category:cat
    self className:cls name selector:sel category:cat

    "Modified: / 12-11-2006 / 15:55:11 / cg"
!

className:clsName selector:sel category:cat
    className := clsName.
    selector := sel.
    methodCategory := cat

    "Created: / 16.2.1998 / 14:14:16 / cg"
!

prettyPrintedSource
    ^ self sourceForMethod, Character cr 
          , '    category:' , methodCategory storeString

    "Modified: / 09-10-2006 / 13:59:15 / cg"
!

source
    ^ self sourceForMethod , ' category:' , methodCategory storeString

    "Modified: / 09-10-2006 / 13:59:10 / cg"
! !

!MethodCategoryChange methodsFor:'applying'!

apply
    "apply the change"

    |cls mthd|

    cls := self changeClass.
    mthd := self changeMethod.

    mthd category:methodCategory asSymbol.
    cls addChangeRecordForMethodCategory:mthd category:methodCategory.
! !

!MethodCategoryChange methodsFor:'queries'!

isMethodCategoryChange
    ^ true
! !

!MethodCategoryChange class methodsFor:'documentation'!

version
    ^ '$Header: /cvs/stx/stx/libbasic3/MethodCategoryChange.st,v 1.16 2006-11-13 12:03:50 cg Exp $'
! !