author | Claus Gittinger <cg@exept.de> |
Wed, 20 Apr 2011 12:20:48 +0200 | |
changeset 2358 | 91620835b09c |
parent 962 | 3821ab69b939 |
child 2372 | e313165eb6cf |
permissions | -rw-r--r-- |
101 | 1 |
" |
2 |
COPYRIGHT (c) 1995 by Claus Gittinger |
|
3 |
All Rights Reserved |
|
4 |
||
5 |
This software is furnished under a license and may be used |
|
6 |
only in accordance with the terms of that license and with the |
|
7 |
inclusion of the above copyright notice. This software may not |
|
8 |
be provided or otherwise made available to, or used by, any |
|
9 |
other person. No title to or ownership of the software is |
|
10 |
hereby transferred. |
|
11 |
" |
|
957 | 12 |
"{ Package: 'stx:libbasic3' }" |
13 |
||
783 | 14 |
ClassPrimitiveChange subclass:#ClassPrimitiveVariablesChange |
235 | 15 |
instanceVariableNames:'' |
16 |
classVariableNames:'' |
|
17 |
poolDictionaries:'' |
|
18 |
category:'System-Changes' |
|
101 | 19 |
! |
20 |
||
21 |
!ClassPrimitiveVariablesChange class methodsFor:'documentation'! |
|
22 |
||
23 |
copyright |
|
24 |
" |
|
25 |
COPYRIGHT (c) 1995 by Claus Gittinger |
|
26 |
All Rights Reserved |
|
27 |
||
28 |
This software is furnished under a license and may be used |
|
29 |
only in accordance with the terms of that license and with the |
|
30 |
inclusion of the above copyright notice. This software may not |
|
31 |
be provided or otherwise made available to, or used by, any |
|
32 |
other person. No title to or ownership of the software is |
|
33 |
hereby transferred. |
|
34 |
" |
|
35 |
! |
|
36 |
||
37 |
documentation |
|
38 |
" |
|
39 |
instances represent a classes primitive variables-changes. |
|
40 |
They are typically held in a ChangeSet. |
|
235 | 41 |
|
42 |
[author:] |
|
43 |
Claus Gittinger |
|
101 | 44 |
" |
45 |
! ! |
|
46 |
||
2358 | 47 |
!ClassPrimitiveVariablesChange methodsFor:'applying'! |
48 |
||
49 |
apply |
|
50 |
"apply the change" |
|
51 |
||
52 |
|class| |
|
53 |
||
54 |
class := self changeClass. |
|
55 |
class isNil ifTrue:[ |
|
56 |
self error:('Cannot apply change for missing class: ' , className) mayProceed:true. |
|
57 |
^ self |
|
58 |
]. |
|
59 |
class autoload. "Most changes cannot be applied to unloaded classes" |
|
60 |
Class nameSpaceQuerySignal answer:self nameSpace do:[ |
|
61 |
class primitiveVariables:(self source) |
|
62 |
]. |
|
63 |
||
64 |
"Created: / 20-04-2011 / 11:52:47 / cg" |
|
65 |
! ! |
|
66 |
||
784
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
783
diff
changeset
|
67 |
!ClassPrimitiveVariablesChange methodsFor:'comparing'! |
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
783
diff
changeset
|
68 |
|
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
783
diff
changeset
|
69 |
isForSameAs:changeB |
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
783
diff
changeset
|
70 |
"return true, if the given change represents a change for the same |
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
783
diff
changeset
|
71 |
thingy as the receiver (i.e. same method, same definition etc.)." |
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
783
diff
changeset
|
72 |
|
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
783
diff
changeset
|
73 |
changeB isPrimitiveVariablesChange ifFalse:[^ false]. |
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
783
diff
changeset
|
74 |
|
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
783
diff
changeset
|
75 |
^ className = changeB className |
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
783
diff
changeset
|
76 |
|
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
783
diff
changeset
|
77 |
|
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
783
diff
changeset
|
78 |
! ! |
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
783
diff
changeset
|
79 |
|
962 | 80 |
!ClassPrimitiveVariablesChange methodsFor:'printing & storing'! |
103
487c1447b3d8
printing fixed (req'd for changeSetBrowser)
Claus Gittinger <cg@exept.de>
parents:
101
diff
changeset
|
81 |
|
487c1447b3d8
printing fixed (req'd for changeSetBrowser)
Claus Gittinger <cg@exept.de>
parents:
101
diff
changeset
|
82 |
printOn:aStream |
801 | 83 |
"append a user printed representation of the receiver to aStream. |
84 |
The format is suitable for a human - not meant to be read back." |
|
85 |
||
103
487c1447b3d8
printing fixed (req'd for changeSetBrowser)
Claus Gittinger <cg@exept.de>
parents:
101
diff
changeset
|
86 |
aStream nextPutAll:className; nextPutAll:' primitiveVariables:' |
487c1447b3d8
printing fixed (req'd for changeSetBrowser)
Claus Gittinger <cg@exept.de>
parents:
101
diff
changeset
|
87 |
! ! |
487c1447b3d8
printing fixed (req'd for changeSetBrowser)
Claus Gittinger <cg@exept.de>
parents:
101
diff
changeset
|
88 |
|
783 | 89 |
!ClassPrimitiveVariablesChange methodsFor:'queries'! |
90 |
||
91 |
isPrimitiveVariablesChange |
|
92 |
^ true |
|
93 |
||
94 |
||
95 |
! ! |
|
96 |
||
101 | 97 |
!ClassPrimitiveVariablesChange class methodsFor:'documentation'! |
98 |
||
99 |
version |
|
2358 | 100 |
^ '$Header: /cvs/stx/stx/libbasic3/ClassPrimitiveVariablesChange.st,v 1.10 2011-04-20 10:20:48 cg Exp $' |
101 |
! |
|
102 |
||
103 |
version_CVS |
|
104 |
^ '$Header: /cvs/stx/stx/libbasic3/ClassPrimitiveVariablesChange.st,v 1.10 2011-04-20 10:20:48 cg Exp $' |
|
101 | 105 |
! ! |