author | Jan Vrany <jan.vrany@fit.cvut.cz> |
Thu, 31 May 2018 10:52:50 +0100 | |
branch | jv |
changeset 4330 | 998eb03f0736 |
parent 3850 | 461c0b054a4f |
permissions | -rw-r--r-- |
3850
461c0b054a4f
Added Bee source writer (both for inidividual classes and for project sources)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3681
diff
changeset
|
1 |
" |
461c0b054a4f
Added Bee source writer (both for inidividual classes and for project sources)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3681
diff
changeset
|
2 |
COPYRIGHT (c) 2006 by eXept Software AG |
461c0b054a4f
Added Bee source writer (both for inidividual classes and for project sources)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3681
diff
changeset
|
3 |
All Rights Reserved |
461c0b054a4f
Added Bee source writer (both for inidividual classes and for project sources)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3681
diff
changeset
|
4 |
|
461c0b054a4f
Added Bee source writer (both for inidividual classes and for project sources)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3681
diff
changeset
|
5 |
This software is furnished under a license and may be used |
461c0b054a4f
Added Bee source writer (both for inidividual classes and for project sources)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3681
diff
changeset
|
6 |
only in accordance with the terms of that license and with the |
461c0b054a4f
Added Bee source writer (both for inidividual classes and for project sources)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3681
diff
changeset
|
7 |
inclusion of the above copyright notice. This software may not |
461c0b054a4f
Added Bee source writer (both for inidividual classes and for project sources)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3681
diff
changeset
|
8 |
be provided or otherwise made available to, or used by, any |
461c0b054a4f
Added Bee source writer (both for inidividual classes and for project sources)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3681
diff
changeset
|
9 |
other person. No title to or ownership of the software is |
461c0b054a4f
Added Bee source writer (both for inidividual classes and for project sources)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3681
diff
changeset
|
10 |
hereby transferred. |
461c0b054a4f
Added Bee source writer (both for inidividual classes and for project sources)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3681
diff
changeset
|
11 |
" |
3522 | 12 |
"{ Package: 'stx:libbasic3' }" |
13 |
||
3850
461c0b054a4f
Added Bee source writer (both for inidividual classes and for project sources)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3681
diff
changeset
|
14 |
"{ NameSpace: Smalltalk }" |
461c0b054a4f
Added Bee source writer (both for inidividual classes and for project sources)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3681
diff
changeset
|
15 |
|
3522 | 16 |
ClassChange subclass:#ClassInitializeChange |
17 |
instanceVariableNames:'' |
|
18 |
classVariableNames:'' |
|
19 |
poolDictionaries:'' |
|
20 |
category:'System-Changes' |
|
21 |
! |
|
22 |
||
23 |
!ClassInitializeChange class methodsFor:'documentation'! |
|
24 |
||
3850
461c0b054a4f
Added Bee source writer (both for inidividual classes and for project sources)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3681
diff
changeset
|
25 |
copyright |
461c0b054a4f
Added Bee source writer (both for inidividual classes and for project sources)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3681
diff
changeset
|
26 |
" |
461c0b054a4f
Added Bee source writer (both for inidividual classes and for project sources)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3681
diff
changeset
|
27 |
COPYRIGHT (c) 2006 by eXept Software AG |
461c0b054a4f
Added Bee source writer (both for inidividual classes and for project sources)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3681
diff
changeset
|
28 |
All Rights Reserved |
461c0b054a4f
Added Bee source writer (both for inidividual classes and for project sources)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3681
diff
changeset
|
29 |
|
461c0b054a4f
Added Bee source writer (both for inidividual classes and for project sources)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3681
diff
changeset
|
30 |
This software is furnished under a license and may be used |
461c0b054a4f
Added Bee source writer (both for inidividual classes and for project sources)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3681
diff
changeset
|
31 |
only in accordance with the terms of that license and with the |
461c0b054a4f
Added Bee source writer (both for inidividual classes and for project sources)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3681
diff
changeset
|
32 |
inclusion of the above copyright notice. This software may not |
461c0b054a4f
Added Bee source writer (both for inidividual classes and for project sources)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3681
diff
changeset
|
33 |
be provided or otherwise made available to, or used by, any |
461c0b054a4f
Added Bee source writer (both for inidividual classes and for project sources)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3681
diff
changeset
|
34 |
other person. No title to or ownership of the software is |
461c0b054a4f
Added Bee source writer (both for inidividual classes and for project sources)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3681
diff
changeset
|
35 |
hereby transferred. |
461c0b054a4f
Added Bee source writer (both for inidividual classes and for project sources)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3681
diff
changeset
|
36 |
" |
461c0b054a4f
Added Bee source writer (both for inidividual classes and for project sources)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3681
diff
changeset
|
37 |
! |
461c0b054a4f
Added Bee source writer (both for inidividual classes and for project sources)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3681
diff
changeset
|
38 |
|
3522 | 39 |
documentation |
40 |
" |
|
41 |
Change for class initialization chunk. Unlike DoItChange, |
|
42 |
ClassInitializeChange handles namespaces and private classes |
|
43 |
properly. |
|
44 |
||
45 |
[author:] |
|
46 |
Jan Vrany <jan.vrany@fit.cvut.cz> |
|
47 |
||
48 |
[instance variables:] |
|
49 |
||
50 |
[class variables:] |
|
51 |
||
52 |
[see also:] |
|
53 |
||
54 |
" |
|
55 |
! ! |
|
56 |
||
57 |
!ClassInitializeChange methodsFor:'accessing'! |
|
58 |
||
59 |
source |
|
60 |
"return the source of the change" |
|
61 |
||
62 |
source isNil ifTrue:[ |
|
63 |
^ String streamContents:[ :s | |
|
64 |
(nameSpaceName notNil and:[ nameSpaceName ~= 'Smalltalk' ]) ifTrue:[ |
|
65 |
s nextPutAll: '"{ NameSpace: '; nextPutAll: nameSpaceName; nextPutAll: ' }"'; cr; cr. |
|
66 |
s nextPutAll: self className; nextPutAll: ' initialize!!'; cr. |
|
67 |
]. |
|
68 |
] |
|
69 |
]. |
|
70 |
^ source |
|
71 |
||
72 |
"Created: / 21-03-2014 / 17:43:30 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
73 |
! ! |
|
74 |
||
75 |
!ClassInitializeChange methodsFor:'applying'! |
|
76 |
||
77 |
apply |
|
78 |
"apply the change" |
|
79 |
||
80 |
| class | |
|
81 |
||
82 |
class := self changeClass. |
|
83 |
class isNil ifTrue:[ |
|
84 |
self error:('Class %1 does not (yet?) exists' bindWith: self fullClassName). |
|
85 |
^ self. |
|
86 |
]. |
|
87 |
class initialize. |
|
88 |
||
89 |
"Created: / 21-03-2014 / 17:38:37 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
90 |
! ! |
|
91 |
||
3532 | 92 |
!ClassInitializeChange methodsFor:'comparing'! |
93 |
||
94 |
sameAs:changeB |
|
95 |
"return true, if the given change represents the same change as the receiver." |
|
96 |
||
97 |
^ (changeB isKindOf: self class) |
|
98 |
and:[ self fullClassName = changeB fullClassName ] |
|
99 |
||
100 |
"Created: / 26-03-2014 / 17:41:25 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
101 |
! ! |
|
102 |
||
3681
026411d4acce
class: ClassInitializeChange
Claus Gittinger <cg@exept.de>
parents:
3532
diff
changeset
|
103 |
!ClassInitializeChange methodsFor:'printing & storing'! |
026411d4acce
class: ClassInitializeChange
Claus Gittinger <cg@exept.de>
parents:
3532
diff
changeset
|
104 |
|
026411d4acce
class: ClassInitializeChange
Claus Gittinger <cg@exept.de>
parents:
3532
diff
changeset
|
105 |
printOn:aStream |
026411d4acce
class: ClassInitializeChange
Claus Gittinger <cg@exept.de>
parents:
3532
diff
changeset
|
106 |
aStream nextPutAll:self source |
026411d4acce
class: ClassInitializeChange
Claus Gittinger <cg@exept.de>
parents:
3532
diff
changeset
|
107 |
! ! |
026411d4acce
class: ClassInitializeChange
Claus Gittinger <cg@exept.de>
parents:
3532
diff
changeset
|
108 |
|
3532 | 109 |
!ClassInitializeChange methodsFor:'testing'! |
110 |
||
111 |
isClassInitializeChange |
|
112 |
^ true |
|
113 |
! ! |
|
114 |
||
3522 | 115 |
!ClassInitializeChange class methodsFor:'documentation'! |
116 |
||
117 |
version |
|
3681
026411d4acce
class: ClassInitializeChange
Claus Gittinger <cg@exept.de>
parents:
3532
diff
changeset
|
118 |
^ '$Header: /cvs/stx/stx/libbasic3/ClassInitializeChange.st,v 1.3 2014-12-11 20:47:09 cg Exp $' |
3522 | 119 |
! |
120 |
||
121 |
version_CVS |
|
3681
026411d4acce
class: ClassInitializeChange
Claus Gittinger <cg@exept.de>
parents:
3532
diff
changeset
|
122 |
^ '$Header: /cvs/stx/stx/libbasic3/ClassInitializeChange.st,v 1.3 2014-12-11 20:47:09 cg Exp $' |
3522 | 123 |
! ! |
124 |