1444
|
1 |
"
|
|
2 |
COPYRIGHT (c) 2003 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 |
"
|
|
12 |
|
1226
|
13 |
"{ Package: 'stx:libbasic3' }"
|
|
14 |
|
|
15 |
"{ NameSpace: Packages }"
|
|
16 |
|
|
17 |
Package subclass:#DefaultPackage
|
|
18 |
instanceVariableNames:''
|
|
19 |
classVariableNames:''
|
|
20 |
poolDictionaries:''
|
|
21 |
category:'Package'
|
|
22 |
!
|
|
23 |
|
1444
|
24 |
!DefaultPackage class methodsFor:'documentation'!
|
|
25 |
|
|
26 |
copyright
|
|
27 |
"
|
|
28 |
COPYRIGHT (c) 2003 by eXept Software AG
|
|
29 |
All Rights Reserved
|
|
30 |
|
|
31 |
This software is furnished under a license and may be used
|
|
32 |
only in accordance with the terms of that license and with the
|
|
33 |
inclusion of the above copyright notice. This software may not
|
|
34 |
be provided or otherwise made available to, or used by, any
|
|
35 |
other person. No title to or ownership of the software is
|
|
36 |
hereby transferred.
|
|
37 |
"
|
|
38 |
! !
|
1226
|
39 |
|
|
40 |
!DefaultPackage methodsFor:'changes'!
|
|
41 |
|
|
42 |
classChange:classChange
|
|
43 |
| newClass |
|
|
44 |
newClass := (Smalltalk classNamed:classChange className).
|
|
45 |
newClass ifNil:[
|
|
46 |
self error:'The class named ', newClass name,
|
|
47 |
'does not exist!! It is expected to exist from a class change!!'
|
|
48 |
].
|
|
49 |
|
|
50 |
self addedClass:newClass.
|
|
51 |
self changed:#classChange: with:classChange
|
|
52 |
!
|
|
53 |
|
|
54 |
classDefinitionChange:aClassDefinitionChange
|
|
55 |
| newClass |
|
|
56 |
newClass := (Smalltalk classNamed:aClassDefinitionChange className).
|
|
57 |
newClass ifNil:[
|
|
58 |
self error:'The class named ', newClass name,
|
|
59 |
'does not exist!! It is expected to exist from a class redefinition action!!'
|
|
60 |
].
|
|
61 |
|
|
62 |
self addedClass:newClass.
|
|
63 |
self changed:#classDefinitionChange: with:aClassDefinitionChange
|
|
64 |
!
|
|
65 |
|
|
66 |
classInstVarDefinitionChange:aClassInstVarDefinitionChange
|
|
67 |
|
|
68 |
| newClass |
|
|
69 |
newClass := (Smalltalk classNamed:aClassInstVarDefinitionChange className).
|
|
70 |
newClass ifNil:[
|
|
71 |
self error:'The class named ', newClass name,
|
|
72 |
'does not exist!! It is expected to exist from a class redefinition action!!'
|
|
73 |
].
|
|
74 |
|
|
75 |
self addedClass:newClass.
|
|
76 |
self changed:#classDefinitionChange: with:aClassInstVarDefinitionChange
|
|
77 |
!
|
|
78 |
|
|
79 |
classRemoveChange:aClassRemoveChange
|
|
80 |
|
|
81 |
self removedClassNamed:aClassRemoveChange className.
|
|
82 |
self changed:#classRemoveChange: with:aClassRemoveChange
|
|
83 |
!
|
|
84 |
|
|
85 |
methodChanged:aMethodChange
|
|
86 |
"a method as changed. The receiver must be responsible for all changes to the image
|
|
87 |
so if it is not. make sure it does now!!"
|
|
88 |
|aMethodName aClassName aMethod |
|
|
89 |
aMethodName := aMethodChange selector.
|
|
90 |
aClassName := aMethodChange className asSymbol.
|
|
91 |
aMethod := (Smalltalk classNamed:aClassName) compiledMethodAt:aMethodName.
|
|
92 |
|
|
93 |
self addedMethod:aMethod.
|
|
94 |
self changed:#methodChanged: with:aMethodChange
|
|
95 |
!
|
|
96 |
|
|
97 |
methodRemoveChange:aMethodRemoveChange
|
|
98 |
|
|
99 |
self removedMethodNamed:aMethodRemoveChange selector forClassNamed:aMethodRemoveChange className.
|
|
100 |
self changed:#methodRemoveChange: with:aMethodRemoveChange
|
|
101 |
! !
|
|
102 |
|
|
103 |
!DefaultPackage methodsFor:'queries'!
|
|
104 |
|
|
105 |
isDependentOnClassChange:classChange
|
|
106 |
"checks to see if the receiver is affected by the change. returns a boolean
|
|
107 |
"
|
|
108 |
^ classChange changeClass package == name
|
|
109 |
"/ ^ (super isDependentOnClassChange:classChange) not
|
|
110 |
!
|
|
111 |
|
|
112 |
isDependentOnClassDefinitionChange:aClassDefinitionChange
|
|
113 |
^ aClassDefinitionChange changeClass package == name "and:[
|
|
114 |
(super isDependentOnClassDefinitionChange:aClassDefinitionChange) not
|
|
115 |
] "
|
|
116 |
|
|
117 |
!
|
|
118 |
|
|
119 |
isDependentOnClassInstVarDefinitionChange:aClassInstVarDefinitionChange
|
|
120 |
^ aClassInstVarDefinitionChange changeClass package == name
|
|
121 |
|
|
122 |
"/ ^ (super isDependentOnClassInstVarDefinitionChange:aClassInstVarDefinitionChange) not
|
|
123 |
!
|
|
124 |
|
|
125 |
isDependentOnClassRemoveChange:aClassRemoveChange
|
|
126 |
| classBeingRemoved |
|
|
127 |
classBeingRemoved := ClassRemoveChange::ClassBeingRemovedQuery query.
|
|
128 |
^ classBeingRemoved package == name
|
|
129 |
|
|
130 |
"/ ^ (super isDependentOnClassRemoveChange:aClassRemoveChange)
|
|
131 |
!
|
|
132 |
|
|
133 |
isDependentOnClassRenameChange:classChange
|
|
134 |
|
|
135 |
^ classChange changeClass package == name
|
|
136 |
"/ ^ (super isDependentOnClassRenameChange:classChange) not
|
|
137 |
!
|
|
138 |
|
|
139 |
isDependentOnMethodCategoryChange:aMethodRemoveChange
|
|
140 |
^ (super isDependentOnMethodCategoryChange:aMethodRemoveChange)
|
|
141 |
!
|
|
142 |
|
|
143 |
isDependentOnMethodCategoryRenameChange:aMethodRemoveChange
|
|
144 |
^ (super isDependentOnMethodCategoryRenameChange:aMethodRemoveChange)
|
|
145 |
!
|
|
146 |
|
|
147 |
isDependentOnMethodChange:aMethodChange
|
|
148 |
^ (super isDependentOnMethodChange:aMethodChange) not
|
|
149 |
!
|
|
150 |
|
|
151 |
isDependentOnMethodRemoveChange:aMethodRemoveChange
|
|
152 |
^ (super isDependentOnMethodRemoveChange:aMethodRemoveChange) not
|
|
153 |
! !
|
|
154 |
|
|
155 |
!DefaultPackage class methodsFor:'documentation'!
|
|
156 |
|
|
157 |
version
|
1444
|
158 |
^ '$Header: /cvs/stx/stx/libbasic3/packages/DefaultPackage.st,v 1.2 2006-01-10 09:29:41 cg Exp $'
|
1226
|
159 |
! !
|