author | Jan Vrany <jan.vrany@fit.cvut.cz> |
Wed, 01 Apr 2015 10:37:40 +0100 | |
branch | jv |
changeset 3838 | 474d8ec95b33 |
parent 3128 | 87750af738dc |
parent 3501 | 2ec70319140a |
permissions | -rw-r--r-- |
798 | 1 |
" |
2 |
COPYRIGHT (c) 1999 by eXept Software AG |
|
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 |
||
782 | 14 |
ClassChange subclass:#ClassPrimitiveChange |
15 |
instanceVariableNames:'' |
|
16 |
classVariableNames:'' |
|
17 |
poolDictionaries:'' |
|
18 |
category:'System-Changes' |
|
19 |
! |
|
20 |
||
798 | 21 |
!ClassPrimitiveChange class methodsFor:'documentation'! |
22 |
||
23 |
copyright |
|
24 |
" |
|
25 |
COPYRIGHT (c) 1999 by eXept Software AG |
|
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 |
||
2164 | 36 |
! |
37 |
||
38 |
documentation |
|
39 |
" |
|
40 |
Abstract superclass for all primitive code changes |
|
41 |
" |
|
798 | 42 |
! ! |
782 | 43 |
|
44 |
!ClassPrimitiveChange methodsFor:'accessing'! |
|
45 |
||
46 |
class:aClass source:newSource |
|
1470 | 47 |
self assert:(newSource isString). |
1286 | 48 |
|
49 |
className := aClass name. |
|
782 | 50 |
source := newSource |
51 |
||
52 |
"Created: 3.12.1995 / 14:02:40 / cg" |
|
53 |
"Modified: 3.12.1995 / 14:06:33 / cg" |
|
54 |
! ! |
|
55 |
||
2370 | 56 |
!ClassPrimitiveChange methodsFor:'applying'! |
57 |
||
58 |
apply |
|
59 |
"apply the change" |
|
60 |
||
61 |
|class| |
|
62 |
||
63 |
class := self changeClass. |
|
64 |
class isNil ifTrue:[ |
|
65 |
self error:('Cannot apply change for missing class: ' , className) mayProceed:true. |
|
66 |
^ self |
|
67 |
]. |
|
68 |
class autoload. "Most changes cannot be applied to unloaded classes" |
|
69 |
Class nameSpaceQuerySignal answer:self nameSpace do:[ |
|
70 |
self privateApply |
|
71 |
]. |
|
72 |
||
73 |
"Created: / 28-06-2011 / 22:58:53 / cg" |
|
74 |
! |
|
75 |
||
76 |
privateApply |
|
77 |
self subclassResponsibility |
|
78 |
||
79 |
"Created: / 28-06-2011 / 22:58:59 / cg" |
|
80 |
! ! |
|
81 |
||
798 | 82 |
!ClassPrimitiveChange methodsFor:'comparing'! |
83 |
||
84 |
sameAs:changeB |
|
85 |
"return true, if the given change represents the same change as the receiver." |
|
86 |
||
87 |
(self isForSameAs:changeB) ifFalse:[^ false]. |
|
88 |
^ self sameSourceAs:changeB |
|
89 |
||
90 |
! ! |
|
91 |
||
3501
2ec70319140a
category change for isXXX testers;
Claus Gittinger <cg@exept.de>
parents:
2370
diff
changeset
|
92 |
!ClassPrimitiveChange methodsFor:'testing'! |
782 | 93 |
|
94 |
isPrimitiveChange |
|
95 |
^ true |
|
96 |
! ! |
|
97 |
||
98 |
!ClassPrimitiveChange class methodsFor:'documentation'! |
|
99 |
||
100 |
version |
|
3501
2ec70319140a
category change for isXXX testers;
Claus Gittinger <cg@exept.de>
parents:
2370
diff
changeset
|
101 |
^ '$Header: /cvs/stx/stx/libbasic3/ClassPrimitiveChange.st,v 1.8 2014-02-19 13:05:43 cg Exp $' |
2370 | 102 |
! |
103 |
||
104 |
version_CVS |
|
3501
2ec70319140a
category change for isXXX testers;
Claus Gittinger <cg@exept.de>
parents:
2370
diff
changeset
|
105 |
^ '$Header: /cvs/stx/stx/libbasic3/ClassPrimitiveChange.st,v 1.8 2014-02-19 13:05:43 cg Exp $' |
782 | 106 |
! ! |
3501
2ec70319140a
category change for isXXX testers;
Claus Gittinger <cg@exept.de>
parents:
2370
diff
changeset
|
107 |