DoItChange.st
author Claus Gittinger <cg@exept.de>
Wed, 06 Feb 2002 10:09:31 +0100
changeset 1132 f8b195e81f85
parent 1039 f3081fea9435
child 1154 1c2809b4abc2
permissions -rw-r--r--
apply
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
798
999fff0aa0d0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 784
diff changeset
     1
"
999fff0aa0d0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 784
diff changeset
     2
 COPYRIGHT (c) 1998 by eXept Software AG
999fff0aa0d0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 784
diff changeset
     3
              All Rights Reserved
999fff0aa0d0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 784
diff changeset
     4
999fff0aa0d0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 784
diff changeset
     5
 This software is furnished under a license and may be used
999fff0aa0d0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 784
diff changeset
     6
 only in accordance with the terms of that license and with the
999fff0aa0d0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 784
diff changeset
     7
 inclusion of the above copyright notice.   This software may not
999fff0aa0d0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 784
diff changeset
     8
 be provided or otherwise made available to, or used by, any
999fff0aa0d0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 784
diff changeset
     9
 other person.  No title to or ownership of the software is
999fff0aa0d0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 784
diff changeset
    10
 hereby transferred.
999fff0aa0d0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 784
diff changeset
    11
"
999fff0aa0d0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 784
diff changeset
    12
999fff0aa0d0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 784
diff changeset
    13
957
54dade11e57f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 798
diff changeset
    14
"{ Package: 'stx:libbasic3' }"
54dade11e57f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 798
diff changeset
    15
653
b873bb41ef10 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    16
Change subclass:#DoItChange
b873bb41ef10 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    17
	instanceVariableNames:''
b873bb41ef10 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    18
	classVariableNames:''
b873bb41ef10 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    19
	poolDictionaries:''
b873bb41ef10 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    20
	category:'System-Changes'
b873bb41ef10 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    21
!
b873bb41ef10 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    22
b873bb41ef10 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    23
!DoItChange class methodsFor:'documentation'!
b873bb41ef10 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    24
798
999fff0aa0d0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 784
diff changeset
    25
copyright
999fff0aa0d0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 784
diff changeset
    26
"
999fff0aa0d0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 784
diff changeset
    27
 COPYRIGHT (c) 1998 by eXept Software AG
999fff0aa0d0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 784
diff changeset
    28
              All Rights Reserved
653
b873bb41ef10 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    29
798
999fff0aa0d0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 784
diff changeset
    30
 This software is furnished under a license and may be used
999fff0aa0d0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 784
diff changeset
    31
 only in accordance with the terms of that license and with the
999fff0aa0d0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 784
diff changeset
    32
 inclusion of the above copyright notice.   This software may not
999fff0aa0d0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 784
diff changeset
    33
 be provided or otherwise made available to, or used by, any
999fff0aa0d0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 784
diff changeset
    34
 other person.  No title to or ownership of the software is
999fff0aa0d0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 784
diff changeset
    35
 hereby transferred.
999fff0aa0d0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 784
diff changeset
    36
"
999fff0aa0d0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 784
diff changeset
    37
653
b873bb41ef10 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    38
! !
b873bb41ef10 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    39
1132
Claus Gittinger <cg@exept.de>
parents: 1039
diff changeset
    40
!DoItChange methodsFor:'applying'!
Claus Gittinger <cg@exept.de>
parents: 1039
diff changeset
    41
Claus Gittinger <cg@exept.de>
parents: 1039
diff changeset
    42
apply
Claus Gittinger <cg@exept.de>
parents: 1039
diff changeset
    43
    "apply the change"
Claus Gittinger <cg@exept.de>
parents: 1039
diff changeset
    44
Claus Gittinger <cg@exept.de>
parents: 1039
diff changeset
    45
    Compiler evaluate:source.
Claus Gittinger <cg@exept.de>
parents: 1039
diff changeset
    46
! !
Claus Gittinger <cg@exept.de>
parents: 1039
diff changeset
    47
784
1e50cc7fd07d added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents: 773
diff changeset
    48
!DoItChange methodsFor:'comparing'!
1e50cc7fd07d added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents: 773
diff changeset
    49
1039
f3081fea9435 added #isInitialize
Claus Gittinger <cg@exept.de>
parents: 957
diff changeset
    50
isInitialize
f3081fea9435 added #isInitialize
Claus Gittinger <cg@exept.de>
parents: 957
diff changeset
    51
    "return true, if the given change represents a #initialize message."
f3081fea9435 added #isInitialize
Claus Gittinger <cg@exept.de>
parents: 957
diff changeset
    52
f3081fea9435 added #isInitialize
Claus Gittinger <cg@exept.de>
parents: 957
diff changeset
    53
    |tree|
f3081fea9435 added #isInitialize
Claus Gittinger <cg@exept.de>
parents: 957
diff changeset
    54
f3081fea9435 added #isInitialize
Claus Gittinger <cg@exept.de>
parents: 957
diff changeset
    55
    tree := Parser parseExpression:source.
f3081fea9435 added #isInitialize
Claus Gittinger <cg@exept.de>
parents: 957
diff changeset
    56
    ^ tree isMessage and:[tree selector == #initialize]
f3081fea9435 added #isInitialize
Claus Gittinger <cg@exept.de>
parents: 957
diff changeset
    57
!
f3081fea9435 added #isInitialize
Claus Gittinger <cg@exept.de>
parents: 957
diff changeset
    58
784
1e50cc7fd07d added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents: 773
diff changeset
    59
sameAs:changeB
1e50cc7fd07d added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents: 773
diff changeset
    60
    "return true, if the given change represents the same change as the receiver."
1e50cc7fd07d added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents: 773
diff changeset
    61
1e50cc7fd07d added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents: 773
diff changeset
    62
    changeB isDoIt ifFalse:[^ false].
1e50cc7fd07d added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents: 773
diff changeset
    63
    ^ self sameSourceAs:changeB
1e50cc7fd07d added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents: 773
diff changeset
    64
1e50cc7fd07d added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents: 773
diff changeset
    65
1e50cc7fd07d added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents: 773
diff changeset
    66
! !
1e50cc7fd07d added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents: 773
diff changeset
    67
773
286439523352 added #isDoIt
Claus Gittinger <cg@exept.de>
parents: 653
diff changeset
    68
!DoItChange methodsFor:'queries'!
286439523352 added #isDoIt
Claus Gittinger <cg@exept.de>
parents: 653
diff changeset
    69
286439523352 added #isDoIt
Claus Gittinger <cg@exept.de>
parents: 653
diff changeset
    70
isDoIt
286439523352 added #isDoIt
Claus Gittinger <cg@exept.de>
parents: 653
diff changeset
    71
    ^ true
286439523352 added #isDoIt
Claus Gittinger <cg@exept.de>
parents: 653
diff changeset
    72
! !
286439523352 added #isDoIt
Claus Gittinger <cg@exept.de>
parents: 653
diff changeset
    73
653
b873bb41ef10 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    74
!DoItChange class methodsFor:'documentation'!
b873bb41ef10 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    75
b873bb41ef10 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    76
version
1132
Claus Gittinger <cg@exept.de>
parents: 1039
diff changeset
    77
    ^ '$Header: /cvs/stx/stx/libbasic3/DoItChange.st,v 1.7 2002-02-06 09:09:31 cg Exp $'
653
b873bb41ef10 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    78
! !