author | Claus Gittinger <cg@exept.de> |
Mon, 04 Feb 2002 15:31:14 +0100 | |
changeset 6376 | 6a3ce5694cc9 |
parent 6192 | ab760a607762 |
child 6557 | c0d0ebb1f709 |
permissions | -rw-r--r-- |
89 | 1 |
" |
236 | 2 |
COPYRIGHT (c) 1993 by Claus Gittinger |
203 | 3 |
All Rights Reserved |
89 | 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 |
" |
|
1 | 12 |
|
5371
6376d1fcf30f
use #allSelectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents:
5338
diff
changeset
|
13 |
"{ Package: 'stx:libbasic' }" |
6376d1fcf30f
use #allSelectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents:
5338
diff
changeset
|
14 |
|
1 | 15 |
Object subclass:#Project |
939
ffee570b0f09
added #setProject: (does not send change notifications)
Claus Gittinger <cg@exept.de>
parents:
848
diff
changeset
|
16 |
instanceVariableNames:'name changeSet views directoryName properties packageName |
4726 | 17 |
repositoryDirectory repositoryModule overwrittenMethods |
5150
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
18 |
subProjects prerequisites isLoaded changedClasses' |
4685
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
19 |
classVariableNames:'CurrentProject SystemProject NextSequential AllProjects |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
20 |
LoadedProjects' |
939
ffee570b0f09
added #setProject: (does not send change notifications)
Claus Gittinger <cg@exept.de>
parents:
848
diff
changeset
|
21 |
poolDictionaries:'' |
ffee570b0f09
added #setProject: (does not send change notifications)
Claus Gittinger <cg@exept.de>
parents:
848
diff
changeset
|
22 |
category:'System-Support' |
1 | 23 |
! |
24 |
||
5734 | 25 |
Object subclass:#ClassInfo |
26 |
instanceVariableNames:'conditionForInclusion className classFileName' |
|
4668 | 27 |
classVariableNames:'' |
28 |
poolDictionaries:'' |
|
29 |
privateIn:Project |
|
30 |
! |
|
31 |
||
5734 | 32 |
Object subclass:#MethodInfo |
33 |
instanceVariableNames:'conditionForInclusion methodName className fileName' |
|
3996
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
34 |
classVariableNames:'' |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
35 |
poolDictionaries:'' |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
36 |
privateIn:Project |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
37 |
! |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
38 |
|
1854
b44227fd2b3d
use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents:
1636
diff
changeset
|
39 |
!Project class methodsFor:'documentation'! |
89 | 40 |
|
41 |
copyright |
|
42 |
" |
|
43 |
COPYRIGHT (c) 1993 by Claus Gittinger |
|
203 | 44 |
All Rights Reserved |
89 | 45 |
|
46 |
This software is furnished under a license and may be used |
|
47 |
only in accordance with the terms of that license and with the |
|
48 |
inclusion of the above copyright notice. This software may not |
|
49 |
be provided or otherwise made available to, or used by, any |
|
50 |
other person. No title to or ownership of the software is |
|
51 |
hereby transferred. |
|
52 |
" |
|
53 |
! |
|
54 |
||
55 |
documentation |
|
56 |
" |
|
338 | 57 |
this class is still under construction (especially the build features are unfinished). |
235 | 58 |
Currently, all it does is keep track of per-project views |
59 |
(to hide or show them), define the directory when filing-out, |
|
725
02759b2003a8
keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
60 |
and define packageNames for new classes and methods. |
02759b2003a8
keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
61 |
|
02759b2003a8
keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
62 |
instance variables: |
4814
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
63 |
name <String> the name of this project, as shown |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
64 |
in a ProjectView |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
65 |
|
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
66 |
changeSet <ChangeSet> changes done, while this was the active project |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
67 |
|
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
68 |
views <Collection> views opened while this was the active project |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
69 |
|
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
70 |
directoryName <String> directory name, where fileOuts are done |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
71 |
|
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
72 |
properties |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
73 |
|
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
74 |
packageName <String> given to classes/methods which are created while |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
75 |
this is the active project |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
76 |
|
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
77 |
repositoryDirectory (default) name of the repository, when a new source containers are |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
78 |
created. |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
79 |
|
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
80 |
repositoryModule (default) name of the module, when new source containers are |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
81 |
created. |
235 | 82 |
|
83 |
Future: |
|
4814
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
84 |
- keep track of per-project changes |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
85 |
- allow speficiation of the type of the project (application or library) |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
86 |
- allow building of whatever the target (as defined by the type) is |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
87 |
(this will allow build of class libs and apps by clicking a button) |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
88 |
- allow removal of project specific classes, methods etc. |
1286 | 89 |
|
90 |
[author:] |
|
4814
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
91 |
Claus Gittinger |
89 | 92 |
" |
93 |
! ! |
|
94 |
||
1854
b44227fd2b3d
use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents:
1636
diff
changeset
|
95 |
!Project class methodsFor:'initialization'! |
236 | 96 |
|
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
97 |
initKnownProjects |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
98 |
"this is a temporary experimental kludge - |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
99 |
once the ProjectBrowser is finished, this info is read from |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
100 |
'.prj' files ..." |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
101 |
|
4668 | 102 |
"/ collect project info while scanning all classes |
103 |
"/ and methods ... |
|
104 |
||
105 |
AllProjects isNil ifTrue:[ |
|
5547 | 106 |
AllProjects := IdentitySet new. |
4668 | 107 |
]. |
5547 | 108 |
|
109 |
AllProjects add:SystemProject. |
|
110 |
AllProjects add:CurrentProject. |
|
111 |
||
4912 | 112 |
"/ Smalltalk allClassesDo:[:aClass | |
113 |
"/ |packageID prj classFilename pkgInfo revInfo |
|
114 |
"/ repositoryPath dir module lib nm| |
|
115 |
"/ |
|
116 |
"/ aClass isMeta ifFalse:[ |
|
117 |
"/ (aClass isNamespace not or:[aClass == Smalltalk]) ifTrue:[ |
|
118 |
"/ (Smalltalk at:aClass name) == aClass ifFalse:[ |
|
119 |
"/ Transcript showCR:'skipping obsolete/removed class: ' , aClass name. |
|
120 |
"/ ] ifTrue:[ |
|
121 |
"/ packageID := aClass package asSymbol. |
|
122 |
"/ (packages includesKey:packageID) ifFalse:[ |
|
123 |
"/ |
|
124 |
"/ "/ a new one ... |
|
125 |
"/ |
|
126 |
"/ prj := self new. |
|
127 |
"/ prj package:packageID. |
|
128 |
"/ prj directory:'???'. |
|
129 |
"/ prj repositoryModule:'unknown'. |
|
130 |
"/ prj repositoryDirectory:'unknown'. |
|
131 |
"/ |
|
132 |
"/ nm := 'unknown'. |
|
133 |
"/ |
|
134 |
"/ pkgInfo := aClass packageSourceCodeInfo. |
|
135 |
"/ pkgInfo notNil ifTrue:[ |
|
136 |
"/ module := pkgInfo at:#module ifAbsent:nil. |
|
137 |
"/ module notNil ifTrue:[ |
|
138 |
"/ prj repositoryModule:module |
|
139 |
"/ ]. |
|
140 |
"/ dir := pkgInfo at:#directory ifAbsent:nil. |
|
141 |
"/ dir notNil ifTrue:[ |
|
142 |
"/ prj repositoryDirectory:dir |
|
143 |
"/ ]. |
|
144 |
"/ lib := pkgInfo at:#library ifAbsent:nil. |
|
145 |
"/ lib notNil ifTrue:[ |
|
146 |
"/ prj type:#library. |
|
147 |
"/ ]. |
|
148 |
"/ prj isLoaded:true. |
|
149 |
"/ ]. |
|
150 |
"/ |
|
151 |
"/ nm := (module ? 'unknown') |
|
152 |
"/ , ':' |
|
153 |
"/ , (dir ? (lib ? 'unknown')). |
|
154 |
"/ |
|
155 |
"/ prj name:nm. |
|
156 |
"/ AllProjects add:prj. |
|
157 |
"/ packages at:packageID put:prj. |
|
158 |
"/ ] ifTrue:[ |
|
159 |
"/ prj := packages at:packageID. |
|
160 |
"/ prj addClass:aClass. |
|
161 |
"/ ]. |
|
162 |
"/ ]. |
|
163 |
"/ ]. |
|
164 |
"/ ]. |
|
165 |
"/ ]. |
|
166 |
"/ |
|
167 |
"/ Method allSubInstancesDo:[:aMethod | |
|
168 |
"/ |packageID prj who mthdClass| |
|
169 |
"/ |
|
170 |
"/ who := aMethod who. |
|
171 |
"/ who notNil ifTrue:[ "/ skip unbound methods ... |
|
172 |
"/ packageID := aMethod package asSymbol. |
|
173 |
"/ (packages includesKey:packageID) ifFalse:[ |
|
174 |
"/ "/ a new one ... |
|
175 |
"/ prj := self new. |
|
176 |
"/ "/ prj name:libName. |
|
177 |
"/ prj package:packageID. |
|
178 |
"/ prj type:#library. |
|
179 |
"/ prj directory:'???'. |
|
180 |
"/ prj repositoryModule:'stx'. |
|
181 |
"/ prj repositoryDirectory:'???'. |
|
182 |
"/ prj isLoaded:true. |
|
183 |
"/ AllProjects add:prj. |
|
184 |
"/ packages at:packageID put:prj. |
|
185 |
"/ ] ifTrue:[ |
|
186 |
"/ "/ see if the methods class is in the project; |
|
187 |
"/ "/ if so, remove any patch-entry for this method. |
|
188 |
"/ prj := packages at:packageID. |
|
189 |
"/ ((prj classes includes:who methodClass) |
|
190 |
"/ or:[prj classes includes:who methodClass name]) ifTrue:[ |
|
191 |
"/ prj removeMethod:aMethod. |
|
192 |
"/ ] |
|
193 |
"/ ] |
|
194 |
"/ ] |
|
195 |
"/ ]. |
|
196 |
"/ |
|
197 |
"/ "/ walk over binary modules, to find out directory names ... |
|
198 |
"/ |
|
199 |
"/ ObjectFileLoader loadedObjectHandles do:[:h | |
|
200 |
"/ |cls prj mDir| |
|
201 |
"/ |
|
202 |
"/ cls := h classes firstIfEmpty:nil. |
|
203 |
"/ cls notNil ifTrue:[ |
|
204 |
"/ prj := packages at:cls package ifAbsent:nil. |
|
205 |
"/ prj notNil ifTrue:[ |
|
206 |
"/ mDir := h pathName asFilename directory pathName. |
|
207 |
"/ prj directory = '???' ifTrue:[ |
|
208 |
"/ prj directory:mDir |
|
209 |
"/ ] ifFalse:[ |
|
210 |
"/ prj directory ~= mDir ifTrue:[ |
|
211 |
"/ ('Project [warning]: conflicting project directories for ' , cls package) infoPrintCR. |
|
212 |
"/ ] |
|
213 |
"/ ] |
|
214 |
"/ ] |
|
215 |
"/ ]. |
|
216 |
"/ ]. |
|
217 |
"/ |
|
218 |
"/ self changed:#allProjects |
|
219 |
||
220 |
||
221 |
||
222 |
||
4668 | 223 |
|
4066 | 224 |
"/ |stx p| |
225 |
"/ |
|
226 |
"/ stx := self new name:'stx'. |
|
227 |
"/ stx packageName:'noPackage'. |
|
228 |
"/ stx changeSet:nil. |
|
229 |
"/ stx type:#smalltalk. |
|
230 |
"/ stx comment:'The ST/X project itself'. |
|
231 |
"/ |
|
232 |
"/ AllProjects add:stx. |
|
233 |
"/ |
|
234 |
"/ #( |
|
235 |
"/ ('libbasic' #'stx:libbasic' 'Basic (non-GUI) classes. Required for all applications') |
|
236 |
"/ ('libbasic2' #'stx:libbasic2' 'More basic (non-GUI) classes. Required for most applications') |
|
237 |
"/ ('libbasic3' #'stx:libbasic3' 'More basic (non-GUI) classes. Required for development') |
|
238 |
"/ ('libcomp' #'stx:libcomp' 'The bytecode compiler. Required for all applications') |
|
239 |
"/ ('libview' #'stx:libview' 'Low level GUI classes. Required for all GUI applications') |
|
240 |
"/ ('libview2' #'stx:libview2' 'Additional low level GUI classes. Required for most GUI applications') |
|
241 |
"/ ('libwidg' #'stx:libwidg' 'Basic widgets. Required for all GUI applications') |
|
242 |
"/ ('libwidg2' #'stx:libwidg2' 'More widgets. Required for most GUI applications') |
|
243 |
"/ ('libwidg3' #'stx:libwidg3' 'More (fun) widgets. Seldom required') |
|
244 |
"/ ('libtool' #'stx:libtool' 'Development applications. Required for program development') |
|
245 |
"/ ('libtool2' #'stx:libtool2' 'More development applications. Required for GUI development') |
|
246 |
"/ ('libui' #'stx:libui' 'UI spec classes. Required for UIPainter applications') |
|
247 |
"/ ('libhtml' #'stx:libhtml' 'HTML related classes. Required for Web applications and the HTML browser') |
|
248 |
"/ ('libodbc' #'stx:libodbc' 'ODBC interface classes.') |
|
249 |
"/ ('libopengl' #'stx:libopengl' 'OpenGL interface classes.') |
|
250 |
"/ ('persistency' #'stx:goodies/persistency' 'Simple DB interface') |
|
251 |
"/ ('goodies' #'stx:goodies' 'Misc goodies - not really maintained') |
|
252 |
"/ ) do:[:entry | |
|
253 |
"/ |libName package comment| |
|
254 |
"/ |
|
255 |
"/ libName := entry at:1. |
|
256 |
"/ package := entry at:2. |
|
257 |
"/ comment := entry at:3. |
|
258 |
"/ |
|
259 |
"/ p := self new name:libName. |
|
260 |
"/ p packageName:package. |
|
261 |
"/ p type:#library. |
|
262 |
"/ p comment:comment. |
|
263 |
"/ stx addSubProject:p. |
|
264 |
"/ ]. |
|
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
265 |
|
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
266 |
" |
4668 | 267 |
AllProjects := nil. |
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
268 |
self initKnownProjects |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
269 |
" |
4069 | 270 |
|
4912 | 271 |
"Modified: / 16.10.1999 / 13:10:37 / cg" |
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
272 |
! |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
273 |
|
236 | 274 |
initialize |
338 | 275 |
SystemProject isNil ifTrue:[ |
5547 | 276 |
self initializeSystemProject. |
338 | 277 |
]. |
278 |
||
279 |
CurrentProject := SystemProject. |
|
4685
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
280 |
AllProjects := nil. |
5547 | 281 |
self initKnownProjects. |
236 | 282 |
|
315 | 283 |
" |
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
284 |
SystemProject := nil. |
315 | 285 |
Project initialize |
286 |
" |
|
4886 | 287 |
! |
288 |
||
5547 | 289 |
initializeSystemProject |
290 |
NextSequential := 1. |
|
291 |
SystemProject := self new name:'default'. |
|
292 |
"/ SystemProject package:(OperatingSystem getLoginName , ':NoProject') asSymbol. |
|
293 |
SystemProject package:#'__NoProject__'. |
|
294 |
SystemProject defaultNameSpace:Smalltalk. |
|
295 |
SystemProject comment:'A default (dummy) project. |
|
296 |
Is used as the current project in case no real project is ever activated. |
|
297 |
Please do never save/checkin this project; instead, move classes & methods |
|
298 |
into a concrete, real project and save that one in regular intervals. |
|
299 |
Use this as a `scratch project''. |
|
300 |
'. |
|
301 |
||
302 |
"/ no longer - changes are always remembered in some project |
|
303 |
false ifTrue:[ |
|
304 |
" |
|
305 |
the SystemProject does not keep a record if changes, |
|
306 |
but instead depends on the changes file - recording anything there. |
|
307 |
" |
|
308 |
SystemProject changeSet:nil. |
|
309 |
]. |
|
310 |
ChangeSet notNil ifTrue:[ |
|
311 |
SystemProject changeSet:ChangeSet new |
|
312 |
]. |
|
313 |
self changed:#defaultProject |
|
314 |
! |
|
315 |
||
4886 | 316 |
reinitKnownProjects |
317 |
"rescan the image for projects" |
|
318 |
||
319 |
AllProjects := nil. |
|
320 |
self initKnownProjects |
|
236 | 321 |
! ! |
322 |
||
1854
b44227fd2b3d
use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents:
1636
diff
changeset
|
323 |
!Project class methodsFor:'instance creation'! |
236 | 324 |
|
325 |
new |
|
326 |
^ self basicNew initialize |
|
327 |
! ! |
|
328 |
||
1854
b44227fd2b3d
use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents:
1636
diff
changeset
|
329 |
!Project class methodsFor:'accessing'! |
1 | 330 |
|
4071 | 331 |
addKnownProject:aProject |
4685
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
332 |
|allProjects| |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
333 |
|
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
334 |
allProjects := self knownProjects. |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
335 |
(allProjects detect:[:p | p package = aProject package] ifNone:nil) notNil ifTrue:[ |
4814
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
336 |
self warn:'Project for ' , aProject package , ' is already present.'. |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
337 |
^ self. |
4071 | 338 |
]. |
4685
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
339 |
|
4071 | 340 |
AllProjects add:aProject. |
341 |
self changed:#allProjects |
|
342 |
! |
|
343 |
||
4685
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
344 |
addLoadedProject:aProject |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
345 |
aProject isLoaded:true. |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
346 |
self addKnownProject:aProject. |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
347 |
! |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
348 |
|
1 | 349 |
current |
10 | 350 |
"return the currently active project" |
351 |
||
5692 | 352 |
CurrentProject isNil ifTrue:[CurrentProject := SystemProject ]. |
1 | 353 |
^ CurrentProject |
354 |
||
362 | 355 |
" |
356 |
Project current |
|
357 |
" |
|
1 | 358 |
! |
359 |
||
360 |
current:aProject |
|
10 | 361 |
"set the currently active project" |
362 |
||
5542 | 363 |
|prevProject| |
364 |
||
365 |
prevProject := CurrentProject. |
|
315 | 366 |
CurrentProject := aProject. |
5542 | 367 |
prevProject notNil ifTrue:[ |
368 |
self changed:#currentProject |
|
369 |
]. |
|
334 | 370 |
! |
371 |
||
617 | 372 |
currentPackageName |
373 |
CurrentProject notNil ifTrue:[ |
|
4814
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
374 |
^ CurrentProject package |
617 | 375 |
]. |
4112
5ee841c34b10
return nil (instead of 'no package') if no current package is defined.
Claus Gittinger <cg@exept.de>
parents:
4099
diff
changeset
|
376 |
^ nil |
617 | 377 |
|
378 |
" |
|
379 |
Project currentPackageName |
|
380 |
" |
|
381 |
! |
|
382 |
||
336 | 383 |
defaultProject |
384 |
"return the SystemDefault project" |
|
385 |
||
386 |
^ SystemProject. |
|
6032 | 387 |
|
388 |
" |
|
389 |
Project defaultProject package |
|
390 |
" |
|
336 | 391 |
! |
392 |
||
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
393 |
knownProjects |
4685
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
394 |
AllProjects isNil ifTrue:[ |
4814
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
395 |
self initKnownProjects |
4685
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
396 |
]. |
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
397 |
^ AllProjects ? #() |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
398 |
! |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
399 |
|
4685
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
400 |
loadedProjects |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
401 |
^ self knownProjects select:[:p | p isLoaded] |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
402 |
! |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
403 |
|
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
404 |
projectNamed:aProjectName |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
405 |
"retrieve the named project; return nil if not known" |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
406 |
|
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
407 |
^ self knownProjects detect:[:p | p name = aProjectName] ifNone:nil. |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
408 |
|
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
409 |
" |
5547 | 410 |
Project projectNamed:'stx' |
411 |
Project projectNamed:'default' |
|
4685
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
412 |
" |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
413 |
! |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
414 |
|
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
415 |
projectWithId:aPackageId |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
416 |
"retrieve the project with a particular id; return nil if not known" |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
417 |
|
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
418 |
^ self knownProjects detect:[:p | p package = aPackageId] ifNone:nil. |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
419 |
|
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
420 |
" |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
421 |
Project projectWithId:#'stx:libbasic' |
5547 | 422 |
Project projectWithId:'__NoProject__' |
4685
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
423 |
" |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
424 |
! |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
425 |
|
334 | 426 |
setDefaultProject |
427 |
"set the currently active project to be the SystemDEfault project" |
|
428 |
||
429 |
self current:SystemProject. |
|
939
ffee570b0f09
added #setProject: (does not send change notifications)
Claus Gittinger <cg@exept.de>
parents:
848
diff
changeset
|
430 |
! |
ffee570b0f09
added #setProject: (does not send change notifications)
Claus Gittinger <cg@exept.de>
parents:
848
diff
changeset
|
431 |
|
ffee570b0f09
added #setProject: (does not send change notifications)
Claus Gittinger <cg@exept.de>
parents:
848
diff
changeset
|
432 |
setProject:aProjectOrNil |
ffee570b0f09
added #setProject: (does not send change notifications)
Claus Gittinger <cg@exept.de>
parents:
848
diff
changeset
|
433 |
"set the currently active project without updating others" |
ffee570b0f09
added #setProject: (does not send change notifications)
Claus Gittinger <cg@exept.de>
parents:
848
diff
changeset
|
434 |
|
ffee570b0f09
added #setProject: (does not send change notifications)
Claus Gittinger <cg@exept.de>
parents:
848
diff
changeset
|
435 |
CurrentProject := aProjectOrNil. |
ffee570b0f09
added #setProject: (does not send change notifications)
Claus Gittinger <cg@exept.de>
parents:
848
diff
changeset
|
436 |
|
ffee570b0f09
added #setProject: (does not send change notifications)
Claus Gittinger <cg@exept.de>
parents:
848
diff
changeset
|
437 |
"Created: 7.2.1996 / 14:00:45 / cg" |
ffee570b0f09
added #setProject: (does not send change notifications)
Claus Gittinger <cg@exept.de>
parents:
848
diff
changeset
|
438 |
"Modified: 7.2.1996 / 14:01:16 / cg" |
1 | 439 |
! ! |
440 |
||
1854
b44227fd2b3d
use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents:
1636
diff
changeset
|
441 |
!Project class methodsFor:'changes management'! |
149 | 442 |
|
5224
003c8edae743
comments; handle class-instvar and comment changes
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
443 |
addClassCommentChangeFor:aClass |
003c8edae743
comments; handle class-instvar and comment changes
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
444 |
"add a comment-change for aClass to the current project" |
003c8edae743
comments; handle class-instvar and comment changes
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
445 |
|
003c8edae743
comments; handle class-instvar and comment changes
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
446 |
|p| |
003c8edae743
comments; handle class-instvar and comment changes
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
447 |
|
003c8edae743
comments; handle class-instvar and comment changes
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
448 |
p := CurrentProject. |
003c8edae743
comments; handle class-instvar and comment changes
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
449 |
p notNil ifTrue:[ |
003c8edae743
comments; handle class-instvar and comment changes
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
450 |
p addClassCommentChangeFor:aClass |
003c8edae743
comments; handle class-instvar and comment changes
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
451 |
] |
003c8edae743
comments; handle class-instvar and comment changes
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
452 |
! |
003c8edae743
comments; handle class-instvar and comment changes
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
453 |
|
664 | 454 |
addClassDefinitionChangeFor:aClass |
1115 | 455 |
"add a class-def-change for aClass to the current project" |
456 |
||
5150
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
457 |
|p| |
664 | 458 |
|
459 |
p := CurrentProject. |
|
5150
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
460 |
p notNil ifTrue:[ |
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
461 |
p addClassDefinitionChangeFor:aClass |
664 | 462 |
] |
463 |
||
464 |
"Created: 3.12.1995 / 13:44:58 / cg" |
|
465 |
"Modified: 3.12.1995 / 13:58:04 / cg" |
|
466 |
! |
|
467 |
||
6178 | 468 |
addClassRemoveChange:oldClassName |
469 |
"add a class-remove-change to the current project" |
|
470 |
||
471 |
|p| |
|
472 |
||
473 |
p := CurrentProject. |
|
474 |
p notNil ifTrue:[ |
|
475 |
p addClassRemoveChange:oldClassName |
|
476 |
] |
|
477 |
! |
|
478 |
||
6167 | 479 |
addClassRenameChangeFrom:oldName to:newName |
480 |
"add a class-rename-change to the current project" |
|
481 |
||
482 |
|p| |
|
483 |
||
484 |
p := CurrentProject. |
|
485 |
p notNil ifTrue:[ |
|
486 |
p addClassRenameChangeFrom:oldName to:newName |
|
487 |
] |
|
488 |
! |
|
489 |
||
6097 | 490 |
addDoIt:aString |
491 |
"add a doIt to the current project" |
|
492 |
||
493 |
|p| |
|
494 |
||
495 |
p := CurrentProject. |
|
496 |
p notNil ifTrue:[ |
|
497 |
p addDoIt:aString |
|
498 |
] |
|
499 |
||
500 |
"Created: 3.12.1995 / 13:44:58 / cg" |
|
501 |
"Modified: 3.12.1995 / 13:58:04 / cg" |
|
502 |
! |
|
503 |
||
5224
003c8edae743
comments; handle class-instvar and comment changes
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
504 |
addInstVarDefinitionChangeFor:aClass |
003c8edae743
comments; handle class-instvar and comment changes
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
505 |
"add an instvar-change for aClass to the current project" |
003c8edae743
comments; handle class-instvar and comment changes
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
506 |
|
003c8edae743
comments; handle class-instvar and comment changes
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
507 |
|p| |
003c8edae743
comments; handle class-instvar and comment changes
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
508 |
|
003c8edae743
comments; handle class-instvar and comment changes
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
509 |
p := CurrentProject. |
003c8edae743
comments; handle class-instvar and comment changes
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
510 |
p notNil ifTrue:[ |
003c8edae743
comments; handle class-instvar and comment changes
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
511 |
p addInstVarDefinitionChangeFor:aClass |
003c8edae743
comments; handle class-instvar and comment changes
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
512 |
] |
003c8edae743
comments; handle class-instvar and comment changes
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
513 |
|
003c8edae743
comments; handle class-instvar and comment changes
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
514 |
"Created: 3.12.1995 / 13:44:58 / cg" |
003c8edae743
comments; handle class-instvar and comment changes
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
515 |
"Modified: 3.12.1995 / 13:58:04 / cg" |
003c8edae743
comments; handle class-instvar and comment changes
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
516 |
! |
003c8edae743
comments; handle class-instvar and comment changes
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
517 |
|
617 | 518 |
addMethodCategoryChange:aMethod category:newCategory in:aClass |
1115 | 519 |
"add a method-category-change for aMethod in aClass to the current project" |
520 |
||
5150
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
521 |
|p| |
617 | 522 |
|
523 |
p := CurrentProject. |
|
5150
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
524 |
p notNil ifTrue:[ |
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
525 |
p addMethodCategoryChange:aMethod category:newCategory in:aClass |
617 | 526 |
] |
527 |
! |
|
528 |
||
5553
1740d3ae50ff
keep previousVersion of method in changeSet
Claus Gittinger <cg@exept.de>
parents:
5547
diff
changeset
|
529 |
addMethodChange:aMethod fromOld:oldMethod in:aClass |
1740d3ae50ff
keep previousVersion of method in changeSet
Claus Gittinger <cg@exept.de>
parents:
5547
diff
changeset
|
530 |
"add a method change in aClass to the current project" |
1740d3ae50ff
keep previousVersion of method in changeSet
Claus Gittinger <cg@exept.de>
parents:
5547
diff
changeset
|
531 |
|
1740d3ae50ff
keep previousVersion of method in changeSet
Claus Gittinger <cg@exept.de>
parents:
5547
diff
changeset
|
532 |
|p| |
1740d3ae50ff
keep previousVersion of method in changeSet
Claus Gittinger <cg@exept.de>
parents:
5547
diff
changeset
|
533 |
|
1740d3ae50ff
keep previousVersion of method in changeSet
Claus Gittinger <cg@exept.de>
parents:
5547
diff
changeset
|
534 |
p := CurrentProject. |
1740d3ae50ff
keep previousVersion of method in changeSet
Claus Gittinger <cg@exept.de>
parents:
5547
diff
changeset
|
535 |
p notNil ifTrue:[ |
1740d3ae50ff
keep previousVersion of method in changeSet
Claus Gittinger <cg@exept.de>
parents:
5547
diff
changeset
|
536 |
p addMethodChange:aMethod fromOld:oldMethod in:aClass |
1740d3ae50ff
keep previousVersion of method in changeSet
Claus Gittinger <cg@exept.de>
parents:
5547
diff
changeset
|
537 |
]. |
1740d3ae50ff
keep previousVersion of method in changeSet
Claus Gittinger <cg@exept.de>
parents:
5547
diff
changeset
|
538 |
! |
1740d3ae50ff
keep previousVersion of method in changeSet
Claus Gittinger <cg@exept.de>
parents:
5547
diff
changeset
|
539 |
|
149 | 540 |
addMethodChange:aMethod in:aClass |
1115 | 541 |
"add a method change in aClass to the current project" |
149 | 542 |
|
5150
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
543 |
|p| |
149 | 544 |
|
545 |
p := CurrentProject. |
|
5150
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
546 |
p notNil ifTrue:[ |
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
547 |
p addMethodChange:aMethod in:aClass |
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
548 |
]. |
203 | 549 |
! |
550 |
||
617 | 551 |
addMethodPrivacyChange:aMethod in:aClass |
1115 | 552 |
"add a privacy change for aMethod in aClass to the current project" |
553 |
||
5150
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
554 |
|p| |
617 | 555 |
|
556 |
p := CurrentProject. |
|
5150
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
557 |
p notNil ifTrue:[ |
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
558 |
p addMethodPrivacyChange:aMethod in:aClass |
617 | 559 |
] |
560 |
||
561 |
"Modified: 27.8.1995 / 22:48:17 / claus" |
|
562 |
! |
|
563 |
||
705 | 564 |
addPrimitiveDefinitionsChangeFor:aClass |
1115 | 565 |
"add a primitiveDef change for aClass to the current project" |
566 |
||
5150
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
567 |
|p| |
705 | 568 |
|
569 |
p := CurrentProject. |
|
5150
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
570 |
p notNil ifTrue:[ |
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
571 |
p addPrimitiveDefinitionsChangeFor:aClass |
705 | 572 |
] |
573 |
! |
|
574 |
||
575 |
addPrimitiveFunctionsChangeFor:aClass |
|
1115 | 576 |
"add a primitiveFuncs change for aClass to the current project" |
577 |
||
5150
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
578 |
|p| |
705 | 579 |
|
580 |
p := CurrentProject. |
|
5150
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
581 |
p notNil ifTrue:[ |
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
582 |
p addPrimitiveFunctionsChangeFor:aClass |
705 | 583 |
] |
584 |
! |
|
585 |
||
586 |
addPrimitiveVariablesChangeFor:aClass |
|
1115 | 587 |
"add a primitiveVars change for aClass to the current project" |
588 |
||
5150
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
589 |
|p| |
705 | 590 |
|
591 |
p := CurrentProject. |
|
5150
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
592 |
p notNil ifTrue:[ |
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
593 |
p addPrimitiveVariablesChangeFor:aClass |
705 | 594 |
] |
595 |
! |
|
596 |
||
3288
373af30a15ca
add removeSelectorChange to current projects changeSet
Claus Gittinger <cg@exept.de>
parents:
2962
diff
changeset
|
597 |
addRemoveSelectorChange:aSelector in:aClass |
373af30a15ca
add removeSelectorChange to current projects changeSet
Claus Gittinger <cg@exept.de>
parents:
2962
diff
changeset
|
598 |
"add a method-remove change in aClass to the current project" |
373af30a15ca
add removeSelectorChange to current projects changeSet
Claus Gittinger <cg@exept.de>
parents:
2962
diff
changeset
|
599 |
|
5150
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
600 |
|p| |
3288
373af30a15ca
add removeSelectorChange to current projects changeSet
Claus Gittinger <cg@exept.de>
parents:
2962
diff
changeset
|
601 |
|
373af30a15ca
add removeSelectorChange to current projects changeSet
Claus Gittinger <cg@exept.de>
parents:
2962
diff
changeset
|
602 |
p := CurrentProject. |
5150
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
603 |
p notNil ifTrue:[ |
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
604 |
p addRemoveSelectorChange:aSelector in:aClass |
3288
373af30a15ca
add removeSelectorChange to current projects changeSet
Claus Gittinger <cg@exept.de>
parents:
2962
diff
changeset
|
605 |
] |
373af30a15ca
add removeSelectorChange to current projects changeSet
Claus Gittinger <cg@exept.de>
parents:
2962
diff
changeset
|
606 |
|
373af30a15ca
add removeSelectorChange to current projects changeSet
Claus Gittinger <cg@exept.de>
parents:
2962
diff
changeset
|
607 |
"Created: / 16.2.1998 / 12:45:10 / cg" |
373af30a15ca
add removeSelectorChange to current projects changeSet
Claus Gittinger <cg@exept.de>
parents:
2962
diff
changeset
|
608 |
! |
373af30a15ca
add removeSelectorChange to current projects changeSet
Claus Gittinger <cg@exept.de>
parents:
2962
diff
changeset
|
609 |
|
5239
8b70947d7036
category change in changeSet
Claus Gittinger <cg@exept.de>
parents:
5232
diff
changeset
|
610 |
addRenameCategoryChangeIn:aClass from:oldCategory to:newCategory |
8b70947d7036
category change in changeSet
Claus Gittinger <cg@exept.de>
parents:
5232
diff
changeset
|
611 |
"add a category rename change for aClass to the current project" |
8b70947d7036
category change in changeSet
Claus Gittinger <cg@exept.de>
parents:
5232
diff
changeset
|
612 |
|
8b70947d7036
category change in changeSet
Claus Gittinger <cg@exept.de>
parents:
5232
diff
changeset
|
613 |
|p| |
8b70947d7036
category change in changeSet
Claus Gittinger <cg@exept.de>
parents:
5232
diff
changeset
|
614 |
|
8b70947d7036
category change in changeSet
Claus Gittinger <cg@exept.de>
parents:
5232
diff
changeset
|
615 |
p := CurrentProject. |
8b70947d7036
category change in changeSet
Claus Gittinger <cg@exept.de>
parents:
5232
diff
changeset
|
616 |
p notNil ifTrue:[ |
8b70947d7036
category change in changeSet
Claus Gittinger <cg@exept.de>
parents:
5232
diff
changeset
|
617 |
p addRenameCategoryChangeIn:aClass from:oldCategory to:newCategory |
8b70947d7036
category change in changeSet
Claus Gittinger <cg@exept.de>
parents:
5232
diff
changeset
|
618 |
] |
8b70947d7036
category change in changeSet
Claus Gittinger <cg@exept.de>
parents:
5232
diff
changeset
|
619 |
|
8b70947d7036
category change in changeSet
Claus Gittinger <cg@exept.de>
parents:
5232
diff
changeset
|
620 |
"Created: / 6.2.2000 / 02:27:35 / cg" |
8b70947d7036
category change in changeSet
Claus Gittinger <cg@exept.de>
parents:
5232
diff
changeset
|
621 |
! |
8b70947d7036
category change in changeSet
Claus Gittinger <cg@exept.de>
parents:
5232
diff
changeset
|
622 |
|
149 | 623 |
currentProjectDirectory |
624 |
"return the name of the directory to use for fileOut. |
|
235 | 625 |
The returned name already includes a file-separator at the end, |
626 |
so the filename can be concatenated to it." |
|
149 | 627 |
|
628 |
|p dirName| |
|
629 |
||
630 |
p := CurrentProject. |
|
631 |
p notNil ifTrue:[ |
|
4814
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
632 |
dirName := p directory |
149 | 633 |
] ifFalse:[ |
4814
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
634 |
dirName := Filename currentDirectory name |
149 | 635 |
]. |
2962 | 636 |
^ dirName |
2907 | 637 |
|
638 |
"Modified: 7.9.1997 / 23:52:25 / cg" |
|
2334
7502902385ff
only remember overwritten methods if the current project
Claus Gittinger <cg@exept.de>
parents:
2276
diff
changeset
|
639 |
! |
7502902385ff
only remember overwritten methods if the current project
Claus Gittinger <cg@exept.de>
parents:
2276
diff
changeset
|
640 |
|
7502902385ff
only remember overwritten methods if the current project
Claus Gittinger <cg@exept.de>
parents:
2276
diff
changeset
|
641 |
rememberOverwrittenMethod:newMethod from:oldMethod |
7502902385ff
only remember overwritten methods if the current project
Claus Gittinger <cg@exept.de>
parents:
2276
diff
changeset
|
642 |
"remember a method (from another package) being overwritten. |
7502902385ff
only remember overwritten methods if the current project
Claus Gittinger <cg@exept.de>
parents:
2276
diff
changeset
|
643 |
This is only remembered, if the current project is not the |
7502902385ff
only remember overwritten methods if the current project
Claus Gittinger <cg@exept.de>
parents:
2276
diff
changeset
|
644 |
system project (to avoid filling this remembered-table)" |
7502902385ff
only remember overwritten methods if the current project
Claus Gittinger <cg@exept.de>
parents:
2276
diff
changeset
|
645 |
|
2558 | 646 |
|p| |
2334
7502902385ff
only remember overwritten methods if the current project
Claus Gittinger <cg@exept.de>
parents:
2276
diff
changeset
|
647 |
|
7502902385ff
only remember overwritten methods if the current project
Claus Gittinger <cg@exept.de>
parents:
2276
diff
changeset
|
648 |
p := CurrentProject. |
7502902385ff
only remember overwritten methods if the current project
Claus Gittinger <cg@exept.de>
parents:
2276
diff
changeset
|
649 |
(p notNil |
7502902385ff
only remember overwritten methods if the current project
Claus Gittinger <cg@exept.de>
parents:
2276
diff
changeset
|
650 |
and:[p ~~ SystemProject]) ifTrue:[ |
4814
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
651 |
p rememberOverwrittenMethod:newMethod from:oldMethod |
2334
7502902385ff
only remember overwritten methods if the current project
Claus Gittinger <cg@exept.de>
parents:
2276
diff
changeset
|
652 |
] ifFalse:[ |
3332
8014b817988b
remove the 'does not remember ...' message.
Claus Gittinger <cg@exept.de>
parents:
3288
diff
changeset
|
653 |
"/ 'Project [info]: DefaultProject does not remember overwritten methods' infoPrintCR |
2334
7502902385ff
only remember overwritten methods if the current project
Claus Gittinger <cg@exept.de>
parents:
2276
diff
changeset
|
654 |
] |
7502902385ff
only remember overwritten methods if the current project
Claus Gittinger <cg@exept.de>
parents:
2276
diff
changeset
|
655 |
|
3332
8014b817988b
remove the 'does not remember ...' message.
Claus Gittinger <cg@exept.de>
parents:
3288
diff
changeset
|
656 |
"Modified: / 7.3.1998 / 13:38:39 / cg" |
13 | 657 |
! ! |
658 |
||
4909 | 659 |
!Project class methodsFor:'misc'! |
660 |
||
661 |
projectFileFormatVersion |
|
662 |
^ 1 |
|
663 |
! ! |
|
664 |
||
5151 | 665 |
!Project class methodsFor:'testing'! |
666 |
||
667 |
isClassChanged:aClass |
|
5547 | 668 |
"return true, if aClass has been changed" |
5151 | 669 |
|
670 |
^self current changedClasses includesIdentical:aClass |
|
671 |
! ! |
|
672 |
||
1 | 673 |
!Project methodsFor:'accessing'! |
674 |
||
5177 | 675 |
addPrerequisitePackage:aPackageId |
676 |
"add onother prerequisitePackage to the project" |
|
677 |
||
678 |
|list| |
|
679 |
||
680 |
list := self prerequisites. |
|
681 |
(list includes:aPackageId) ifFalse:[ |
|
682 |
list addLast:aPackageId |
|
683 |
]. |
|
684 |
! |
|
685 |
||
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
686 |
addSubProject:aProject |
4097 | 687 |
"add a subproject - obsolete; we use prerequisites now" |
688 |
||
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
689 |
subProjects isNil ifTrue:[ |
4814
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
690 |
subProjects := OrderedCollection new. |
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
691 |
]. |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
692 |
subProjects add:aProject |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
693 |
! |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
694 |
|
1 | 695 |
changeSet |
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
696 |
"return the set of changes made in this project" |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
697 |
|
1 | 698 |
^ changeSet |
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
699 |
|
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
700 |
"Modified: 27.1.1997 / 11:58:36 / cg" |
1 | 701 |
! |
702 |
||
236 | 703 |
changeSet:aChangeSet |
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
704 |
"set the set of changes made in this project - dangerous, you may loose |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
705 |
the actual changeSet." |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
706 |
|
236 | 707 |
changeSet := aChangeSet |
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
708 |
|
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
709 |
"Modified: 27.1.1997 / 11:59:02 / cg" |
73 | 710 |
! |
711 |
||
5150
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
712 |
changedClasses |
5912 | 713 |
changedClasses isNil ifTrue:[changedClasses := IdentitySet new]. |
714 |
^ changedClasses |
|
5150
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
715 |
|
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
716 |
" |
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
717 |
self new changedClasses |
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
718 |
" |
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
719 |
! |
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
720 |
|
2028 | 721 |
defaultNameSpace |
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
722 |
"return the defaultNameSpace of this project. |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
723 |
New classes will (if not specified by a directive) be installed |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
724 |
in this nameSpace. Useful, when filing in ST-80 code, to avoid |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
725 |
overwriting of standard classes." |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
726 |
|
4726 | 727 |
^ (self propertyAt:#defaultNameSpace) ? Smalltalk |
2028 | 728 |
|
729 |
! |
|
730 |
||
731 |
defaultNameSpace:aNamespace |
|
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
732 |
"set the defaultNameSpace of this project. |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
733 |
New classes will (if not specified by a directive) be installed |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
734 |
in this nameSpace. Useful, when filing in ST-80 code, to avoid |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
735 |
overwriting of standard classes." |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
736 |
|
4726 | 737 |
|prevDefault| |
738 |
||
739 |
prevDefault := self defaultNameSpace. |
|
740 |
aNamespace ~~ prevDefault ifTrue:[ |
|
4814
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
741 |
self propertyAt:#defaultNameSpace put:aNamespace. |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
742 |
self changed:#defaultNameSpace. |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
743 |
self == CurrentProject ifTrue:[ |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
744 |
Project changed:#defaultNameSpace |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
745 |
] |
2032 | 746 |
] |
2028 | 747 |
|
748 |
"Created: 2.1.1997 / 19:54:37 / cg" |
|
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
749 |
"Modified: 27.1.1997 / 12:00:01 / cg" |
2028 | 750 |
! |
751 |
||
315 | 752 |
directory |
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
753 |
"return the projects directory. |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
754 |
If not specified, a fileOut will be done into that directory" |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
755 |
|
315 | 756 |
directoryName isNil ifTrue:[^ '.']. |
757 |
^ directoryName |
|
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
758 |
|
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
759 |
"Modified: 27.1.1997 / 12:00:41 / cg" |
315 | 760 |
! |
761 |
||
762 |
directory:aDirectoryName |
|
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
763 |
"set the projects directory. |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
764 |
If not specified, a fileOut will be done into that directory" |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
765 |
|
315 | 766 |
directoryName := aDirectoryName. |
4070 | 767 |
self changed:#directory. |
315 | 768 |
self == CurrentProject ifTrue:[ |
4814
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
769 |
Project changed:#directory |
315 | 770 |
] |
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
771 |
|
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
772 |
"Modified: 27.1.1997 / 12:00:47 / cg" |
617 | 773 |
! |
356 | 774 |
|
4685
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
775 |
isLoaded:aBoolean |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
776 |
isLoaded := aBoolean |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
777 |
! |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
778 |
|
4789
72a61dc595ad
loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents:
4787
diff
changeset
|
779 |
libraryName |
72a61dc595ad
loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents:
4787
diff
changeset
|
780 |
"return the projects library name. |
72a61dc595ad
loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents:
4787
diff
changeset
|
781 |
This is the name of a classLibrary, created from this project" |
72a61dc595ad
loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents:
4787
diff
changeset
|
782 |
|
72a61dc595ad
loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents:
4787
diff
changeset
|
783 |
|nm| |
72a61dc595ad
loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents:
4787
diff
changeset
|
784 |
|
72a61dc595ad
loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents:
4787
diff
changeset
|
785 |
nm := self name. |
72a61dc595ad
loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents:
4787
diff
changeset
|
786 |
^ nm copyFrom:(nm lastIndexOfAny:':/')+1 |
72a61dc595ad
loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents:
4787
diff
changeset
|
787 |
|
72a61dc595ad
loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents:
4787
diff
changeset
|
788 |
"/ ^ (self name copyReplaceAll:$/ with:$_) replaceAll:$: with:$_ |
72a61dc595ad
loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents:
4787
diff
changeset
|
789 |
! |
72a61dc595ad
loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents:
4787
diff
changeset
|
790 |
|
617 | 791 |
name |
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
792 |
"return the projects name. |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
793 |
This is for the user only - shown in the projectViews label" |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
794 |
|
617 | 795 |
^ name |
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
796 |
|
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
797 |
"Modified: 27.1.1997 / 12:01:16 / cg" |
617 | 798 |
! |
356 | 799 |
|
617 | 800 |
name:aString |
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
801 |
"set the projects name. |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
802 |
This is for the user only - shown in the projectViews label" |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
803 |
|
617 | 804 |
name := aString. |
4070 | 805 |
self changed:#name. |
617 | 806 |
self == CurrentProject ifTrue:[ |
4814
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
807 |
Project changed:#name |
617 | 808 |
] |
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
809 |
|
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
810 |
"Modified: 27.1.1997 / 12:01:09 / cg" |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
811 |
! |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
812 |
|
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
813 |
overwrittenMethods |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
814 |
"return the set of methods which were overwritten in this project. |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
815 |
This information allows uninstalling, by switching back to the |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
816 |
original methods." |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
817 |
|
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
818 |
^ overwrittenMethods |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
819 |
|
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
820 |
"Created: 27.1.1997 / 11:57:21 / cg" |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
821 |
"Modified: 27.1.1997 / 12:09:14 / cg" |
356 | 822 |
! |
823 |
||
4668 | 824 |
package |
825 |
"return the projects package identifier. |
|
826 |
This identifier marks all methods and new classes which were created |
|
827 |
in this project." |
|
828 |
||
829 |
^ packageName |
|
830 |
||
831 |
"Modified: 27.1.1997 / 12:10:00 / cg" |
|
832 |
! |
|
833 |
||
4685
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
834 |
package:aPackageId |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
835 |
"set the projects package identifier. |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
836 |
This identifier marks all methods and new classes which were created |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
837 |
in this project." |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
838 |
|
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
839 |
packageName := aPackageId |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
840 |
|
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
841 |
"Modified: 27.1.1997 / 12:10:00 / cg" |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
842 |
! |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
843 |
|
4727 | 844 |
packageName:aPackageId |
845 |
"set the projects package identifier. |
|
846 |
This identifier marks all methods and new classes which were created |
|
847 |
in this project." |
|
848 |
||
849 |
self package:aPackageId |
|
850 |
||
851 |
"Modified: 27.1.1997 / 12:10:00 / cg" |
|
852 |
! |
|
853 |
||
4099 | 854 |
prerequisiteClasses |
855 |
"return the prerequisiteClasses of the project" |
|
856 |
||
857 |
^ (self propertyAt:#prerequisiteClasses) ? #() |
|
858 |
! |
|
859 |
||
4124 | 860 |
prerequisiteClasses:aCollectionOfClassesOrClassNames |
4099 | 861 |
"set the prerequisiteClasses of the project" |
862 |
||
4124 | 863 |
^ self propertyAt:#prerequisiteClasses put:aCollectionOfClassesOrClassNames |
864 |
||
865 |
"Modified: / 26.4.1999 / 23:33:44 / cg" |
|
866 |
! |
|
867 |
||
868 |
prerequisitePackages |
|
869 |
"return the prerequisitePackages of the project" |
|
870 |
||
871 |
^ self prerequisites |
|
872 |
||
873 |
"Created: / 26.4.1999 / 23:33:22 / cg" |
|
874 |
! |
|
875 |
||
876 |
prerequisitePackages:aCollectionOfPackagesOrPackageNames |
|
877 |
"set the prerequisitePackages of the project" |
|
878 |
||
879 |
^ self prerequisites:aCollectionOfPackagesOrPackageNames |
|
880 |
||
881 |
"Modified: / 26.4.1999 / 23:34:40 / cg" |
|
4099 | 882 |
! |
883 |
||
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
884 |
prerequisites |
4097 | 885 |
"return the prerequisites of the project" |
886 |
||
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
887 |
^ prerequisites ? #() |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
888 |
! |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
889 |
|
3973 | 890 |
prerequisites:aCollectionOfProjects |
4097 | 891 |
"set the prerequisites of the project" |
892 |
||
3973 | 893 |
prerequisites := aCollectionOfProjects |
894 |
! |
|
895 |
||
654 | 896 |
repositoryDirectory |
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
897 |
"return the projects default repository location. |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
898 |
This is offered initially, when classes are checked into the |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
899 |
source repository initially" |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
900 |
|
725
02759b2003a8
keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
901 |
^ repositoryDirectory |
654 | 902 |
|
903 |
"Created: 25.11.1995 / 18:04:51 / cg" |
|
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
904 |
"Modified: 27.1.1997 / 12:13:35 / cg" |
654 | 905 |
! |
906 |
||
907 |
repositoryDirectory:aRelativePathName |
|
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
908 |
"set the projects default repository location. |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
909 |
This will be offered initially, when classes are checked into the |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
910 |
source repository initially" |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
911 |
|
725
02759b2003a8
keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
912 |
repositoryDirectory := aRelativePathName |
654 | 913 |
|
914 |
"Created: 25.11.1995 / 18:05:06 / cg" |
|
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
915 |
"Modified: 27.1.1997 / 12:13:28 / cg" |
725
02759b2003a8
keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
916 |
! |
02759b2003a8
keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
917 |
|
02759b2003a8
keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
918 |
repositoryModule |
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
919 |
"return the projects default repository module name. |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
920 |
This is offered initially, when classes are checked into the |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
921 |
source repository initially" |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
922 |
|
725
02759b2003a8
keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
923 |
^ repositoryModule |
02759b2003a8
keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
924 |
|
02759b2003a8
keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
925 |
"Created: 25.11.1995 / 18:04:51 / cg" |
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
926 |
"Modified: 27.1.1997 / 12:13:50 / cg" |
725
02759b2003a8
keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
927 |
! |
02759b2003a8
keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
928 |
|
02759b2003a8
keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
929 |
repositoryModule:aString |
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
930 |
"set the projects default repository module name. |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
931 |
This is offered initially, when classes are checked into the |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
932 |
source repository initially" |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
933 |
|
725
02759b2003a8
keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
934 |
repositoryModule := aString |
02759b2003a8
keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
935 |
|
02759b2003a8
keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
936 |
"Created: 25.11.1995 / 18:05:06 / cg" |
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
937 |
"Modified: 27.1.1997 / 12:13:57 / cg" |
654 | 938 |
! |
939 |
||
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
940 |
subProjects |
4097 | 941 |
"return the subprojects - obsolete; we use prerequisites now" |
942 |
||
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
943 |
^ subProjects ? #() |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
944 |
! |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
945 |
|
617 | 946 |
views |
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
947 |
"return a collection of views which were opened in this project" |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
948 |
|
617 | 949 |
^ views asArray |
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
950 |
|
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
951 |
"Modified: 27.1.1997 / 12:14:18 / cg" |
338 | 952 |
! |
953 |
||
617 | 954 |
views:aSetOfViews |
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
955 |
"set the collection of views which were opened in this project" |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
956 |
|
617 | 957 |
views := WeakIdentitySet withAll:aSetOfViews |
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
958 |
|
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
959 |
"Modified: 27.1.1997 / 12:14:26 / cg" |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
960 |
! ! |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
961 |
|
4079 | 962 |
!Project methodsFor:'administration'! |
963 |
||
964 |
removeClassesFromSystem |
|
965 |
"remove the all of my classes & patches from the system" |
|
966 |
||
967 |
self classInfo do:[:clsInfo | |
|
4814
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
968 |
|clsName cls| |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
969 |
|
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
970 |
clsName := clsInfo className. |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
971 |
clsName isSymbol ifTrue:[ |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
972 |
cls := Smalltalk at:clsName. |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
973 |
cls notNil ifTrue:[ |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
974 |
cls removeFromSystem. |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
975 |
]. |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
976 |
] ifFalse:[ |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
977 |
self halt |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
978 |
]. |
4079 | 979 |
]. |
980 |
||
981 |
! |
|
982 |
||
983 |
removeFromSystem |
|
984 |
"remove the project and all of its classes & patches from the |
|
985 |
system" |
|
986 |
||
987 |
self removeClassesFromSystem. |
|
988 |
AllProjects remove:self ifAbsent:nil. |
|
989 |
! ! |
|
990 |
||
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
991 |
!Project methodsFor:'changes'! |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
992 |
|
5224
003c8edae743
comments; handle class-instvar and comment changes
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
993 |
addClassCommentChangeFor:aClass |
003c8edae743
comments; handle class-instvar and comment changes
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
994 |
"add a comment-change for aClass to the receivers changeSet" |
003c8edae743
comments; handle class-instvar and comment changes
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
995 |
|
003c8edae743
comments; handle class-instvar and comment changes
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
996 |
|changeSet| |
003c8edae743
comments; handle class-instvar and comment changes
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
997 |
|
003c8edae743
comments; handle class-instvar and comment changes
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
998 |
(changeSet := self changeSet) notNil ifTrue:[ |
003c8edae743
comments; handle class-instvar and comment changes
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
999 |
changeSet addClassCommentChangeFor:aClass |
003c8edae743
comments; handle class-instvar and comment changes
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
1000 |
]. |
003c8edae743
comments; handle class-instvar and comment changes
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
1001 |
self rememberChangedClass:aClass |
003c8edae743
comments; handle class-instvar and comment changes
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
1002 |
|
003c8edae743
comments; handle class-instvar and comment changes
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
1003 |
! |
003c8edae743
comments; handle class-instvar and comment changes
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
1004 |
|
5150
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
1005 |
addClassDefinitionChangeFor:aClass |
5224
003c8edae743
comments; handle class-instvar and comment changes
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
1006 |
"add a class-def-change for aClass to the receivers changeSet" |
5150
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
1007 |
|
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
1008 |
|changeSet| |
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
1009 |
|
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
1010 |
(changeSet := self changeSet) notNil ifTrue:[ |
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
1011 |
changeSet addClassDefinitionChangeFor:aClass |
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
1012 |
]. |
5156 | 1013 |
self rememberChangedClass:aClass |
5150
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
1014 |
! |
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
1015 |
|
6167 | 1016 |
addClassRemoveChange:oldClassName |
1017 |
"add a class-remove-change to the current project" |
|
1018 |
||
1019 |
|changeSet| |
|
1020 |
||
1021 |
(changeSet := self changeSet) notNil ifTrue:[ |
|
1022 |
changeSet addClassRemoveChange:oldClassName |
|
1023 |
]. |
|
1024 |
! |
|
1025 |
||
1026 |
addClassRenameChangeFrom:oldName to:newName |
|
1027 |
"add a class-rename-change to the current project" |
|
1028 |
||
1029 |
|changeSet| |
|
1030 |
||
1031 |
(changeSet := self changeSet) notNil ifTrue:[ |
|
1032 |
changeSet addClassRenameChangeFrom:oldName to:newName |
|
1033 |
]. |
|
1034 |
self rememberChangedClass:(Smalltalk at:newName) |
|
1035 |
! |
|
1036 |
||
6097 | 1037 |
addDoIt:aString |
1038 |
"add a doIt to the receivers changeSet" |
|
1039 |
||
1040 |
|changeSet| |
|
1041 |
||
1042 |
(changeSet := self changeSet) notNil ifTrue:[ |
|
1043 |
changeSet addDoIt:aString |
|
1044 |
]. |
|
1045 |
! |
|
1046 |
||
5224
003c8edae743
comments; handle class-instvar and comment changes
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
1047 |
addInstVarDefinitionChangeFor:aClass |
003c8edae743
comments; handle class-instvar and comment changes
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
1048 |
"add an instvar-definition-change for aClass to the receivers changeSet" |
003c8edae743
comments; handle class-instvar and comment changes
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
1049 |
|
003c8edae743
comments; handle class-instvar and comment changes
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
1050 |
|changeSet| |
003c8edae743
comments; handle class-instvar and comment changes
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
1051 |
|
003c8edae743
comments; handle class-instvar and comment changes
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
1052 |
(changeSet := self changeSet) notNil ifTrue:[ |
003c8edae743
comments; handle class-instvar and comment changes
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
1053 |
changeSet addInstVarDefinitionChangeFor:aClass |
003c8edae743
comments; handle class-instvar and comment changes
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
1054 |
]. |
003c8edae743
comments; handle class-instvar and comment changes
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
1055 |
self rememberChangedClass:aClass |
003c8edae743
comments; handle class-instvar and comment changes
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
1056 |
! |
003c8edae743
comments; handle class-instvar and comment changes
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
1057 |
|
5150
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
1058 |
addMethodCategoryChange:aMethod category:newCategory in:aClass |
5224
003c8edae743
comments; handle class-instvar and comment changes
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
1059 |
"add a method-category-change for aMethod in aClass to the receivers changeSet" |
5150
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
1060 |
|
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
1061 |
|changeSet| |
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
1062 |
|
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
1063 |
(changeSet := self changeSet) notNil ifTrue:[ |
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
1064 |
changeSet addMethodCategoryChange:aMethod category:newCategory in:aClass |
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
1065 |
]. |
5156 | 1066 |
self rememberChangedClass:aClass |
5150
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
1067 |
|
6152
b987f345234e
condense changeSet after checking in an extensions container
Claus Gittinger <cg@exept.de>
parents:
6141
diff
changeset
|
1068 |
"Modified: / 5.11.2001 / 16:25:34 / cg" |
5150
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
1069 |
! |
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
1070 |
|
5553
1740d3ae50ff
keep previousVersion of method in changeSet
Claus Gittinger <cg@exept.de>
parents:
5547
diff
changeset
|
1071 |
addMethodChange:aMethod fromOld:oldMethod in:aClass |
1740d3ae50ff
keep previousVersion of method in changeSet
Claus Gittinger <cg@exept.de>
parents:
5547
diff
changeset
|
1072 |
"add a method change in aClass to the receivers changeSet" |
1740d3ae50ff
keep previousVersion of method in changeSet
Claus Gittinger <cg@exept.de>
parents:
5547
diff
changeset
|
1073 |
|
1740d3ae50ff
keep previousVersion of method in changeSet
Claus Gittinger <cg@exept.de>
parents:
5547
diff
changeset
|
1074 |
|changeSet| |
1740d3ae50ff
keep previousVersion of method in changeSet
Claus Gittinger <cg@exept.de>
parents:
5547
diff
changeset
|
1075 |
|
1740d3ae50ff
keep previousVersion of method in changeSet
Claus Gittinger <cg@exept.de>
parents:
5547
diff
changeset
|
1076 |
(changeSet := self changeSet) notNil ifTrue:[ |
1740d3ae50ff
keep previousVersion of method in changeSet
Claus Gittinger <cg@exept.de>
parents:
5547
diff
changeset
|
1077 |
changeSet addMethodChange:aMethod fromOld:oldMethod in:aClass |
1740d3ae50ff
keep previousVersion of method in changeSet
Claus Gittinger <cg@exept.de>
parents:
5547
diff
changeset
|
1078 |
]. |
1740d3ae50ff
keep previousVersion of method in changeSet
Claus Gittinger <cg@exept.de>
parents:
5547
diff
changeset
|
1079 |
self rememberChangedClass:aClass |
6152
b987f345234e
condense changeSet after checking in an extensions container
Claus Gittinger <cg@exept.de>
parents:
6141
diff
changeset
|
1080 |
|
b987f345234e
condense changeSet after checking in an extensions container
Claus Gittinger <cg@exept.de>
parents:
6141
diff
changeset
|
1081 |
"Modified: / 5.11.2001 / 16:25:38 / cg" |
5553
1740d3ae50ff
keep previousVersion of method in changeSet
Claus Gittinger <cg@exept.de>
parents:
5547
diff
changeset
|
1082 |
! |
1740d3ae50ff
keep previousVersion of method in changeSet
Claus Gittinger <cg@exept.de>
parents:
5547
diff
changeset
|
1083 |
|
5150
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
1084 |
addMethodChange:aMethod in:aClass |
5224
003c8edae743
comments; handle class-instvar and comment changes
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
1085 |
"add a method change in aClass to the receivers changeSet" |
5150
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
1086 |
|
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
1087 |
|changeSet| |
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
1088 |
|
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
1089 |
(changeSet := self changeSet) notNil ifTrue:[ |
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
1090 |
changeSet addMethodChange:aMethod in:aClass |
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
1091 |
]. |
5156 | 1092 |
self rememberChangedClass:aClass |
5150
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
1093 |
|
6152
b987f345234e
condense changeSet after checking in an extensions container
Claus Gittinger <cg@exept.de>
parents:
6141
diff
changeset
|
1094 |
"Modified: / 5.11.2001 / 16:25:44 / cg" |
5150
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
1095 |
! |
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
1096 |
|
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
1097 |
addMethodPrivacyChange:aMethod in:aClass |
5224
003c8edae743
comments; handle class-instvar and comment changes
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
1098 |
"add a privacy change for aMethod in aClass to the receivers changeSet" |
5150
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
1099 |
|
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
1100 |
|changeSet| |
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
1101 |
|
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
1102 |
(changeSet := self changeSet) notNil ifTrue:[ |
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
1103 |
changeSet addMethodPrivacyChange:aMethod in:aClass |
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
1104 |
]. |
5156 | 1105 |
self rememberChangedClass:aClass |
1106 |
||
6152
b987f345234e
condense changeSet after checking in an extensions container
Claus Gittinger <cg@exept.de>
parents:
6141
diff
changeset
|
1107 |
"Modified: / 5.11.2001 / 16:25:49 / cg" |
5150
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
1108 |
! |
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
1109 |
|
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
1110 |
addPrimitiveDefinitionsChangeFor:aClass |
5224
003c8edae743
comments; handle class-instvar and comment changes
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
1111 |
"add a primitiveDef change for aClass to the receivers changeSet" |
5150
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
1112 |
|
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
1113 |
|changeSet| |
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
1114 |
|
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
1115 |
(changeSet := self changeSet) notNil ifTrue:[ |
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
1116 |
changeSet addPrimitiveDefinitionsChangeFor:aClass |
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
1117 |
]. |
5156 | 1118 |
self rememberChangedClass:aClass |
1119 |
||
6152
b987f345234e
condense changeSet after checking in an extensions container
Claus Gittinger <cg@exept.de>
parents:
6141
diff
changeset
|
1120 |
"Modified: / 5.11.2001 / 16:25:53 / cg" |
5150
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
1121 |
! |
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
1122 |
|
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
1123 |
addPrimitiveFunctionsChangeFor:aClass |
5224
003c8edae743
comments; handle class-instvar and comment changes
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
1124 |
"add a primitiveFuncs change for aClass to the receivers changeSet" |
5150
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
1125 |
|
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
1126 |
|changeSet| |
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
1127 |
|
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
1128 |
(changeSet := self changeSet) notNil ifTrue:[ |
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
1129 |
changeSet addPrimitiveFunctionsChangeFor:aClass |
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
1130 |
]. |
5156 | 1131 |
self rememberChangedClass:aClass |
1132 |
||
6152
b987f345234e
condense changeSet after checking in an extensions container
Claus Gittinger <cg@exept.de>
parents:
6141
diff
changeset
|
1133 |
"Modified: / 5.11.2001 / 16:26:05 / cg" |
5150
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
1134 |
! |
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
1135 |
|
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
1136 |
addPrimitiveVariablesChangeFor:aClass |
5224
003c8edae743
comments; handle class-instvar and comment changes
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
1137 |
"add a primitiveVars change for aClass to the receivers changeSet" |
5150
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
1138 |
|
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
1139 |
|changeSet| |
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
1140 |
|
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
1141 |
(changeSet := self changeSet) notNil ifTrue:[ |
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
1142 |
changeSet addPrimitiveVariablesChangeFor:aClass |
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
1143 |
]. |
5156 | 1144 |
self rememberChangedClass:aClass |
1145 |
||
6152
b987f345234e
condense changeSet after checking in an extensions container
Claus Gittinger <cg@exept.de>
parents:
6141
diff
changeset
|
1146 |
"Modified: / 5.11.2001 / 16:26:08 / cg" |
5150
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
1147 |
! |
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
1148 |
|
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
1149 |
addRemoveSelectorChange:aSelector in:aClass |
5224
003c8edae743
comments; handle class-instvar and comment changes
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
1150 |
"add a method-remove change in aClass to the receivers changeSet" |
5150
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
1151 |
|
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
1152 |
|changeSet| |
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
1153 |
|
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
1154 |
(changeSet := self changeSet) notNil ifTrue:[ |
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
1155 |
changeSet addRemoveSelectorChange:aSelector in:aClass |
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
1156 |
]. |
5156 | 1157 |
self rememberChangedClass:aClass |
1158 |
||
6152
b987f345234e
condense changeSet after checking in an extensions container
Claus Gittinger <cg@exept.de>
parents:
6141
diff
changeset
|
1159 |
"Modified: / 5.11.2001 / 16:26:11 / cg" |
5150
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
1160 |
! |
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
1161 |
|
5239
8b70947d7036
category change in changeSet
Claus Gittinger <cg@exept.de>
parents:
5232
diff
changeset
|
1162 |
addRenameCategoryChangeIn:aClass from:oldCategory to:newCategory |
8b70947d7036
category change in changeSet
Claus Gittinger <cg@exept.de>
parents:
5232
diff
changeset
|
1163 |
"add a category rename change in aClass to the receivers changeSet" |
8b70947d7036
category change in changeSet
Claus Gittinger <cg@exept.de>
parents:
5232
diff
changeset
|
1164 |
|
8b70947d7036
category change in changeSet
Claus Gittinger <cg@exept.de>
parents:
5232
diff
changeset
|
1165 |
|changeSet| |
8b70947d7036
category change in changeSet
Claus Gittinger <cg@exept.de>
parents:
5232
diff
changeset
|
1166 |
|
8b70947d7036
category change in changeSet
Claus Gittinger <cg@exept.de>
parents:
5232
diff
changeset
|
1167 |
(changeSet := self changeSet) notNil ifTrue:[ |
8b70947d7036
category change in changeSet
Claus Gittinger <cg@exept.de>
parents:
5232
diff
changeset
|
1168 |
changeSet addRenameCategoryChangeIn:aClass from:oldCategory to:newCategory |
8b70947d7036
category change in changeSet
Claus Gittinger <cg@exept.de>
parents:
5232
diff
changeset
|
1169 |
]. |
8b70947d7036
category change in changeSet
Claus Gittinger <cg@exept.de>
parents:
5232
diff
changeset
|
1170 |
self rememberChangedClass:aClass |
8b70947d7036
category change in changeSet
Claus Gittinger <cg@exept.de>
parents:
5232
diff
changeset
|
1171 |
|
8b70947d7036
category change in changeSet
Claus Gittinger <cg@exept.de>
parents:
5232
diff
changeset
|
1172 |
"Created: / 6.2.2000 / 02:28:07 / cg" |
6152
b987f345234e
condense changeSet after checking in an extensions container
Claus Gittinger <cg@exept.de>
parents:
6141
diff
changeset
|
1173 |
"Modified: / 5.11.2001 / 16:26:14 / cg" |
5239
8b70947d7036
category change in changeSet
Claus Gittinger <cg@exept.de>
parents:
5232
diff
changeset
|
1174 |
! |
8b70947d7036
category change in changeSet
Claus Gittinger <cg@exept.de>
parents:
5232
diff
changeset
|
1175 |
|
5155 | 1176 |
condenseChangesForClassCheckin:aClass |
1177 |
|changeSet| |
|
1178 |
||
1179 |
(changeSet := self changeSet) notNil ifTrue:[ |
|
1180 |
changeSet condenseChangesForClass:aClass package:aClass package |
|
1181 |
]. |
|
6152
b987f345234e
condense changeSet after checking in an extensions container
Claus Gittinger <cg@exept.de>
parents:
6141
diff
changeset
|
1182 |
|
b987f345234e
condense changeSet after checking in an extensions container
Claus Gittinger <cg@exept.de>
parents:
6141
diff
changeset
|
1183 |
"Modified: / 5.11.2001 / 16:24:18 / cg" |
5156 | 1184 |
! |
1185 |
||
5181 | 1186 |
condenseChangesForClassFilein:aClass |
1187 |
||
1188 |
#TODO. |
|
1189 |
"/ do not remove, if there are still methodChanges for other |
|
1190 |
"/ packages around |
|
1191 |
changedClasses := self changedClasses select:[:cls | |realClass| |
|
6152
b987f345234e
condense changeSet after checking in an extensions container
Claus Gittinger <cg@exept.de>
parents:
6141
diff
changeset
|
1192 |
realClass := cls theNonMetaclass. |
5181 | 1193 |
realClass name ~= aClass name |
1194 |
]. |
|
6152
b987f345234e
condense changeSet after checking in an extensions container
Claus Gittinger <cg@exept.de>
parents:
6141
diff
changeset
|
1195 |
|
b987f345234e
condense changeSet after checking in an extensions container
Claus Gittinger <cg@exept.de>
parents:
6141
diff
changeset
|
1196 |
"Modified: / 5.11.2001 / 16:45:56 / cg" |
5181 | 1197 |
! |
1198 |
||
6152
b987f345234e
condense changeSet after checking in an extensions container
Claus Gittinger <cg@exept.de>
parents:
6141
diff
changeset
|
1199 |
condenseChangesForExtensionsCheckInInPackage:package |
6141
cd681933c6bf
condense changes for extensions
Claus Gittinger <cg@exept.de>
parents:
6097
diff
changeset
|
1200 |
|changeSet| |
cd681933c6bf
condense changes for extensions
Claus Gittinger <cg@exept.de>
parents:
6097
diff
changeset
|
1201 |
|
cd681933c6bf
condense changes for extensions
Claus Gittinger <cg@exept.de>
parents:
6097
diff
changeset
|
1202 |
(changeSet := self changeSet) notNil ifTrue:[ |
cd681933c6bf
condense changes for extensions
Claus Gittinger <cg@exept.de>
parents:
6097
diff
changeset
|
1203 |
changeSet condenseChangesForExtensionsInPackage:package |
cd681933c6bf
condense changes for extensions
Claus Gittinger <cg@exept.de>
parents:
6097
diff
changeset
|
1204 |
]. |
cd681933c6bf
condense changes for extensions
Claus Gittinger <cg@exept.de>
parents:
6097
diff
changeset
|
1205 |
|
6152
b987f345234e
condense changeSet after checking in an extensions container
Claus Gittinger <cg@exept.de>
parents:
6141
diff
changeset
|
1206 |
"Created: / 5.11.2001 / 17:07:45 / cg" |
6141
cd681933c6bf
condense changes for extensions
Claus Gittinger <cg@exept.de>
parents:
6097
diff
changeset
|
1207 |
! |
cd681933c6bf
condense changes for extensions
Claus Gittinger <cg@exept.de>
parents:
6097
diff
changeset
|
1208 |
|
5156 | 1209 |
rememberChangedClass:aClass |
1210 |
|realClass| |
|
1211 |
||
6152
b987f345234e
condense changeSet after checking in an extensions container
Claus Gittinger <cg@exept.de>
parents:
6141
diff
changeset
|
1212 |
realClass := aClass theNonMetaclass. |
5181 | 1213 |
self changedClasses add:realClass. |
6192 | 1214 |
changedClasses := changedClasses |
1215 |
select:[:aClass | aClass theNonMetaclass isObsolete not]. |
|
1216 |
||
1217 |
"Modified: / 16.11.2001 / 13:18:16 / cg" |
|
5155 | 1218 |
! |
1219 |
||
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
1220 |
rememberOverwrittenMethod:newMethod from:oldMethod |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
1221 |
"this is sent whenever a method is installed, which overwrites |
2334
7502902385ff
only remember overwritten methods if the current project
Claus Gittinger <cg@exept.de>
parents:
2276
diff
changeset
|
1222 |
an existing method from a different package. |
7502902385ff
only remember overwritten methods if the current project
Claus Gittinger <cg@exept.de>
parents:
2276
diff
changeset
|
1223 |
Allows previous methods to be reconstructed." |
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
1224 |
|
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
1225 |
overwrittenMethods isNil ifTrue:[ |
4814
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
1226 |
overwrittenMethods := IdentityDictionary new. |
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
1227 |
]. |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
1228 |
overwrittenMethods at:newMethod put:oldMethod |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
1229 |
|
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
1230 |
"Created: 27.1.1997 / 11:52:01 / cg" |
2334
7502902385ff
only remember overwritten methods if the current project
Claus Gittinger <cg@exept.de>
parents:
2276
diff
changeset
|
1231 |
"Modified: 30.1.1997 / 21:10:51 / cg" |
10 | 1232 |
! ! |
1233 |
||
236 | 1234 |
!Project methodsFor:'initialization'! |
1235 |
||
1236 |
initialize |
|
338 | 1237 |
|numString| |
1238 |
||
330 | 1239 |
views := WeakIdentitySet new. |
338 | 1240 |
numString := NextSequential printString. |
315 | 1241 |
NextSequential := NextSequential + 1. |
338 | 1242 |
|
1243 |
name := 'new Project-' , numString. |
|
1244 |
packageName := 'private-' , numString. |
|
2034
1c96469c3df8
preinit the defaultNamespace of new projects (to Smalltalk)
Claus Gittinger <cg@exept.de>
parents:
2032
diff
changeset
|
1245 |
|
848
76a83f34c26a
moved ExtBytes & ExtFunc from libbasic2
Claus Gittinger <cg@exept.de>
parents:
725
diff
changeset
|
1246 |
"/ |
76a83f34c26a
moved ExtBytes & ExtFunc from libbasic2
Claus Gittinger <cg@exept.de>
parents:
725
diff
changeset
|
1247 |
"/ for tiny-configurations, allow ChangeSet to be absent |
76a83f34c26a
moved ExtBytes & ExtFunc from libbasic2
Claus Gittinger <cg@exept.de>
parents:
725
diff
changeset
|
1248 |
"/ |
76a83f34c26a
moved ExtBytes & ExtFunc from libbasic2
Claus Gittinger <cg@exept.de>
parents:
725
diff
changeset
|
1249 |
ChangeSet notNil ifTrue:[ |
4814
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
1250 |
changeSet := ChangeSet new. |
848
76a83f34c26a
moved ExtBytes & ExtFunc from libbasic2
Claus Gittinger <cg@exept.de>
parents:
725
diff
changeset
|
1251 |
]. |
654 | 1252 |
self directory:'.'. |
725
02759b2003a8
keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
1253 |
self repositoryModule:(OperatingSystem getLoginName). |
654 | 1254 |
self repositoryDirectory:'private' |
1255 |
||
1256 |
"Created: 25.11.1995 / 18:05:44 / cg" |
|
2034
1c96469c3df8
preinit the defaultNamespace of new projects (to Smalltalk)
Claus Gittinger <cg@exept.de>
parents:
2032
diff
changeset
|
1257 |
"Modified: 3.1.1997 / 13:24:10 / cg" |
236 | 1258 |
! ! |
1259 |
||
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1260 |
!Project methodsFor:'load & save'! |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1261 |
|
4805
a7e6d2cb9b29
care for conditions when generatong loadAll / Make.proto files.
Claus Gittinger <cg@exept.de>
parents:
4796
diff
changeset
|
1262 |
conditionForAutoloadIsTrue:cond |
a7e6d2cb9b29
care for conditions when generatong loadAll / Make.proto files.
Claus Gittinger <cg@exept.de>
parents:
4796
diff
changeset
|
1263 |
"check condition ..." |
a7e6d2cb9b29
care for conditions when generatong loadAll / Make.proto files.
Claus Gittinger <cg@exept.de>
parents:
4796
diff
changeset
|
1264 |
|
a7e6d2cb9b29
care for conditions when generatong loadAll / Make.proto files.
Claus Gittinger <cg@exept.de>
parents:
4796
diff
changeset
|
1265 |
^ cond == #autoload |
a7e6d2cb9b29
care for conditions when generatong loadAll / Make.proto files.
Claus Gittinger <cg@exept.de>
parents:
4796
diff
changeset
|
1266 |
! |
a7e6d2cb9b29
care for conditions when generatong loadAll / Make.proto files.
Claus Gittinger <cg@exept.de>
parents:
4796
diff
changeset
|
1267 |
|
a7e6d2cb9b29
care for conditions when generatong loadAll / Make.proto files.
Claus Gittinger <cg@exept.de>
parents:
4796
diff
changeset
|
1268 |
conditionForInclusionIsTrue:cond |
a7e6d2cb9b29
care for conditions when generatong loadAll / Make.proto files.
Claus Gittinger <cg@exept.de>
parents:
4796
diff
changeset
|
1269 |
"check condition ..." |
a7e6d2cb9b29
care for conditions when generatong loadAll / Make.proto files.
Claus Gittinger <cg@exept.de>
parents:
4796
diff
changeset
|
1270 |
|
a7e6d2cb9b29
care for conditions when generatong loadAll / Make.proto files.
Claus Gittinger <cg@exept.de>
parents:
4796
diff
changeset
|
1271 |
cond == #always ifTrue:[^ true]. |
a7e6d2cb9b29
care for conditions when generatong loadAll / Make.proto files.
Claus Gittinger <cg@exept.de>
parents:
4796
diff
changeset
|
1272 |
cond == #autoload ifTrue:[^ true]. |
a7e6d2cb9b29
care for conditions when generatong loadAll / Make.proto files.
Claus Gittinger <cg@exept.de>
parents:
4796
diff
changeset
|
1273 |
cond == #never ifTrue:[^ false]. |
a7e6d2cb9b29
care for conditions when generatong loadAll / Make.proto files.
Claus Gittinger <cg@exept.de>
parents:
4796
diff
changeset
|
1274 |
|
a7e6d2cb9b29
care for conditions when generatong loadAll / Make.proto files.
Claus Gittinger <cg@exept.de>
parents:
4796
diff
changeset
|
1275 |
cond == #unix ifTrue:[ |
4814
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
1276 |
^ OperatingSystem isUNIXlike |
4805
a7e6d2cb9b29
care for conditions when generatong loadAll / Make.proto files.
Claus Gittinger <cg@exept.de>
parents:
4796
diff
changeset
|
1277 |
]. |
a7e6d2cb9b29
care for conditions when generatong loadAll / Make.proto files.
Claus Gittinger <cg@exept.de>
parents:
4796
diff
changeset
|
1278 |
cond == #win32 ifTrue:[ |
4814
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
1279 |
^ OperatingSystem isMSWINDOWSlike |
4805
a7e6d2cb9b29
care for conditions when generatong loadAll / Make.proto files.
Claus Gittinger <cg@exept.de>
parents:
4796
diff
changeset
|
1280 |
]. |
a7e6d2cb9b29
care for conditions when generatong loadAll / Make.proto files.
Claus Gittinger <cg@exept.de>
parents:
4796
diff
changeset
|
1281 |
cond == #vms ifTrue:[ |
4814
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
1282 |
^ OperatingSystem isVMSlike |
4805
a7e6d2cb9b29
care for conditions when generatong loadAll / Make.proto files.
Claus Gittinger <cg@exept.de>
parents:
4796
diff
changeset
|
1283 |
]. |
a7e6d2cb9b29
care for conditions when generatong loadAll / Make.proto files.
Claus Gittinger <cg@exept.de>
parents:
4796
diff
changeset
|
1284 |
cond == #macos ifTrue:[ |
4814
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
1285 |
^ OperatingSystem isMAClike |
4805
a7e6d2cb9b29
care for conditions when generatong loadAll / Make.proto files.
Claus Gittinger <cg@exept.de>
parents:
4796
diff
changeset
|
1286 |
]. |
a7e6d2cb9b29
care for conditions when generatong loadAll / Make.proto files.
Claus Gittinger <cg@exept.de>
parents:
4796
diff
changeset
|
1287 |
self halt:'bad condition' |
a7e6d2cb9b29
care for conditions when generatong loadAll / Make.proto files.
Claus Gittinger <cg@exept.de>
parents:
4796
diff
changeset
|
1288 |
! |
a7e6d2cb9b29
care for conditions when generatong loadAll / Make.proto files.
Claus Gittinger <cg@exept.de>
parents:
4796
diff
changeset
|
1289 |
|
4079 | 1290 |
loadClassesFromProjectDirectory |
1291 |
"load my classes into the system. |
|
1292 |
The classes are loaded from the directory as defined by my |
|
1293 |
directory insTvar" |
|
1294 |
||
4805
a7e6d2cb9b29
care for conditions when generatong loadAll / Make.proto files.
Claus Gittinger <cg@exept.de>
parents:
4796
diff
changeset
|
1295 |
|myDirectory firstTrip| |
4079 | 1296 |
|
1297 |
myDirectory := self directory asFilename. |
|
4805
a7e6d2cb9b29
care for conditions when generatong loadAll / Make.proto files.
Claus Gittinger <cg@exept.de>
parents:
4796
diff
changeset
|
1298 |
firstTrip := true. |
a7e6d2cb9b29
care for conditions when generatong loadAll / Make.proto files.
Claus Gittinger <cg@exept.de>
parents:
4796
diff
changeset
|
1299 |
|
a7e6d2cb9b29
care for conditions when generatong loadAll / Make.proto files.
Claus Gittinger <cg@exept.de>
parents:
4796
diff
changeset
|
1300 |
"/ read twice; if the load order was not correct, |
a7e6d2cb9b29
care for conditions when generatong loadAll / Make.proto files.
Claus Gittinger <cg@exept.de>
parents:
4796
diff
changeset
|
1301 |
"/ this will fix things (i.e. nil superclasses ...) |
a7e6d2cb9b29
care for conditions when generatong loadAll / Make.proto files.
Claus Gittinger <cg@exept.de>
parents:
4796
diff
changeset
|
1302 |
|
a7e6d2cb9b29
care for conditions when generatong loadAll / Make.proto files.
Claus Gittinger <cg@exept.de>
parents:
4796
diff
changeset
|
1303 |
2 timesRepeat:[ |
4886 | 1304 |
self classInfo do:[:clsInfo | |
1305 |
|clsName clsFileNameString cls clsFilename |
|
1306 |
cond include asAutoload| |
|
1307 |
||
1308 |
clsName := clsInfo className. |
|
1309 |
(clsName startsWith:'Smalltalk::') ifTrue:[ |
|
1310 |
clsInfo className:(clsName := clsName copyFrom:'Smalltalk::' size + 1). |
|
1311 |
]. |
|
1312 |
clsName := clsName asSymbol. |
|
1313 |
||
1314 |
clsFileNameString := clsInfo classFileName. |
|
1315 |
clsFileNameString isNil ifTrue:[clsFileNameString := clsName , '.st']. |
|
1316 |
||
1317 |
clsName isSymbol ifTrue:[ |
|
1318 |
clsFilename := myDirectory construct:clsFileNameString. |
|
1319 |
cls := Smalltalk at:clsName. |
|
1320 |
(cls isNil or:[firstTrip]) ifTrue:[ |
|
1321 |
"/ ok - really not yet loaded. |
|
1322 |
Transcript showCR:'loading ' , clsFilename pathName , ' ...'. |
|
1323 |
] ifFalse:[ |
|
1324 |
Transcript showCR:'reloading ' , clsFilename pathName , ' ...'. |
|
1325 |
]. |
|
1326 |
"/ check condition ... |
|
1327 |
cond := clsInfo conditionForInclusion. |
|
1328 |
(self conditionForInclusionIsTrue:cond) ifTrue:[ |
|
1329 |
(self conditionForAutoloadIsTrue:cond) ifTrue:[ |
|
1330 |
Smalltalk |
|
1331 |
installAutoloadedClassNamed:clsName |
|
1332 |
category:'autoloaded' |
|
1333 |
package:self package |
|
1334 |
revision:nil |
|
1335 |
] ifFalse:[ |
|
5199 | 1336 |
Object errorSignal handle:[:ex | |
1337 |
self warn:'error during fileIn: ' , ex errorString |
|
1338 |
] do:[ |
|
1339 |
Class packageQuerySignal answer:packageName do:[ |
|
5690 | 1340 |
Parser::UndefinedSuperclassError handle:[:ex | |
1341 |
firstTrip ifFalse:[ |
|
1342 |
ex reject. |
|
1343 |
] |
|
1344 |
] do:[ |
|
1345 |
clsFilename fileIn. |
|
1346 |
"/ Smalltalk fileIn:clsFilename |
|
1347 |
] |
|
5199 | 1348 |
] |
1349 |
] |
|
4886 | 1350 |
] |
1351 |
] |
|
1352 |
] ifFalse:[ |
|
1353 |
self halt |
|
1354 |
]. |
|
1355 |
]. |
|
1356 |
||
1357 |
firstTrip := false. |
|
4079 | 1358 |
]. |
1359 |
! |
|
1360 |
||
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1361 |
loadFromProjectFile:aFilename |
4097 | 1362 |
"fill all of my attributes from a projects file (.prj-file)" |
1363 |
||
5819 | 1364 |
|f pack targetConditions s module dir formatVersion| |
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1365 |
|
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1366 |
f := aFilename asFilename. |
3996
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1367 |
directoryName := f directory pathName. |
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1368 |
self directory:(f directory pathName). |
3996
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1369 |
pack := ResourcePack fromFile:f baseName directory:directoryName. |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1370 |
|
4909 | 1371 |
formatVersion := pack at:'fileFormatVersion' ifAbsent:nil. |
1372 |
||
3996
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1373 |
"/ convert the resourcePack ... |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1374 |
|
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1375 |
packageName := pack at:'package' ifAbsent:packageName. |
5232 | 1376 |
repositoryModule := packageName upTo:$:. |
1377 |
repositoryDirectory := packageName restAfter:$:. |
|
1378 |
||
3996
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1379 |
name := pack at:'name' ifAbsent:name. |
4071 | 1380 |
|
4769 | 1381 |
self type:(pack at:'type' ifAbsent:#application) asSymbol. |
1382 |
||
4124 | 1383 |
module := pack at:'repository.module' ifAbsent:nil. |
1384 |
module notNil ifTrue:[ |
|
5232 | 1385 |
repositoryModule ~= module ifTrue:[ |
1386 |
'Project [warning]: module does not correspond to packageId' infoPrintCR. |
|
1387 |
'Project [info]: this will be not supported in future versions' infoPrintCR. |
|
1388 |
]. |
|
4833 | 1389 |
repositoryModule := module. |
5232 | 1390 |
dir := pack at:'repository.directory' ifAbsent:nil. |
1391 |
dir notNil ifTrue:[ |
|
1392 |
repositoryDirectory ~= dir ifTrue:[ |
|
1393 |
'Project [warning]: directory does not correspond to packageId' infoPrintCR. |
|
1394 |
'Project [info]: this will be not supported in future versions' infoPrintCR. |
|
1395 |
]. |
|
1396 |
repositoryDirectory := dir. |
|
1397 |
] |
|
4124 | 1398 |
]. |
4071 | 1399 |
|
4099 | 1400 |
prerequisites := pack at:'prerequisites' ifAbsent:#(). |
1401 |
self prerequisiteClasses:(pack at:'prerequisiteClasses' ifAbsent:#()). |
|
1402 |
||
4074 | 1403 |
s := pack at:'nameSpace' ifAbsent:nil. |
1404 |
s notNil ifTrue:[ |
|
5328
319b8e3ee60e
renamed Namespace to NameSpace
Claus Gittinger <cg@exept.de>
parents:
5327
diff
changeset
|
1405 |
self defaultNameSpace:(NameSpace name:s asSymbol). |
4074 | 1406 |
]. |
1407 |
||
3996
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1408 |
subProjects := pack at:'subProjects' ifAbsent:subProjects. |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1409 |
(s := pack at:'comment' ifAbsent:nil) notNil ifTrue:[ |
4833 | 1410 |
self comment:s |
3996
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1411 |
]. |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1412 |
|
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1413 |
"/ first, all of the conditions ... |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1414 |
targetConditions := Dictionary new. |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1415 |
pack keysAndValuesDo:[:key :val | |
4833 | 1416 |
|conditionKey| |
1417 |
||
1418 |
(key startsWith:'target.condition.') ifTrue:[ |
|
1419 |
conditionKey := key copyFrom:'target.condition.' size + 1. |
|
1420 |
targetConditions at:conditionKey put:val. |
|
1421 |
] |
|
3996
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1422 |
]. |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1423 |
|
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1424 |
properties isNil ifTrue:[ |
4833 | 1425 |
properties := IdentityDictionary new |
3996
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1426 |
]. |
5819 | 1427 |
properties at:#targetconditions put:targetConditions. |
1428 |
properties declare:#sourcesDirectory from:pack. |
|
4833 | 1429 |
properties declare:#methodsFile from:pack. |
1430 |
properties declare:#files from:pack. |
|
3996
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1431 |
|
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1432 |
"/ fetch class info |
4805
a7e6d2cb9b29
care for conditions when generatong loadAll / Make.proto files.
Claus Gittinger <cg@exept.de>
parents:
4796
diff
changeset
|
1433 |
"/ |
a7e6d2cb9b29
care for conditions when generatong loadAll / Make.proto files.
Claus Gittinger <cg@exept.de>
parents:
4796
diff
changeset
|
1434 |
"/ each entry consist of: |
a7e6d2cb9b29
care for conditions when generatong loadAll / Make.proto files.
Claus Gittinger <cg@exept.de>
parents:
4796
diff
changeset
|
1435 |
"/ full-name-of-class |
a7e6d2cb9b29
care for conditions when generatong loadAll / Make.proto files.
Claus Gittinger <cg@exept.de>
parents:
4796
diff
changeset
|
1436 |
"/ condition (optional) - #unix / #win32 / #vms / #macos / #always / #never / #autoload |
a7e6d2cb9b29
care for conditions when generatong loadAll / Make.proto files.
Claus Gittinger <cg@exept.de>
parents:
4796
diff
changeset
|
1437 |
"/ fileName (optional) |
5201 | 1438 |
properties at:#autoIncludeImageClasses put:false. |
1439 |
||
4071 | 1440 |
(pack at:'classes' default:#()) do:[:info | |
4833 | 1441 |
|condKey className optionalFileName| |
1442 |
||
1443 |
condKey := #always. |
|
1444 |
info isSymbol ifTrue:[ |
|
1445 |
className := info. |
|
1446 |
] ifFalse:[ |
|
1447 |
className := info at:1. |
|
4909 | 1448 |
formatVersion == 0 ifTrue:[ |
1449 |
info size > 1 ifTrue:[ |
|
1450 |
optionalFileName := info at:2. |
|
1451 |
info size > 2 ifTrue:[ |
|
1452 |
condKey := info at:3. |
|
1453 |
] |
|
1454 |
]. |
|
1455 |
] ifFalse:[ |
|
1456 |
className := info at:1. |
|
1457 |
info size > 1 ifTrue:[ |
|
1458 |
condKey := info at:2. |
|
1459 |
info size > 2 ifTrue:[ |
|
1460 |
optionalFileName := info at:3. |
|
1461 |
] |
|
1462 |
]. |
|
4833 | 1463 |
]. |
1464 |
]. |
|
1465 |
self |
|
1466 |
addClass:className |
|
1467 |
conditionForInclusion:condKey |
|
1468 |
classFileName:optionalFileName |
|
3996
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1469 |
]. |
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1470 |
|
4755
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
1471 |
"/ fetch methods info |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
1472 |
|
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
1473 |
(pack at:'methods' default:#()) do:[:info | |
4833 | 1474 |
|condKey className methodName optionalFileName| |
1475 |
||
1476 |
condKey := #always. |
|
1477 |
className := info at:1. |
|
1478 |
methodName := info at:2. |
|
1479 |
info size > 2 ifTrue:[ |
|
1480 |
optionalFileName := info at:3. |
|
1481 |
info size > 3 ifTrue:[ |
|
1482 |
condKey := info at:4. |
|
1483 |
] |
|
1484 |
]. |
|
1485 |
self |
|
1486 |
addMethod:methodName inClass:className |
|
1487 |
conditionForInclusion:condKey |
|
1488 |
fileName:optionalFileName |
|
4755
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
1489 |
]. |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
1490 |
|
4069 | 1491 |
self wasLoadedFromFile:true. |
1492 |
||
4099 | 1493 |
"/ all remaining properties |
1494 |
pack keysAndValuesDo:[:key :val | |
|
4833 | 1495 |
(key startsWith:'property.') ifTrue:[ |
1496 |
self propertyAt:(key copyFrom:'property.' size+1) asSymbol put:val. |
|
1497 |
] |
|
4099 | 1498 |
]. |
1499 |
||
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1500 |
" |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1501 |
Project current saveAsProjectFile. |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1502 |
|
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1503 |
Project new loadFromProjectFile:'default.prj' |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1504 |
|
3996
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1505 |
Project new loadFromProjectFile:'../../libbasic/libbasic.prj' |
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1506 |
" |
4069 | 1507 |
|
4124 | 1508 |
"Modified: / 26.4.1999 / 23:21:33 / cg" |
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1509 |
! |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1510 |
|
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1511 |
saveAsProjectFile |
4097 | 1512 |
"store all of my attributes into a projects file (.prj-file) |
1513 |
(in the project-directory and named as <projectName>.prj)" |
|
1514 |
||
4769 | 1515 |
|dir fn nm s| |
1516 |
||
1517 |
dir := self directory asFilename. |
|
4790 | 1518 |
nm := self libraryName. |
4769 | 1519 |
fn := dir construct:nm. |
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1520 |
fn := fn withSuffix:'prj'. |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1521 |
|
4124 | 1522 |
fn exists ifTrue:[ |
4814
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
1523 |
fn copyTo:(fn pathName , '.bak') |
4124 | 1524 |
]. |
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1525 |
s := fn writeStream. |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1526 |
self saveAsProjectFileOn:s. |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1527 |
s close. |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1528 |
|
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1529 |
" |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1530 |
Project current saveAsProjectFile |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1531 |
" |
4124 | 1532 |
|
1533 |
"Modified: / 26.4.1999 / 22:53:38 / cg" |
|
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1534 |
! |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1535 |
|
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1536 |
saveAsProjectFileOn:aStream |
4074 | 1537 |
"save the project info in a format which is both usable for reload |
1538 |
and somehow readable for humans. |
|
1539 |
Actually, the format is the same as used for resources (i.e. key - value pairs) |
|
1540 |
and the code below could be much simpler - if there where no humans to read it ..." |
|
1541 |
||
5232 | 1542 |
|s coll first maxLen t defNS methodsFile classes packageId |
1543 |
moduleFromPackageId directoryFromPackageId| |
|
1544 |
||
1545 |
packageId := self package. |
|
1546 |
packageId isNil ifTrue:[ |
|
1547 |
'Project [warning]: no valid packageId - generating a default' infoPrintCR. |
|
1548 |
packageId := OperatingSystem getLoginName , ':private'. |
|
1549 |
] ifFalse:[ |
|
1550 |
(packageId includes:$:) ifFalse:[ |
|
1551 |
'Project [warning]: no module in packageId - generating a default' infoPrintCR. |
|
1552 |
packageId := OperatingSystem getLoginName , ':' , packageId. |
|
1553 |
] |
|
1554 |
]. |
|
1555 |
moduleFromPackageId := packageId upTo:$:. |
|
1556 |
directoryFromPackageId := packageId restAfter:$:. |
|
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1557 |
|
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1558 |
s := aStream. |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1559 |
|
4099 | 1560 |
s nextPutLine:'; $Header' , '$'; nextPutLine:';'. |
4074 | 1561 |
s nextPutLine:'; Project saved ' , Smalltalk timeStamp; nextPutLine:';'. |
4769 | 1562 |
s nextPutAll:'; Be careful when editing - do not corrupt the files syntax. |
1563 |
; Lines starting with a semicolon are comment lines. |
|
1564 |
; Lines ending with a backslash are concatenated with the following line. |
|
1565 |
; Entries are key-value pairs, separated by whitespace; |
|
1566 |
; the value is a smalltalk literal expression. |
|
1567 |
'. |
|
1568 |
||
4909 | 1569 |
s nextPutAll:'fileFormatVersion'; tab; nextPutLine:(self class projectFileFormatVersion printString). |
1570 |
||
4769 | 1571 |
s nextPutAll:' |
1572 |
; |
|
1573 |
; general: |
|
1574 |
; |
|
1575 |
'. |
|
4071 | 1576 |
|
1577 |
s nextPutAll:'comment'. |
|
1578 |
s tab. s nextPutLine:(self comment storeString). |
|
1579 |
||
1580 |
s nextPutAll:'name'. |
|
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1581 |
s tab. s nextPutLine:(name storeString). |
4071 | 1582 |
|
1583 |
s nextPutAll:'type'. |
|
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1584 |
s tab. s nextPutLine:(self type storeString). |
4071 | 1585 |
|
1586 |
s nextPutAll:'package'. |
|
5232 | 1587 |
s tab. s nextPutLine:(packageId storeString). |
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1588 |
|
4726 | 1589 |
defNS := self defaultNameSpace. |
5199 | 1590 |
(defNS notNil and:[defNS ~~ Smalltalk]) ifTrue:[ |
4832
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1591 |
s nextPutAll:'nameSpace'. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1592 |
s tab. s nextPutLine:(defNS name storeString). |
5199 | 1593 |
] ifFalse:[ |
1594 |
defNS := nil. |
|
4074 | 1595 |
]. |
1596 |
||
5232 | 1597 |
"/ skip if same as what the packageID implies; |
1598 |
"/ this will be enforced in future versions. |
|
1599 |
repositoryModule isNil ifTrue:[ |
|
1600 |
repositoryModule := moduleFromPackageId. |
|
1601 |
]. |
|
1602 |
repositoryDirectory isNil ifTrue:[ |
|
1603 |
repositoryDirectory := directoryFromPackageId |
|
1604 |
]. |
|
1605 |
||
1606 |
(repositoryModule ~= moduleFromPackageId |
|
1607 |
or:[repositoryDirectory ~= directoryFromPackageId]) ifTrue:[ |
|
1608 |
'Project [warning]: module/directory does not correspond to packageId' infoPrintCR. |
|
1609 |
'Project [info]: this will be not supported in future versions' infoPrintCR. |
|
1610 |
||
1611 |
s nextPutAll:' |
|
4769 | 1612 |
; |
1613 |
; repository: |
|
1614 |
; |
|
1615 |
'. |
|
5232 | 1616 |
s nextPutAll:'repository.module'. |
1617 |
s tab. s nextPutLine:(repositoryModule ? 'private') storeString. |
|
1618 |
s nextPutAll:'repository.directory'. |
|
1619 |
s tab. s nextPutLine:(repositoryDirectory ? packageId) storeString. |
|
1620 |
s cr. |
|
1621 |
]. |
|
4071 | 1622 |
|
4124 | 1623 |
(t := properties at:#'sourcesDirectory' ifAbsent:nil) notNil ifTrue:[ |
4832
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1624 |
s nextPutAll:'sources'. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1625 |
s tab. s nextPutLine:(t storeString). |
4124 | 1626 |
]. |
1627 |
||
4074 | 1628 |
first := true. |
4071 | 1629 |
properties keysAndValuesDo:[:key :val | |
4832
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1630 |
(#( |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1631 |
comment |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1632 |
wasLoadedFromFile |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1633 |
targetconditions |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1634 |
classes |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1635 |
classInfo |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1636 |
methodInfo |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1637 |
prerequisiteClasses |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1638 |
files |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1639 |
sourcesDirectory |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1640 |
methodsFile |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1641 |
type |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1642 |
defaultNameSpace |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1643 |
) includes:key) ifFalse:[ |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1644 |
first ifTrue:[ |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1645 |
first := false. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1646 |
s nextPutAll:' |
4769 | 1647 |
; |
1648 |
; properties: |
|
1649 |
; |
|
1650 |
'. |
|
4832
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1651 |
]. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1652 |
s nextPutAll:'property.'; nextPutAll:key. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1653 |
s tab. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1654 |
key == #defaultNameSpace ifTrue:[ |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1655 |
s nextPutLine:val name storeString. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1656 |
] ifFalse:[ |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1657 |
s nextPutLine:val storeString. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1658 |
] |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1659 |
] |
4071 | 1660 |
]. |
4832
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1661 |
|
5232 | 1662 |
s nextPutAll:' |
1663 |
; |
|
1664 |
; sub-projects: |
|
1665 |
; |
|
1666 |
'. |
|
1667 |
s nextPutAll:'subProjects'; tab. |
|
1668 |
coll := self subProjects. |
|
1669 |
coll size = 0 ifTrue:[ |
|
1670 |
s nextPutLine:'#()'. |
|
1671 |
] ifFalse:[ |
|
1672 |
s nextPutLine:'#( \'. |
|
1673 |
coll do:[:aProjectOrProjectNameList | |
|
1674 |
|pName pPath| |
|
1675 |
||
1676 |
aProjectOrProjectNameList isString ifTrue:[ |
|
1677 |
pName := aProjectOrProjectNameList. |
|
1678 |
] ifFalse:[ |
|
1679 |
aProjectOrProjectNameList isArray ifTrue:[ |
|
1680 |
pName := aProjectOrProjectNameList at:1. |
|
1681 |
pPath := aProjectOrProjectNameList at:2. |
|
1682 |
] ifFalse:[ |
|
1683 |
pName := aProjectOrProjectNameList name. |
|
1684 |
pPath := aProjectOrProjectNameList repositoryPath. |
|
1685 |
] |
|
1686 |
]. |
|
1687 |
||
1688 |
pPath isNil ifTrue:[ |
|
1689 |
s tab. s nextPutAll:(pName storeString); nextPutLine:' \'. |
|
1690 |
] ifFalse:[ |
|
1691 |
s tab. s nextPutAll:'( '. |
|
1692 |
s nextPutAll:(pName storeString); space; |
|
1693 |
nextPutAll:(pPath storeString); nextPutLine:') \'. |
|
1694 |
] |
|
1695 |
]. |
|
1696 |
s nextPutLine:')'. |
|
1697 |
]. |
|
4074 | 1698 |
|
4769 | 1699 |
s nextPutAll:' |
1700 |
; |
|
1701 |
; required packages: |
|
1702 |
; |
|
1703 |
'. |
|
4074 | 1704 |
s nextPutAll:'prerequisites'; tab. |
1705 |
coll := self prerequisites. |
|
1706 |
coll size = 0 ifTrue:[ |
|
4832
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1707 |
s nextPutLine:'#()'. |
4074 | 1708 |
] ifFalse:[ |
4832
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1709 |
s nextPutLine:'#( \'. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1710 |
coll do:[:aProjectOrProjectNameList | |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1711 |
|pName pPath| |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1712 |
|
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1713 |
aProjectOrProjectNameList isString ifTrue:[ |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1714 |
pName := aProjectOrProjectNameList. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1715 |
] ifFalse:[ |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1716 |
aProjectOrProjectNameList isArray ifTrue:[ |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1717 |
pName := aProjectOrProjectNameList at:1. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1718 |
pPath := aProjectOrProjectNameList at:2. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1719 |
] ifFalse:[ |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1720 |
pName := aProjectOrProjectNameList name. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1721 |
pPath := aProjectOrProjectNameList repositoryPath. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1722 |
] |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1723 |
]. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1724 |
|
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1725 |
pPath isNil ifTrue:[ |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1726 |
s tab. s nextPutAll:(pName storeString); nextPutLine:' \'. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1727 |
] ifFalse:[ |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1728 |
s tab. s nextPutAll:'( '. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1729 |
s nextPutAll:(pName storeString); space; |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1730 |
nextPutAll:(pPath storeString); nextPutLine:') \'. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1731 |
] |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1732 |
]. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1733 |
s nextPutLine:')'. |
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1734 |
]. |
4124 | 1735 |
|
4769 | 1736 |
s nextPutAll:' |
1737 |
; |
|
1738 |
; required classes: |
|
1739 |
; |
|
1740 |
'. |
|
4099 | 1741 |
s nextPutAll:'prerequisiteClasses'; tab. |
1742 |
coll := self prerequisiteClasses. |
|
4769 | 1743 |
coll size = 0 ifTrue:[ |
4832
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1744 |
s nextPutLine:'#()'. |
4769 | 1745 |
] ifFalse:[ |
4832
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1746 |
s nextPutLine:'#( \'. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1747 |
coll do:[:aClassOrSymbol | |className| |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1748 |
|
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1749 |
(className := aClassOrSymbol) isSymbol ifFalse:[ |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1750 |
className := aClassOrSymbol name |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1751 |
]. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1752 |
s tab. s nextPutAll:(className storeString); nextPutLine:' \'. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1753 |
]. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1754 |
s nextPutLine:')'. |
4099 | 1755 |
]. |
4769 | 1756 |
|
1757 |
s nextPutAll:' |
|
1758 |
; |
|
1759 |
; classes: |
|
1760 |
; (for each class, one line of the form: ( #''className'' [condition [fileName]] ) |
|
1761 |
; (where fileName and condition are optional) |
|
1762 |
; |
|
1763 |
'. |
|
1764 |
||
1765 |
s nextPutAll:'classes'; tab. |
|
4074 | 1766 |
|
4832
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1767 |
classes := self classesInOrderFor:'save ''prj''-file.'. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1768 |
classes isNil ifTrue:[^ self]. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1769 |
|
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1770 |
classes size = 0 ifTrue:[ |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1771 |
s nextPutLine:'#()'. |
4769 | 1772 |
] ifFalse:[ |
4832
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1773 |
s nextPutLine:'#( \'. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1774 |
"/ find the longest className (for layout only) |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1775 |
|
5199 | 1776 |
maxLen := classes inject:0 into:[:maxSoFar :aClassOrName | |
4832
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1777 |
|clsName| |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1778 |
|
5199 | 1779 |
aClassOrName isBehavior ifTrue:[ |
1780 |
clsName := aClassOrName name. |
|
1781 |
] ifFalse:[ |
|
1782 |
clsName := aClassOrName. |
|
1783 |
defNS notNil ifTrue:[ |
|
1784 |
(clsName startsWith:(defNS name , '::')) ifFalse:[ |
|
1785 |
clsName := (defNS name , '::' , clsName) |
|
1786 |
] |
|
1787 |
]. |
|
1788 |
clsName := clsName asSymbol. |
|
1789 |
]. |
|
4832
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1790 |
maxSoFar max:clsName storeString size |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1791 |
]. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1792 |
|
5199 | 1793 |
classes do:[:aClassOrName | |
4832
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1794 |
|clsInfo clsName fileName cond| |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1795 |
|
5199 | 1796 |
aClassOrName isBehavior ifTrue:[ |
1797 |
clsName := aClassOrName name. |
|
1798 |
] ifFalse:[ |
|
1799 |
clsName := aClassOrName. |
|
1800 |
defNS notNil ifTrue:[ |
|
1801 |
(clsName startsWith:(defNS name , '::')) ifFalse:[ |
|
1802 |
clsName := (defNS name , '::' , clsName) |
|
1803 |
] |
|
1804 |
]. |
|
1805 |
clsName := clsName asSymbol. |
|
1806 |
]. |
|
1807 |
clsInfo := self classInfoFor:clsName. |
|
1808 |
clsInfo isNil ifTrue:[ |
|
1809 |
clsInfo := self classInfoFor:aClassOrName. |
|
1810 |
]. |
|
4832
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1811 |
fileName := clsInfo classFileName. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1812 |
fileName = (clsName , '.st') ifTrue:[ |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1813 |
fileName := nil |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1814 |
]. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1815 |
cond := (clsInfo conditionForInclusion) ? #always. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1816 |
s tab. s nextPutAll:'( '; |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1817 |
nextPutAll:(clsName storeString paddedTo:maxLen). |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1818 |
(cond ~~ #always or:[fileName notNil]) ifTrue:[ |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1819 |
s tab; nextPutAll:cond storeString. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1820 |
]. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1821 |
fileName notNil ifTrue:[ |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1822 |
s tab; nextPutAll:fileName storeString. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1823 |
]. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1824 |
s nextPutLine:') \'. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1825 |
]. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1826 |
s nextPutLine:')'. |
4124 | 1827 |
]. |
4769 | 1828 |
|
1829 |
s nextPutAll:' |
|
1830 |
; |
|
1831 |
; methods (patches & extensions): |
|
1832 |
; (for each method, one line of the form: ( #''className'' #''methodName'' ) |
|
1833 |
; (for metaclasses, #''name class'' is used) |
|
5232 | 1834 |
; These are stored in the methodsFile (see below) |
4769 | 1835 |
'. |
1836 |
||
1837 |
s nextPutAll:'methods'; tab. |
|
1838 |
||
1839 |
coll := self methodInfo. |
|
1840 |
coll size = 0 ifTrue:[ |
|
4832
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1841 |
s nextPutLine:'#()'. |
4769 | 1842 |
] ifFalse:[ |
4832
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1843 |
s nextPutLine:'#( \'. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1844 |
"/ find the longest className (for layout only) |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1845 |
|
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1846 |
maxLen := coll inject:0 into:[:maxSoFar :aMethodInfo | |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1847 |
|clsName| |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1848 |
|
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1849 |
clsName := aMethodInfo className. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1850 |
maxSoFar max:clsName storeString size |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1851 |
]. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1852 |
|
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1853 |
coll do:[:aMethodInfo | |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1854 |
|clsName mthdName fileName cond| |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1855 |
|
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1856 |
clsName := aMethodInfo className. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1857 |
mthdName := aMethodInfo methodName. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1858 |
s tab. s nextPutAll:'( '; |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1859 |
nextPutAll:(clsName storeString paddedTo:maxLen); |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1860 |
tab; nextPutAll:mthdName storeString. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1861 |
s nextPutLine:') \'. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1862 |
]. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1863 |
s nextPutLine:')'. |
4769 | 1864 |
]. |
1865 |
||
1866 |
methodsFile := properties at:#methodsFile ifAbsent:nil. |
|
5232 | 1867 |
methodsFile size == 0 ifTrue:[ |
1868 |
self methodInfo size > 0 ifTrue:[ |
|
1869 |
'Project [warning]: no methodsFile defined - generating a default' infoPrintCR. |
|
1870 |
methodsFile := 'extensions.st' |
|
1871 |
] |
|
1872 |
]. |
|
4792 | 1873 |
methodsFile size > 0 ifTrue:[ |
5232 | 1874 |
s nextPutAll:' |
1875 |
; |
|
1876 |
; methods above are stored in: |
|
1877 |
; |
|
1878 |
'. |
|
4832
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1879 |
s nextPutAll:'methodsFile'; tab; nextPutLine:'''' , methodsFile , ''''. |
4769 | 1880 |
]. |
1881 |
||
1882 |
s nextPutAll:' |
|
1883 |
; |
|
1884 |
; files (for deployment): |
|
1885 |
; |
|
1886 |
'. |
|
4314 | 1887 |
|
4124 | 1888 |
s nextPutAll:'files'; tab. |
1889 |
coll := properties at:#'files' ifAbsent:#(). |
|
4769 | 1890 |
coll size = 0 ifTrue:[ |
4832
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1891 |
s nextPutLine:'#()'. |
4769 | 1892 |
] ifFalse:[ |
4832
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1893 |
s nextPutLine:'#( \'. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1894 |
coll do:[:aFileEntry | |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1895 |
s tab. s nextPutAll:(aFileEntry storeString); nextPutLine:' \'. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1896 |
]. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1897 |
s nextPutLine:')'. |
4124 | 1898 |
]. |
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1899 |
|
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1900 |
" |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1901 |
Project current saveOn:Transcript |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1902 |
" |
4124 | 1903 |
|
1904 |
"Modified: / 26.4.1999 / 23:24:12 / cg" |
|
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1905 |
! ! |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1906 |
|
2 | 1907 |
!Project methodsFor:'maintenance'! |
1908 |
||
13 | 1909 |
buildProject |
4097 | 1910 |
"invoke 'make' in the project directory" |
1911 |
||
13 | 1912 |
OperatingSystem executeCommand:('cd ' , self directory , ' ; make') |
1913 |
! |
|
1914 |
||
4850 | 1915 |
buildProjectWithOutputTo:aStream |
1916 |
"invoke 'make' in the project directory" |
|
1917 |
||
1918 |
|p cmdOutStream cmdInStream readerProcess| |
|
1919 |
||
1920 |
aStream notNil ifTrue:[ |
|
1921 |
"/ need an external stream for that. |
|
1922 |
aStream isExternalStream ifTrue:[ |
|
1923 |
cmdOutStream := aStream |
|
1924 |
] ifFalse:[ |
|
1925 |
p := ExternalStream makePipe. |
|
1926 |
cmdOutStream := p at:2. |
|
1927 |
"/ start a reader process |
|
1928 |
readerProcess := [ |
|
1929 |
|data| |
|
1930 |
||
1931 |
cmdInStream := p at:1. |
|
1932 |
[cmdInStream atEnd] whileFalse:[ |
|
1933 |
data := cmdInStream nextAvailable:512. |
|
1934 |
aStream nextPutAll:data. |
|
1935 |
] |
|
1936 |
] newProcess. |
|
1937 |
readerProcess name:'cmd output reader'. |
|
1938 |
readerProcess resume. |
|
1939 |
] |
|
1940 |
]. |
|
1941 |
||
1942 |
OperatingSystem |
|
1943 |
executeCommand:('cd ' , self directory , ' ; make') |
|
1944 |
inputFrom:nil |
|
1945 |
outputTo:cmdOutStream |
|
1946 |
errorTo:cmdOutStream |
|
1947 |
inDirectory:nil |
|
1948 |
onError:[:status| false]. |
|
1949 |
||
1950 |
readerProcess terminate. |
|
1951 |
cmdInStream close. |
|
1952 |
cmdOutStream close. |
|
1953 |
! |
|
1954 |
||
4832
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1955 |
classesInOrderFor:whatMsg |
5199 | 1956 |
|classesOrNames classes numBad firstBad msg| |
1957 |
||
1958 |
classesOrNames := self classes. |
|
4097 | 1959 |
numBad := 0. |
1960 |
firstBad := nil. |
|
1961 |
||
5199 | 1962 |
classes := classesOrNames collect:[:clsOrSymbol | |cls| |
4886 | 1963 |
clsOrSymbol isBehavior ifFalse:[ |
1964 |
cls := Smalltalk at:clsOrSymbol asSymbol. |
|
4832
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1965 |
cls isNil ifTrue:[ |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1966 |
numBad := numBad + 1. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1967 |
firstBad := firstBad ? clsOrSymbol. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1968 |
] ifFalse:[ |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1969 |
cls isLoaded ifFalse:[ |
5671 | 1970 |
cls := cls autoload. |
4832
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1971 |
cls isLoaded ifFalse:[ |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1972 |
cls := nil |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1973 |
] |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1974 |
]. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1975 |
]. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1976 |
cls. |
4886 | 1977 |
] ifTrue:[ |
4832
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1978 |
clsOrSymbol |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1979 |
] |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1980 |
]. |
4097 | 1981 |
numBad ~~ 0 ifTrue:[ |
5199 | 1982 |
msg := 'Cannot determine load/compile order when about to ' , whatMsg. |
5734 | 1983 |
msg := msg , '\Reason: Class ''' , firstBad allBold |
4832
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1984 |
, ''' is not loaded.'. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1985 |
numBad ~~ 1 ifTrue:[ |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1986 |
msg := msg , '\(' , (numBad-1) printString , ' more unloaded classes were found)' |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1987 |
]. |
5199 | 1988 |
msg := msg , '\\You will have to manually load the classes or edit the project file.'. |
4832
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1989 |
self warn:msg withCRs. |
5199 | 1990 |
^ classesOrNames. |
4097 | 1991 |
]. |
1992 |
||
4785 | 1993 |
"/ to not list private classes |
1994 |
classes := classes select:[:cls | cls owningClass isNil]. |
|
4097 | 1995 |
classes := classes copy topologicalSort:[:a :b | b isSubclassOf:a]. |
1996 |
||
4832
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1997 |
^ classes |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1998 |
! |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1999 |
|
5314 | 2000 |
createAbbrevFile |
2001 |
"creates a 'abbrev.stc' file, for autoloading classes." |
|
2002 |
||
2003 |
|d f out in topName classes classInfo myPackage |
|
2004 |
methodsFile prerequisitePackages transcript notEmpty| |
|
2005 |
||
2006 |
classes := self classesInOrderFor:'generate ''abbrev.stc''-file.'. |
|
2007 |
classes isNil ifTrue:[^ self]. |
|
2008 |
||
2009 |
notEmpty := (classes size > 0). |
|
2010 |
||
2011 |
transcript := Transcript current. |
|
2012 |
transcript showCR:'creating abbrev.stc file'. |
|
2013 |
||
2014 |
d := directoryName asFilename. |
|
2015 |
f := d construct:'abbrev.stc'. |
|
2016 |
||
2017 |
out := f writeStream. |
|
2018 |
out isNil ifTrue:[ |
|
2019 |
self warn:'cannot create abbrev.stc'. |
|
2020 |
^ self |
|
2021 |
]. |
|
2022 |
||
2023 |
myPackage := self package. |
|
2024 |
||
2025 |
notEmpty ifTrue:[ |
|
2026 |
classes do:[:cls | |
|
5338 | 2027 |
|clsInfo cond fileName clsName clsCategory| |
5314 | 2028 |
|
2029 |
clsInfo := self classInfoFor:cls. |
|
2030 |
cond := clsInfo conditionForInclusion. |
|
2031 |
(cond == #always or:[cond == #autoload]) ifTrue:[ |
|
2032 |
fileName := clsInfo classFileName. |
|
2033 |
fileName isNil ifTrue:[ |
|
5338 | 2034 |
cls isBehavior ifTrue:[ |
2035 |
fileName := cls nameWithoutNameSpacePrefix |
|
2036 |
] ifFalse:[ |
|
2037 |
fileName := cls |
|
2038 |
] |
|
5314 | 2039 |
]. |
2040 |
(fileName endsWith:'.st') ifTrue:[ |
|
2041 |
fileName := fileName copyWithoutLast:3 |
|
2042 |
]. |
|
5338 | 2043 |
cls isBehavior ifTrue:[ |
2044 |
clsName := cls name. |
|
2045 |
clsCategory := cls category. |
|
2046 |
] ifFalse:[ |
|
2047 |
clsName := cls. |
|
2048 |
clsCategory := 'unknown category'. |
|
2049 |
]. |
|
2050 |
out nextPutAll:clsName. |
|
5314 | 2051 |
out space. |
2052 |
out nextPutAll:fileName. |
|
2053 |
out space. |
|
5338 | 2054 |
out nextPutAll:self package. |
5314 | 2055 |
out space. |
5338 | 2056 |
out nextPut:$'; nextPutAll:clsCategory; nextPut:$'. |
5314 | 2057 |
out cr. |
2058 |
] |
|
2059 |
]. |
|
2060 |
]. |
|
2061 |
out close |
|
2062 |
! |
|
2063 |
||
4832
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2064 |
createLoadAllFile |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2065 |
"creates a 'loadAll' file, which will load all classes |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2066 |
of the project - this loadAll file is supposed to be located |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2067 |
in the projects source directory." |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2068 |
|
5670 | 2069 |
|d f out in classes transcript | |
4832
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2070 |
|
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2071 |
classes := self classesInOrderFor:'generate ''loadAll''-file.'. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2072 |
classes isNil ifTrue:[^ self]. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2073 |
|
4850 | 2074 |
transcript := Transcript current. |
2075 |
transcript showCR:'creating loadAll file'. |
|
4097 | 2076 |
|
2077 |
d := directoryName asFilename. |
|
2078 |
f := d construct:'loadAll'. |
|
2079 |
f exists ifTrue:[ |
|
4832
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2080 |
f renameTo:(d construct:'loadAll.bak') |
4097 | 2081 |
]. |
2082 |
out := f writeStream. |
|
2083 |
out isNil ifTrue:[ |
|
4832
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2084 |
self warn:'cannot create loadAll'. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2085 |
(d construct:'loadAll.bak') renameTo:f. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2086 |
^ self |
4097 | 2087 |
]. |
5670 | 2088 |
self createLoadAllFileOn:out. |
2089 |
out close |
|
2090 |
! |
|
2091 |
||
2092 |
createLoadAllFileOn:outStream |
|
2093 |
"creates a 'loadAll' file, which will load all classes |
|
2094 |
of the project - this loadAll file is supposed to be located |
|
2095 |
in the projects source directory." |
|
2096 |
||
2097 |
|in classes classInfo myPackage |
|
2098 |
methodsFile prerequisitePackages transcript notEmpty| |
|
2099 |
||
2100 |
classes := self classesInOrderFor:'generate ''loadAll''-file.'. |
|
2101 |
classes isNil ifTrue:[^ self]. |
|
2102 |
||
2103 |
methodsFile := self propertyAt:#methodsFile. |
|
2104 |
notEmpty := (classes size > 0 or:[methodsFile size > 0]). |
|
4097 | 2105 |
|
4886 | 2106 |
myPackage := self package. |
2107 |
||
5670 | 2108 |
outStream nextPutLine:'"/ |
4814
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
2109 |
"/ $' , 'Header' , '$'. |
5670 | 2110 |
outStream nextPutLine:'"/ |
4886 | 2111 |
"/ loadAll-file to fileIn code for: ' , myPackage. |
4814
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
2112 |
|
5670 | 2113 |
outStream nextPutAll:'"/ |
4776 | 2114 |
"/ Automatically generated from project definition. |
4786 | 2115 |
"/ DO NOT MODIFY THIS fILE; |
4789
72a61dc595ad
loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents:
4787
diff
changeset
|
2116 |
"/ modify the .prj file instead, and regenerate this file |
4786 | 2117 |
"/ with the ProjectBrowser tool. |
4776 | 2118 |
"/ |
2119 |
||
2120 |
"/ |
|
2121 |
"/ Prerequisites: |
|
4814
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
2122 |
"/'. |
4796 | 2123 |
prerequisitePackages := self prerequisitePackages |
4832
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2124 |
collect:[:entry | |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2125 |
|pName| |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2126 |
|
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2127 |
entry isString ifTrue:[ |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2128 |
pName := entry |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2129 |
] ifFalse:[ |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2130 |
entry isArray ifTrue:[ |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2131 |
pName := entry at:1 |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2132 |
] ifFalse:[ |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2133 |
pName := entry name |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2134 |
] |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2135 |
] |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2136 |
]. |
4796 | 2137 |
|
2138 |
prerequisitePackages size == 0 ifTrue:[ |
|
5670 | 2139 |
outStream nextPutLine:''. |
2140 |
outStream nextPutLine:'"/ Smalltalk loadPackage:''module:directory''.'. |
|
2141 |
outStream nextPutLine:'"/ Smalltalk loadPackage:''....''.'. |
|
4814
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
2142 |
] ifFalse:[ |
5670 | 2143 |
outStream cr. |
4832
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2144 |
prerequisitePackages do:[:packName | |
5670 | 2145 |
outStream nextPutLine:'Smalltalk loadPackage:''' , packName , '''.'. |
4832
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2146 |
] |
4796 | 2147 |
]. |
2148 |
||
5167 | 2149 |
methodsFile := self propertyAt:#methodsFile. |
5177 | 2150 |
notEmpty ifTrue:[ |
5167 | 2151 |
|
5670 | 2152 |
outStream nextPutAll:'!! |
4776 | 2153 |
|
4886 | 2154 |
"{ package:''' , myPackage , ''' }"!! |
4776 | 2155 |
|
4097 | 2156 |
|files| |
2157 |
||
4886 | 2158 |
''loading package ' , myPackage , ' ...'' infoPrintCR. |
4776 | 2159 |
|
4097 | 2160 |
files := #( |
2161 |
'. |
|
2162 |
||
5167 | 2163 |
classes do:[:cls | |
2164 |
|clsInfo cond fileName| |
|
2165 |
||
2166 |
clsInfo := self classInfoFor:cls. |
|
2167 |
cond := clsInfo conditionForInclusion. |
|
2168 |
(cond == #always or:[cond == #autoload]) ifTrue:[ |
|
5670 | 2169 |
outStream nextPutAll:' '''. |
5167 | 2170 |
fileName := clsInfo classFileName. |
2171 |
fileName isNil ifTrue:[ |
|
5337 | 2172 |
cls isBehavior ifFalse:[ |
2173 |
fileName := cls |
|
2174 |
] ifTrue:[ |
|
2175 |
fileName := cls nameWithoutNameSpacePrefix |
|
2176 |
] |
|
5167 | 2177 |
]. |
2178 |
(fileName endsWith:'.st') ifFalse:[ |
|
2179 |
fileName := fileName , '.st' |
|
2180 |
]. |
|
5670 | 2181 |
fileName printOn:outStream. |
2182 |
outStream nextPutAll:''''; cr. |
|
5167 | 2183 |
] |
2184 |
]. |
|
2185 |
methodsFile size > 0 ifTrue:[ |
|
5670 | 2186 |
outStream |
5167 | 2187 |
nextPutAll:' '''; |
2188 |
nextPutAll:methodsFile; |
|
2189 |
nextPutAll:''''; |
|
2190 |
cr. |
|
2191 |
]. |
|
2192 |
||
5670 | 2193 |
outStream nextPutAll:') asOrderedCollection. |
4776 | 2194 |
|
4960 | 2195 |
"/ see if there is a classLibrary |
5173 | 2196 |
(Smalltalk fileInClassLibrary:''' , self libraryName , ''') ifTrue:[ |
4776 | 2197 |
|handle loaded| |
2198 |
||
4785 | 2199 |
handle := ObjectFileLoader loadedObjectHandles |
4886 | 2200 |
detect:[:h | h package = ''' , myPackage , '''] ifNone:nil. |
4776 | 2201 |
handle ifNotNil:[ |
4832
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2202 |
loaded := Set new:(handle classes size). |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2203 |
handle classes do:[:c| c isMeta ifFalse:[loaded add:c classFilename]]. |
4785 | 2204 |
'. |
4814
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
2205 |
|
5167 | 2206 |
methodsFile size > 0 ifTrue:[ |
5670 | 2207 |
outStream nextPutLine:(' loaded add:''' , methodsFile , '''.'). |
5167 | 2208 |
]. |
5670 | 2209 |
outStream nextPutAll:' files := files asOrderedCollection select:[:f| (loaded includes:f) not]. |
4776 | 2210 |
]. |
4814
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
2211 |
]. |
4097 | 2212 |
|
4960 | 2213 |
"/ load files which are not in the classLibrary (all if there is none) |
2214 |
files size > 0 ifTrue:[ |
|
5165 | 2215 |
files do:[:f | |
4785 | 2216 |
''.'' infoPrint. |
5165 | 2217 |
f asFilename exists ifTrue:[ |
2218 |
Smalltalk fileIn:f. |
|
2219 |
] ifFalse:[ |
|
2220 |
Smalltalk fileIn:(''source/'' , f) |
|
2221 |
] |
|
4960 | 2222 |
]. |
2223 |
'' '' infoPrintCR. |
|
4097 | 2224 |
]. |
4886 | 2225 |
'' done (' , myPackage , ').'' infoPrintCR. |
4887 | 2226 |
'. |
4097 | 2227 |
|
5167 | 2228 |
]. |
4097 | 2229 |
! |
2230 |
||
4850 | 2231 |
createMacMakefile |
2232 |
"creates an mac-os makefile" |
|
2233 |
||
2234 |
Transcript current showCR:'Mac support not yet implemented - no mac.mak created for Mac'. |
|
2235 |
! |
|
2236 |
||
2 | 2237 |
createMakefile |
4779 | 2238 |
"creates an initial Makefile from a Make.proto file. |
2239 |
Requires the stmkmf script" |
|
2240 |
||
5166 | 2241 |
|d top transcript stmkmf| |
2 | 2242 |
|
4821 | 2243 |
OperatingSystem isUNIXlike ifTrue:[ |
4850 | 2244 |
Transcript current showCR:'creating Makefile'. |
4821 | 2245 |
|
2246 |
d := directoryName asFilename pathName. |
|
5166 | 2247 |
top := (d , '/' , (self findTopFrom:directoryName)) asFilename. |
2248 |
||
2249 |
(top construct:'rules') exists ifFalse:[ |
|
2250 |
self warn:'Could not execute stmkmf - no TOP/rules directory found.' |
|
2251 |
]. |
|
2252 |
(stmkmf := ((top construct:'rules') construct:'stmkmf')) exists ifFalse:[ |
|
2253 |
self warn:'Could not execute stmkmf - no TOP/rules/stmkmf found.' |
|
2254 |
]. |
|
4821 | 2255 |
|
4850 | 2256 |
transcript := Transcript current. |
2257 |
||
4821 | 2258 |
(OperatingSystem |
5166 | 2259 |
executeCommand:('sh ' , stmkmf pathName) |
4850 | 2260 |
outputTo:transcript |
2261 |
errorTo:transcript |
|
2262 |
inDirectory:d |
|
2263 |
) ifFalse:[ |
|
5166 | 2264 |
self warn:'Error executing stmkmf - no Makefile built.' |
4821 | 2265 |
]. |
13 | 2266 |
]. |
4850 | 2267 |
self createNTMakefile. |
2268 |
self createVMSMakefile. |
|
2269 |
self createMacMakefile. |
|
4779 | 2270 |
|
4821 | 2271 |
"Modified: / 26.9.1999 / 16:18:29 / cg" |
2 | 2272 |
! |
2273 |
||
4822 | 2274 |
createNTMakefile |
4850 | 2275 |
"creates an nt.mak makefile" |
4822 | 2276 |
|
2277 |
|d f s type appName libName startUpClass startUpSelector |
|
4850 | 2278 |
topName classes methodsFile transcript| |
4832
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2279 |
|
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2280 |
classes := self classesInOrderFor:'generate ''nt.mak''-file.'. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2281 |
classes isNil ifTrue:[^ self]. |
4822 | 2282 |
|
2283 |
topName := self findTopFrom:directoryName. |
|
2284 |
||
4850 | 2285 |
transcript := Transcript current. |
2286 |
transcript showCR:'Generating make support for Win9x/WinNT...'. |
|
2287 |
transcript showCR:'creating bmake.bat'. |
|
2288 |
||
4822 | 2289 |
d := directoryName asFilename. |
2290 |
f := d construct:'bmake.bat'. |
|
2291 |
s := f writeStream. |
|
2292 |
s isNil ifTrue:[ |
|
2293 |
self warn:'cannot create bmake.bat'. |
|
2294 |
^ self |
|
2295 |
]. |
|
4824 | 2296 |
s nextPutLine:'if not exist object\nul mkdir objbc'. |
4822 | 2297 |
s nextPutLine:'make.exe -N -f nt.mak %1 %'. |
2298 |
s close. |
|
2299 |
||
4823 | 2300 |
|
4850 | 2301 |
transcript showCR:'creating bc.def'. |
2302 |
||
4822 | 2303 |
d := directoryName asFilename. |
2304 |
f := d construct:'bc.def'. |
|
2305 |
s := f writeStream. |
|
2306 |
s isNil ifTrue:[ |
|
2307 |
self warn:'cannot create bc.def'. |
|
2308 |
^ self |
|
2309 |
]. |
|
2310 |
s nextPutLine:'LIBRARY ' , self libraryName. |
|
2311 |
s nextPutLine:'DESCRIPTION ''AddOn library for ST/X'' |
|
2312 |
CODE PRELOAD MOVEABLE DISCARDABLE |
|
2313 |
SEGMENTS |
|
2314 |
INITCODE PRELOAD SHARED DISCARDABLE |
|
2315 |
EXPORTS |
|
2316 |
__' , self libraryName , '_Init @1'. |
|
2317 |
s close. |
|
2318 |
||
4823 | 2319 |
|
4850 | 2320 |
transcript showCR:'creating nt.def'. |
2321 |
||
4822 | 2322 |
d := directoryName asFilename. |
2323 |
f := d construct:'nt.def'. |
|
2324 |
s := f writeStream. |
|
2325 |
s isNil ifTrue:[ |
|
2326 |
self warn:'cannot create nt.def'. |
|
2327 |
^ self |
|
2328 |
]. |
|
2329 |
s nextPutLine:'LIBRARY ' , self libraryName. |
|
2330 |
s nextPutLine:'DESCRIPTION ''AddOn library for ST/X'' |
|
2331 |
CODE EXECUTE READ SHARED |
|
2332 |
DATA READ WRITE |
|
2333 |
SECTIONS |
|
2334 |
INITCODE READ EXECUTE SHARED |
|
2335 |
INITDATA READ WRITE |
|
2336 |
EXPORTS |
|
2337 |
_' , self libraryName , '_Init'. |
|
2338 |
s close. |
|
2339 |
||
4823 | 2340 |
|
4850 | 2341 |
transcript showCR:'creating libInit.cc'. |
2342 |
||
4823 | 2343 |
d := directoryName asFilename. |
2344 |
f := d construct:'libInit.cc'. |
|
2345 |
s := f writeStream. |
|
2346 |
s isNil ifTrue:[ |
|
2347 |
self warn:'cannot create libInit.cc'. |
|
2348 |
^ self |
|
2349 |
]. |
|
2350 |
s nextPutAll:'/* |
|
2351 |
* DO NOT EDIT |
|
2352 |
* automatically generated from project.prj |
|
2353 |
*/ |
|
2354 |
#define __INDIRECTVMINITCALLS__ |
|
2355 |
#include <stc.h> |
|
2356 |
#define INIT_TEXT_SECT /* as nothing */ |
|
2357 |
#ifdef WIN32 |
|
2358 |
# pragma codeseg INITCODE "INITCODE" |
|
2359 |
#else /* not WIN32 */ |
|
2360 |
# if defined(__GNUC__) |
|
2361 |
# if (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) || __GNUC__ > 2 |
|
2362 |
# undef INIT_TEXT_SECT |
|
2363 |
# define INIT_TEXT_SECT __attribute__((section(".stxitext"))) |
|
2364 |
# endif |
|
2365 |
# endif /* not GNUC */ |
|
2366 |
#endif /* not WIN32 */ |
|
2367 |
#ifdef INIT_TEXT_SECT |
|
2368 |
extern void _' , self libraryName , '_Init() INIT_TEXT_SECT; |
|
2369 |
#endif |
|
2370 |
void _' , self libraryName , '_Init(pass, __pRT__, snd) |
|
2371 |
OBJ snd; struct __vmData__ *__pRT__; { |
|
2372 |
__BEGIN_PACKAGE2__("' , self libraryName , '", _' , self libraryName , '_Init, "' , self package , '"); |
|
2373 |
'. |
|
2374 |
classes notNil ifTrue:[ |
|
2375 |
classes do:[:aClass | |
|
2376 |
|abbrev| |
|
2377 |
||
2378 |
abbrev := Smalltalk fileNameForClass:aClass name. |
|
2379 |
s nextPutAll:'_'; nextPutAll:abbrev; nextPutLine:'_Init(pass,__pRT__,snd);'. |
|
2380 |
]. |
|
2381 |
]. |
|
2382 |
s nextPutAll:'__END_PACKAGE__(); |
|
2383 |
} |
|
2384 |
'. |
|
2385 |
s close. |
|
2386 |
||
4850 | 2387 |
transcript showCR:'creating nt.mak'. |
4822 | 2388 |
|
2389 |
d := directoryName asFilename. |
|
2390 |
f := d construct:'nt.mak'. |
|
2391 |
f exists ifTrue:[ |
|
2392 |
f renameTo:(d construct:'nt.mak.bak') |
|
2393 |
]. |
|
2394 |
s := f writeStream. |
|
2395 |
s isNil ifTrue:[ |
|
2396 |
self warn:'cannot create nt.mak'. |
|
2397 |
^ self |
|
2398 |
]. |
|
2399 |
s nextPutAll:'# $' , 'Header'. |
|
2400 |
s nextPutLine:'$'. |
|
2401 |
s nextPutAll:'# |
|
2402 |
# -- nt.mak created from project at ' . |
|
2403 |
s nextPutAll:Smalltalk timeStamp. |
|
2404 |
s nextPutAll:' |
|
2405 |
# |
|
2406 |
# Warning: YOU SHOULD NOT MODIFY THIS FILE - MODIFY THE .prj FILE INSTEAD |
|
2407 |
# and let the ProjectBrowser recreate this file. |
|
2408 |
# once you modify this file, do not recreate nt.mak again |
|
2409 |
# - otherwise, your changes are lost. |
|
2410 |
||
2411 |
# module and directory-in-module; |
|
2412 |
# these should correspond to the directory hierarchy |
|
2413 |
# location (otherwise, ST/X will have a hard time to |
|
2414 |
# find out the packages location from its packageID) |
|
2415 |
MODULE=' , self repositoryModule ? 'unknown' , ' |
|
2416 |
MODULE_DIR=' , self repositoryDirectory ? 'unknown' , ' |
|
2417 |
||
2418 |
# default installation directory: |
|
2419 |
# (overwrite with ''make INSTALLTOP_DIR=... install'') |
|
2420 |
# the INSTALLBASE is imported from configurations... and usually |
|
2421 |
# defaults to something like /opt/smalltalk. |
|
2422 |
# (overwrite with ''make INSTALLBASE=... install'') |
|
2423 |
INSTALLTOP_DIR=$(INSTALLBASE)/packages/$(MODULE)/$(MODULE_DIR) |
|
2424 |
INSTALLLIB_DIR=$(INSTALLTOP_DIR) |
|
2425 |
INSTALLBIN_DIR=$(INSTALLTOP_DIR) |
|
2426 |
||
2427 |
# |
|
2428 |
# position (of this package) in directory hierarchy: |
|
2429 |
# (must point to ST/X top directory, for tools and includes) |
|
2430 |
TOP=' , topName ,' |
|
2431 |
||
5126 | 2432 |
!!INCLUDE "$(TOP)\rules\stdHeader_nt" |
4822 | 2433 |
|
2434 |
# subdirectories where targets are to be made: |
|
2435 |
SUBDIRS= |
|
2436 |
||
2437 |
# subdirectories where Makefiles are to be made: |
|
2438 |
# (only define if different from SUBDIRS) |
|
2439 |
# ALLSUBDIRS= |
|
2440 |
||
2441 |
||
2442 |
# the name of your classLibrary: |
|
2443 |
# ********** REQUIRED: CHECK the next line *** |
|
2444 |
LIBNAME=' , self libraryName , ' |
|
2445 |
||
5196 | 2446 |
#### LIB_BASE =0x05000000 |
4822 | 2447 |
|
2448 |
# the next define suppresses installation of |
|
2449 |
# the classes as autoloaded (i.e. not added to abbrev.stc). |
|
2450 |
SUPPRESS_LOCAL_ABBREVS=1 |
|
2451 |
||
2452 |
# the package is stored as an ID in classes and methods |
|
2453 |
# to identify code belonging to this project. |
|
2454 |
# It also specifies the position in the source repository |
|
2455 |
# and directory tree, when packages are loaded by packageID. |
|
2456 |
# ********** REQUIRED: CHECK the next line *** |
|
2457 |
PACKAGE=$(MODULE):$(MODULE_DIR) |
|
2458 |
||
2459 |
# Argument(s) to the stc compiler. |
|
2460 |
# -H. : create header files locally |
|
2461 |
# (if removed, they will be created as common |
|
2462 |
# -Pxxx : defines the package |
|
2463 |
# -Zxxx : a prefix for variables within the classLib |
|
2464 |
# -Dxxx : defines passed to to CC for inline C-code |
|
2465 |
# -Ixxx : include path passed to CC for inline C-code |
|
2466 |
# +optspace : optimized for space |
|
2467 |
# +optspace2 : optimized more for space |
|
2468 |
# +optspace3 : optimized even more for space |
|
2469 |
# +optinline : generate inline code for some ST constructs |
|
2470 |
# +inlineNew : additionally inline new |
|
2471 |
# +inlineMath : additionally inline some floatPnt math stuff |
|
2472 |
# |
|
2473 |
# ********** OPTIONAL: MODIFY the next line(s) *** |
|
2474 |
# STCLOCALOPTIMIZATIONS=+optinline +inlineNew |
|
2475 |
# STCLOCALOPTIMIZATIONS=+optspace3 |
|
2476 |
STCLOCALOPTIMIZATIONS=+optspace3 |
|
2477 |
||
2478 |
# Argument(s) to the stc compiler. |
|
2479 |
# -warn : no warnings |
|
2480 |
# -warnNonStandard : no warnings about ST/X extensions |
|
2481 |
# -warnEOLComments : no warnings about EOL comment extension |
|
2482 |
# -warnPrivacy : no warnings about privateClass extension |
|
2483 |
# |
|
2484 |
# ********** OPTIONAL: MODIFY the next line(s) *** |
|
2485 |
# STCWARNINGS=-warn |
|
2486 |
# STCWARNINGS=-warnNonStandard |
|
2487 |
# STCWARNINGS=-warnEOLComments |
|
2488 |
STCWARNINGS='. |
|
2489 |
(self propertyAt:#'make.stc.warnEOLComments') == false ifTrue:[ |
|
2490 |
s nextPutAll:'-warnEOLComments '. |
|
2491 |
]. |
|
2492 |
(self propertyAt:#'make.stc.warnNonStandard') == false ifTrue:[ |
|
2493 |
s nextPutAll:'-warnNonStandard '. |
|
2494 |
]. |
|
2495 |
s nextPutAll:((self propertyAt:#'make.stc.WARNINGOPTIONS') ? '') , ' |
|
2496 |
||
2497 |
# if your embedded C code requires any system includes, |
|
2498 |
# add the path(es) here:, |
|
2499 |
# ********** OPTIONAL: MODIFY the next lines *** |
|
2500 |
# LOCALINCLUDES=-Ifoo -Ibar |
|
2501 |
LOCALINCLUDES=' , ((self propertyAt:#'make.stc.LOCALINCLUDES') ? '') , ' |
|
2502 |
||
2503 |
# if you need any additional defines for embedded C code, |
|
2504 |
# add them here:, |
|
2505 |
# ********** OPTIONAL: MODIFY the next lines *** |
|
2506 |
# LOCALDEFINES=-Dfoo -Dbar -DDEBUG |
|
2507 |
LOCALDEFINES=' , ((self propertyAt:#'make.stc.LOCALDEFINES') ? '') , ' |
|
2508 |
||
5125 | 2509 |
STCLOCALOPT=-I. $(STCLOCALOPTIMIZATIONS) $(STCWARNINGS) $(LOCALINCLUDES) $(LOCALDEFINES) -H. -package=$(PACKAGE) -varPrefix=$(LIBNAME) $(COMMONSYMFLAG) $(INITCODESEPFLAG) |
4822 | 2510 |
|
2511 |
# ********** OPTIONAL: MODIFY the next line *** |
|
2512 |
# additional C-libraries that should be pre-linked with the class-objects |
|
2513 |
LD_OBJ_LIBS=' , ((self propertyAt:#'make.LD_OBJ_LIBS') ? '') , ' |
|
2514 |
||
2515 |
# ********** OPTIONAL: MODIFY the next line *** |
|
2516 |
# additional C targets or libraries should be added below |
|
2517 |
LOCAL_EXTRA_TARGETS=' , ((self propertyAt:#'make.LOCAL_EXTRA_TARGETS') ? '') , ' |
|
2518 |
||
2519 |
#ALL:: preMake $(LIBDIR)\$(LIBNAME).lib $(BINDIR)\$(LIBNAME).dll postMake |
|
2520 |
ALL:: $(LIBDIR)\$(LIBNAME).lib $(BINDIR)\$(LIBNAME).dll |
|
2521 |
||
2522 |
||
2523 |
'. |
|
2524 |
||
2525 |
"/ type := #library. |
|
2526 |
"/ appName := 'app'. |
|
2527 |
"/ libName := 'lib'. |
|
2528 |
"/ startUpClass := 'Smalltalk'. |
|
2529 |
"/ startUpSelector := 'start'. |
|
2530 |
"/ |
|
2531 |
"/ properties notNil ifTrue:[ |
|
2532 |
"/ type := properties at:#projectType ifAbsent:type. |
|
2533 |
"/ appName := properties at:#applicationName ifAbsent:appName. |
|
2534 |
"/ startUpClass := properties at:#startupClass ifAbsent:startUpClass. |
|
2535 |
"/ startUpSelector := properties at:#startupSelector ifAbsent:startUpSelector. |
|
2536 |
"/ ]. |
|
2537 |
"/ |
|
2538 |
"/ s nextPutAll:'# |
|
2539 |
"/# define the name of the library to create |
|
2540 |
"/# |
|
2541 |
"/'. |
|
2542 |
"/ s nextPutAll:'LIBNAME=lib' , appName; cr; cr. |
|
2543 |
"/ |
|
2544 |
"/ s nextPutAll:'# |
|
2545 |
"/# the target rule: |
|
2546 |
"/# |
|
2547 |
"/all:: abbrev.stc objs genClassList $(OBJTARGET) |
|
2548 |
"/ |
|
2549 |
"/'. |
|
2550 |
"/ |
|
2551 |
"/ type == #executable ifTrue:[ |
|
2552 |
"/ s nextPutAll:'PROGS = ' , appName; cr. |
|
2553 |
"/ s nextPutAll:('STARTUP_CLASS=' , startUpClass); cr. |
|
2554 |
"/ s nextPutAll:'STARTUP_SELECTOR="' , startUpSelector; nextPutAll:'"'; cr. |
|
2555 |
"/ ]. |
|
2556 |
"/ |
|
2557 |
"/ s nextPutAll:'# |
|
2558 |
"/# define the object files that are to be created |
|
2559 |
"/# |
|
2560 |
"/'. |
|
2561 |
s nextPutAll:'OBJS='. |
|
2562 |
||
2563 |
classes do:[:aClass | |
|
4833 | 2564 |
|fileName clsInfo cond include| |
4822 | 2565 |
|
2566 |
clsInfo := self classInfoFor:aClass. |
|
2567 |
include := true. |
|
2568 |
clsInfo notNil ifTrue:[ |
|
2569 |
cond := clsInfo conditionForInclusion. |
|
2570 |
(self conditionForInclusionIsTrue:cond) ifFalse:[ |
|
2571 |
include := false. |
|
2572 |
] ifTrue:[ |
|
2573 |
(self conditionForAutoloadIsTrue:cond) ifTrue:[ |
|
2574 |
include := false |
|
2575 |
] |
|
2576 |
]. |
|
2577 |
]. |
|
2578 |
include ifTrue:[ |
|
2579 |
s nextPutAll:' \'. s cr. |
|
4833 | 2580 |
fileName := clsInfo classFileName. |
2581 |
fileName isNil ifTrue:[ |
|
2582 |
fileName := Smalltalk fileNameForClass:aClass name. |
|
2583 |
]. |
|
2584 |
fileName := fileName asFilename withoutSuffix name. |
|
2585 |
s nextPutAll:' $(OUTDIR)'; nextPutAll:fileName; nextPutAll:'.$(O)'. |
|
4822 | 2586 |
] |
2587 |
]. |
|
2588 |
(methodsFile := self propertyAt:#methodsFile) size > 0 ifTrue:[ |
|
2589 |
s nextPutAll:' \'. s cr. |
|
2590 |
s nextPutAll:' $(OUTDIR)'; |
|
2591 |
nextPutAll:(methodsFile asFilename withoutSuffix baseName); |
|
2592 |
nextPutAll:'.$(O)'. |
|
2593 |
]. |
|
2594 |
s cr. |
|
2595 |
||
2596 |
s nextPutAll:' |
|
2597 |
# add more install actions here |
|
2598 |
install: |
|
2599 |
||
2600 |
# add more install actions for aux-files (resources) here |
|
2601 |
installAux: |
|
2602 |
||
2603 |
# add more preMake actions here |
|
2604 |
preMake: |
|
2605 |
||
2606 |
# add more postMake actions here |
|
2607 |
postMake: cleanjunk |
|
2608 |
||
2609 |
#clean:: |
|
2610 |
#' , Character tab , '-del $(OUTDIR)*.obj |
|
2611 |
#' , Character tab , '-del *.sc |
|
2612 |
||
2613 |
#clobber:: |
|
2614 |
#' , Character tab , '-del $(OUTDIR)*.obj |
|
2615 |
#' , Character tab , '-del *.sc |
|
2616 |
#' , Character tab , '-del *.dll |
|
2617 |
#' , Character tab , '-del *.lib |
|
2618 |
||
2619 |
||
5126 | 2620 |
!!INCLUDE $(TOP)\rules\stdRules_nt |
4822 | 2621 |
|
2622 |
# BEGINMAKEDEPEND --- do not remove this line; make depend needs it |
|
2623 |
'. |
|
2624 |
classes notNil ifTrue:[ |
|
2625 |
classes do:[:aClass | |
|
4833 | 2626 |
|fileName clsInfo| |
2627 |
||
2628 |
clsInfo := self classInfoFor:aClass. |
|
2629 |
fileName := clsInfo classFileName. |
|
2630 |
fileName isNil ifTrue:[ |
|
2631 |
fileName := Smalltalk fileNameForClass:aClass name. |
|
2632 |
]. |
|
2633 |
fileName := fileName asFilename withoutSuffix name. |
|
2634 |
s nextPutAll:'$(OUTDIR)'; nextPutAll:fileName; nextPutAll:'.$(O): '. |
|
2635 |
s nextPutAll:fileName; nextPutAll:'.st '. |
|
4822 | 2636 |
"/ aClass allSuperclassesDo:[:superClass| |
2637 |
"/ s nextPutAll:(Smalltalk fileNameForClass:superClass name) , '.$(H) '. |
|
2638 |
"/ ]. |
|
2639 |
s nextPutAll:'$(STCHDR)'; cr. |
|
2640 |
]. |
|
2641 |
]. |
|
2642 |
s nextPutAll:'# ENDMAKEDEPEND --- do not remove this line'. |
|
2643 |
s cr; cr. |
|
2644 |
||
2645 |
type == #executable ifTrue:[ |
|
2646 |
s nextPutAll:'ALL:: $(PROGS)'; cr. |
|
2647 |
||
2648 |
s nextPutAll:appName. |
|
2649 |
s nextPutAll:':: main.$(O) classList.$(O) $(OBJS)'; cr. |
|
2650 |
s tab; nextPutAll:'$(LD) $(ST_LDFLAG) $(LDFLAGS) -o '; |
|
2651 |
nextPutAll:appName; |
|
2652 |
nextPutAll:' \'; cr. |
|
2653 |
s tab; tab; nextPutAll:'$(CRT0) main.$(O) classList.$(O) $(OBJS) $(EXTRA_OBJ) $(LIBOBJS) \'; cr. |
|
2654 |
s tab; tab; nextPutAll:'$(LIBRUNDIR)/hidata.o $(LIBRUN) \'; cr. |
|
2655 |
s tab; tab; nextPutAll:'$(MATHLIB) $(EXTRALIBS) -lXext $(SYSLIBS) $(OTHERLIBS) $(CRTN)'; cr. |
|
2656 |
]. |
|
2657 |
||
2658 |
s close |
|
2659 |
||
5196 | 2660 |
"Modified: / 19.1.2000 / 16:55:34 / cg" |
4822 | 2661 |
! |
2662 |
||
617 | 2663 |
createProjectFiles |
2664 |
"actually, creates all files to do a make in the project directory" |
|
2665 |
||
2666 |
directoryName asFilename exists ifFalse:[ |
|
4814
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
2667 |
(self confirm:'create new projectDirectory: ' , directoryName) |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
2668 |
ifFalse:[^ self]. |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
2669 |
OperatingSystem recursiveCreateDirectory:directoryName. |
617 | 2670 |
]. |
2671 |
self createMakefile. |
|
2672 |
self createSourcefiles. |
|
2673 |
self createProtoMakefile. |
|
4097 | 2674 |
(self propertyAt:#deliverLoadAllFile) == true ifTrue:[ |
4814
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
2675 |
self createLoadAllFile |
4097 | 2676 |
]. |
617 | 2677 |
! |
2678 |
||
2 | 2679 |
createProtoMakefile |
2680 |
"creates a Make.proto file" |
|
2681 |
||
362 | 2682 |
|d f s type appName libName startUpClass startUpSelector |
5177 | 2683 |
topName classes methodsFile notEmpty repositoryModule repositoryDirectory pkg| |
4832
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2684 |
|
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2685 |
classes := self classesInOrderFor:'generate ''Make.proto''-file.'. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2686 |
classes isNil ifTrue:[^ self]. |
2 | 2687 |
|
5177 | 2688 |
methodsFile := self propertyAt:#methodsFile. |
2689 |
notEmpty := (classes size > 0 or:[methodsFile size > 0]). |
|
2690 |
||
362 | 2691 |
topName := self findTopFrom:directoryName. |
2 | 2692 |
|
5177 | 2693 |
repositoryModule := self repositoryModule ? 'unknown'. |
2694 |
repositoryDirectory := self repositoryDirectory ? 'unknown'. |
|
2695 |
pkg := repositoryModule , ':' , repositoryDirectory. |
|
4779 | 2696 |
|
4850 | 2697 |
Transcript current showCR:'creating Make.proto'. |
13 | 2698 |
|
356 | 2699 |
d := directoryName asFilename. |
2 | 2700 |
f := d construct:'Make.proto'. |
2701 |
f exists ifTrue:[ |
|
4832
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2702 |
f renameTo:(d construct:'Make.proto.bak') |
2 | 2703 |
]. |
2704 |
s := f writeStream. |
|
13 | 2705 |
s isNil ifTrue:[ |
4832
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2706 |
self warn:'cannot create prototype Makefile'. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2707 |
^ self |
13 | 2708 |
]. |
4814
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
2709 |
s nextPutAll:'# $' , 'Header'. |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
2710 |
s nextPutLine:'$'. |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
2711 |
s nextPutAll:'# |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
2712 |
# -- Make.proto created from project at ' . |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
2713 |
s nextPutAll:Smalltalk timeStamp. |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
2714 |
s nextPutAll:' |
2 | 2715 |
# |
4786 | 2716 |
# Warning: YOU SHOULD NOT MODIFY THIS FILE - MODIFY THE .prj FILE INSTEAD |
2717 |
# and let the ProjectBrowser recreate this file. |
|
2718 |
# once you modify this file, do not rerun |
|
4779 | 2719 |
# stmkmp or recreate the Make.proto again - otherwise, your changes are lost. |
2720 |
||
2721 |
# module and directory-in-module; |
|
2722 |
# these should correspond to the directory hierarchy |
|
2723 |
# location (otherwise, ST/X will have a hard time to |
|
2724 |
# find out the packages location from its packageID) |
|
5177 | 2725 |
MODULE=' , repositoryModule , ' |
2726 |
MODULE_DIR=' , repositoryDirectory , ' |
|
2727 |
'. |
|
2728 |
s nextPutAll:' |
|
4779 | 2729 |
# default installation directory: |
2730 |
# (overwrite with ''make INSTALLTOP_DIR=... install'') |
|
2731 |
# the INSTALLBASE is imported from configurations... and usually |
|
2732 |
# defaults to something like /opt/smalltalk. |
|
2733 |
# (overwrite with ''make INSTALLBASE=... install'') |
|
2734 |
INSTALLTOP_DIR=$(INSTALLBASE)/packages/$(MODULE)/$(MODULE_DIR) |
|
2735 |
INSTALLLIB_DIR=$(INSTALLTOP_DIR) |
|
2736 |
INSTALLBIN_DIR=$(INSTALLTOP_DIR) |
|
5177 | 2737 |
'. |
2738 |
s nextPutAll:' |
|
362 | 2739 |
# |
4779 | 2740 |
# position (of this package) in directory hierarchy: |
2741 |
# (must point to ST/X top directory, for tools and includes) |
|
2742 |
TOP=' , topName ,' |
|
2743 |
||
2744 |
# subdirectories where targets are to be made: |
|
5177 | 2745 |
SUBDIRS='. |
2746 |
self prerequisitePackages do:[:aPackageId | |
|
5179 | 2747 |
|p| |
2748 |
||
5229 | 2749 |
"/ add sub-packages only |
5177 | 2750 |
(aPackageId startsWith:pkg) ifTrue:[ |
5179 | 2751 |
p := aPackageId copyFrom:pkg size + 1. |
2752 |
(p startsWith:$/) ifTrue:[ |
|
2753 |
p := p copyFrom:2 |
|
2754 |
]. |
|
2755 |
s nextPutAll:p. |
|
5177 | 2756 |
s space. |
2757 |
] |
|
2758 |
]. |
|
2759 |
||
2760 |
s nextPutAll:' |
|
362 | 2761 |
|
4779 | 2762 |
# subdirectories where Makefiles are to be made: |
2763 |
# (only define if different from SUBDIRS) |
|
2764 |
# ALLSUBDIRS= |
|
5177 | 2765 |
'. |
2766 |
notEmpty ifTrue:[ |
|
2767 |
s nextPutAll:' |
|
4779 | 2768 |
# the name of your classLibrary: |
2769 |
# ********** REQUIRED: CHECK the next line *** |
|
4789
72a61dc595ad
loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents:
4787
diff
changeset
|
2770 |
LIBNAME=' , self libraryName , ' |
4779 | 2771 |
|
5177 | 2772 |
'. |
2773 |
]. |
|
2774 |
||
2775 |
false ifTrue:[ |
|
2776 |
s nextPutAll:' |
|
4779 | 2777 |
# the next define suppresses installation of |
2778 |
# the classes as autoloaded (i.e. not added to abbrev.stc). |
|
2779 |
SUPPRESS_LOCAL_ABBREVS=1 |
|
5177 | 2780 |
'. |
2781 |
]. |
|
2782 |
s nextPutAll:' |
|
4779 | 2783 |
# the package is stored as an ID in classes and methods |
2784 |
# to identify code belonging to this project. |
|
2785 |
# It also specifies the position in the source repository |
|
2786 |
# and directory tree, when packages are loaded by packageID. |
|
2787 |
# ********** REQUIRED: CHECK the next line *** |
|
2788 |
PACKAGE=$(MODULE):$(MODULE_DIR) |
|
2789 |
||
2790 |
# Argument(s) to the stc compiler. |
|
2791 |
# -H. : create header files locally |
|
2792 |
# (if removed, they will be created as common |
|
2793 |
# -Pxxx : defines the package |
|
2794 |
# -Zxxx : a prefix for variables within the classLib |
|
2795 |
# -Dxxx : defines passed to to CC for inline C-code |
|
2796 |
# -Ixxx : include path passed to CC for inline C-code |
|
2797 |
# +optspace : optimized for space |
|
2798 |
# +optspace2 : optimized more for space |
|
2799 |
# +optspace3 : optimized even more for space |
|
2800 |
# +optinline : generate inline code for some ST constructs |
|
2801 |
# +inlineNew : additionally inline new |
|
2802 |
# +inlineMath : additionally inline some floatPnt math stuff |
|
362 | 2803 |
# |
4779 | 2804 |
# ********** OPTIONAL: MODIFY the next line(s) *** |
2805 |
# STCLOCALOPTIMIZATIONS=+optinline +inlineNew |
|
2806 |
# STCLOCALOPTIMIZATIONS=+optspace3 |
|
2807 |
STCLOCALOPTIMIZATIONS=+optspace3 |
|
2808 |
||
2809 |
# Argument(s) to the stc compiler. |
|
2810 |
# -warn : no warnings |
|
2811 |
# -warnNonStandard : no warnings about ST/X extensions |
|
2812 |
# -warnEOLComments : no warnings about EOL comment extension |
|
2813 |
# -warnPrivacy : no warnings about privateClass extension |
|
362 | 2814 |
# |
4779 | 2815 |
# ********** OPTIONAL: MODIFY the next line(s) *** |
2816 |
# STCWARNINGS=-warn |
|
2817 |
# STCWARNINGS=-warnNonStandard |
|
2818 |
# STCWARNINGS=-warnEOLComments |
|
4796 | 2819 |
STCWARNINGS='. |
4832
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2820 |
(self propertyAt:#'make.stc.warnEOLComments') == false ifTrue:[ |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2821 |
s nextPutAll:'-warnEOLComments '. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2822 |
]. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2823 |
(self propertyAt:#'make.stc.warnNonStandard') == false ifTrue:[ |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2824 |
s nextPutAll:'-warnNonStandard '. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2825 |
]. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2826 |
s nextPutAll:((self propertyAt:#'make.stc.WARNINGOPTIONS') ? '') , ' |
4779 | 2827 |
|
2828 |
# if your embedded C code requires any system includes, |
|
2829 |
# add the path(es) here:, |
|
2830 |
# ********** OPTIONAL: MODIFY the next lines *** |
|
2831 |
# LOCALINCLUDES=-Ifoo -Ibar |
|
5229 | 2832 |
LOCALINCLUDES='. |
2833 |
s nextPutAll:((self propertyAt:#'make.stc.LOCALINCLUDES') ? ''). |
|
2834 |
self prerequisitePackages do:[:aPackageId | |
|
2835 |
|prj| |
|
2836 |
||
2837 |
s nextPutAll:'-I$(TOP)/../' , (aPackageId copyReplaceAll:$: with:$/) , ' '. |
|
2838 |
]. |
|
2839 |
s nextPutAll:' |
|
4779 | 2840 |
|
2841 |
# if you need any additional defines for embedded C code, |
|
2842 |
# add them here:, |
|
2843 |
# ********** OPTIONAL: MODIFY the next lines *** |
|
2844 |
# LOCALDEFINES=-Dfoo -Dbar -DDEBUG |
|
4796 | 2845 |
LOCALDEFINES=' , ((self propertyAt:#'make.stc.LOCALDEFINES') ? '') , ' |
4779 | 2846 |
|
2847 |
STCLOCALOPT=-I. $(STCLOCALOPTIMIZATIONS) $(STCWARNINGS) $(LOCALINCLUDES) $(LOCALDEFINES) -H. ''-P$(PACKAGE)'' ''-Z$(LIBNAME)'' $(COMMONSYMFLAG) $(INITCODESEPFLAG) |
|
2848 |
||
2849 |
# ********** OPTIONAL: MODIFY the next line *** |
|
2850 |
# additional C-libraries that should be pre-linked with the class-objects |
|
4796 | 2851 |
LD_OBJ_LIBS=' , ((self propertyAt:#'make.LD_OBJ_LIBS') ? '') , ' |
4779 | 2852 |
|
2853 |
# ********** OPTIONAL: MODIFY the next line *** |
|
2854 |
# additional C targets or libraries should be added below |
|
4796 | 2855 |
LOCAL_EXTRA_TARGETS=' , ((self propertyAt:#'make.LOCAL_EXTRA_TARGETS') ? '') , ' |
4779 | 2856 |
|
5177 | 2857 |
'. |
2858 |
||
2859 |
s nextPutAll:' |
|
2860 |
all:: preMake '. |
|
2861 |
notEmpty ifTrue:[ |
|
2862 |
s nextPutAll:'classLibRule ' |
|
2863 |
]. |
|
2864 |
s nextPutAll:'postMake |
|
4779 | 2865 |
|
2 | 2866 |
|
2867 |
'. |
|
2868 |
||
4779 | 2869 |
"/ type := #library. |
2870 |
"/ appName := 'app'. |
|
2871 |
"/ libName := 'lib'. |
|
2872 |
"/ startUpClass := 'Smalltalk'. |
|
2873 |
"/ startUpSelector := 'start'. |
|
2874 |
"/ |
|
2875 |
"/ properties notNil ifTrue:[ |
|
2876 |
"/ type := properties at:#projectType ifAbsent:type. |
|
2877 |
"/ appName := properties at:#applicationName ifAbsent:appName. |
|
2878 |
"/ startUpClass := properties at:#startupClass ifAbsent:startUpClass. |
|
2879 |
"/ startUpSelector := properties at:#startupSelector ifAbsent:startUpSelector. |
|
2880 |
"/ ]. |
|
2881 |
"/ |
|
2882 |
"/ s nextPutAll:'# |
|
2883 |
"/# define the name of the library to create |
|
2884 |
"/# |
|
2885 |
"/'. |
|
2886 |
"/ s nextPutAll:'LIBNAME=lib' , appName; cr; cr. |
|
2887 |
"/ |
|
2888 |
"/ s nextPutAll:'# |
|
2889 |
"/# the target rule: |
|
2890 |
"/# |
|
2891 |
"/all:: abbrev.stc objs genClassList $(OBJTARGET) |
|
2892 |
"/ |
|
2893 |
"/'. |
|
2894 |
"/ |
|
2895 |
"/ type == #executable ifTrue:[ |
|
2896 |
"/ s nextPutAll:'PROGS = ' , appName; cr. |
|
2897 |
"/ s nextPutAll:('STARTUP_CLASS=' , startUpClass); cr. |
|
2898 |
"/ s nextPutAll:'STARTUP_SELECTOR="' , startUpSelector; nextPutAll:'"'; cr. |
|
2899 |
"/ ]. |
|
2900 |
"/ |
|
2901 |
"/ s nextPutAll:'# |
|
2902 |
"/# define the object files that are to be created |
|
2903 |
"/# |
|
2904 |
"/'. |
|
2905 |
s nextPutAll:'OBJS='. |
|
2906 |
||
2907 |
classes do:[:aClass | |
|
4833 | 2908 |
|clsInfo cond include fileName| |
4832
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2909 |
|
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2910 |
clsInfo := self classInfoFor:aClass. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2911 |
include := true. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2912 |
clsInfo notNil ifTrue:[ |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2913 |
cond := clsInfo conditionForInclusion. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2914 |
(self conditionForInclusionIsTrue:cond) ifFalse:[ |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2915 |
include := false. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2916 |
] ifTrue:[ |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2917 |
(self conditionForAutoloadIsTrue:cond) ifTrue:[ |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2918 |
include := false |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2919 |
] |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2920 |
]. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2921 |
]. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2922 |
include ifTrue:[ |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2923 |
s nextPutAll:' \'. s cr. |
4833 | 2924 |
fileName := clsInfo classFileName. |
2925 |
fileName isNil ifTrue:[ |
|
2926 |
fileName := Smalltalk fileNameForClass:aClass name. |
|
2927 |
]. |
|
2928 |
fileName := fileName asFilename withoutSuffix name. |
|
2929 |
s nextPutAll:' '; nextPutAll:fileName; nextPutAll:'.$(O)'. |
|
4832
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2930 |
] |
2 | 2931 |
]. |
4792 | 2932 |
(methodsFile := self propertyAt:#methodsFile) size > 0 ifTrue:[ |
4832
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2933 |
s nextPutAll:' \'. s cr. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2934 |
s nextPutAll:' '; |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2935 |
nextPutAll:(methodsFile asFilename withoutSuffix baseName); |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2936 |
nextPutAll:'.$(O)'. |
4785 | 2937 |
]. |
4779 | 2938 |
s cr. |
2939 |
||
5229 | 2940 |
self prerequisitePackages size > 0 ifTrue:[ |
2941 |
s nextPutAll:' |
|
2942 |
# make required packages |
|
2943 |
prerequisites:: |
|
2944 |
'. |
|
2945 |
self prerequisitePackages do:[:aPackageId | |
|
2946 |
|prj| |
|
2947 |
||
2948 |
s tab; nextPutAll:'(cd $(TOP)/../' , (aPackageId copyReplaceAll:$: with:$/) , '; $(MAKE) ) '; cr. |
|
2949 |
]. |
|
2950 |
s cr. |
|
2951 |
]. |
|
4779 | 2952 |
s nextPutAll:' |
2953 |
# add more install actions here |
|
2954 |
install:: |
|
2955 |
||
2956 |
# add more install actions for aux-files (resources) here |
|
2957 |
installAux:: |
|
2958 |
||
2959 |
# add more preMake actions here |
|
2960 |
preMake:: |
|
2961 |
||
2962 |
# add more postMake actions here |
|
2963 |
postMake:: cleanjunk |
|
2964 |
||
2965 |
cleanjunk:: |
|
2966 |
||
2967 |
clean:: |
|
2968 |
' , Character tab , '-rm -f *.o *.H |
|
2969 |
||
2970 |
clobber:: |
|
2971 |
' , Character tab , '-rm -f *.so *.dll |
|
2972 |
||
2973 |
$(INSTALLBASE):: |
|
5177 | 2974 |
' , Character tab , '@test -d $@ || mkdir -p $@ |
4779 | 2975 |
|
2976 |
$(INSTALLBASE)/packages/$(MODULE)/$(MODULE_DIR):: $(INSTALLBASE)/packages/$(MODULE) |
|
5177 | 2977 |
' , Character tab , '@test -d $@ || mkdir -p $@ |
4779 | 2978 |
|
2979 |
# BEGINMAKEDEPEND --- do not remove this line; make depend needs it |
|
362 | 2980 |
'. |
4779 | 2981 |
"/ classes notNil ifTrue:[ |
2982 |
"/ classes do:[:aClass | |
|
2983 |
"/ |abbrev| |
|
2984 |
"/ |
|
2985 |
"/ abbrev := Smalltalk fileNameForClass:aClass name. |
|
2986 |
"/ s nextPutAll:abbrev; nextPutAll:'.$(O): '. |
|
2987 |
"/ s nextPutAll:abbrev; nextPutAll:'.st '. |
|
2988 |
"/ aClass allSuperclassesDo:[:superClass| |
|
2989 |
"/ s nextPutAll:(Smalltalk fileNameForClass:superClass name) , '.$(H) '. |
|
2990 |
"/ ]. |
|
2991 |
"/ s nextPutAll:'$(STCHDR)'; cr. |
|
2992 |
"/ ]. |
|
2993 |
"/ ]. |
|
2994 |
s nextPutAll:'# ENDMAKEDEPEND --- do not remove this line'. |
|
362 | 2995 |
s cr; cr. |
2 | 2996 |
|
2997 |
type == #executable ifTrue:[ |
|
4832
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2998 |
s nextPutAll:'all:: $(PROGS)'; cr. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2999 |
|
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
3000 |
s nextPutAll:appName. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
3001 |
s nextPutAll:':: main.o classList.o $(OBJS)'; cr. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
3002 |
s tab; nextPutAll:'$(LD) $(ST_LDFLAG) $(LDFLAGS) -o '; |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
3003 |
nextPutAll:appName; |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
3004 |
nextPutAll:' \'; cr. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
3005 |
s tab; tab; nextPutAll:'$(CRT0) main.$(O) classList.$(O) $(OBJS) $(EXTRA_OBJ) $(LIBOBJS) \'; cr. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
3006 |
s tab; tab; nextPutAll:'$(LIBRUNDIR)/hidata.o $(LIBRUN) \'; cr. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
3007 |
s tab; tab; nextPutAll:'$(MATHLIB) $(EXTRALIBS) -lXext $(SYSLIBS) $(OTHERLIBS) $(CRTN)'; cr. |
2 | 3008 |
]. |
3009 |
||
3010 |
s close |
|
1420 | 3011 |
|
4069 | 3012 |
"Modified: / 23.3.1999 / 14:20:09 / cg" |
617 | 3013 |
! |
3014 |
||
3015 |
createSourcefiles |
|
3016 |
"creates all Smalltalk-source files in the project directory" |
|
3017 |
||
3018 |
|classes methods methodClasses dir stream| |
|
3019 |
||
2956
952a09bdeed1
Use Filename instead of obsolete FileDirectory
Stefan Vogel <sv@exept.de>
parents:
2907
diff
changeset
|
3020 |
dir := self directory asFilename. |
4850 | 3021 |
Transcript current showCR:'creating sources in ' , dir pathName , ' ...'; endEntry. |
617 | 3022 |
|
3023 |
classes := self classes. |
|
4885 | 3024 |
classes size == 0 ifTrue:[ |
4850 | 3025 |
self warn:'no classes in current project' |
4885 | 3026 |
] ifFalse:[ |
4850 | 3027 |
classes do:[:aClass | |
3028 |
aClass isLoaded ifFalse:[ |
|
3029 |
aClass autoload. |
|
3030 |
]. |
|
3031 |
]. |
|
3032 |
"/ to not list private classes |
|
3033 |
classes := classes select:[:cls | cls owningClass isNil]. |
|
3034 |
classes := classes topologicalSort:[:a :b | a isSubclassOf:b]. |
|
3035 |
||
3036 |
classes do:[:aClass | |
|
3037 |
Transcript current show:' ... '; showCR:aClass name, '.st'; endEntry. |
|
3038 |
aClass fileOutIn:dir |
|
3039 |
] |
|
617 | 3040 |
]. |
3041 |
||
3042 |
methods := self individualMethods. |
|
4885 | 3043 |
methods size > 0 ifTrue:[ |
4850 | 3044 |
methods := methods asIdentitySet. |
3045 |
" |
|
3046 |
get classes ... |
|
3047 |
" |
|
3048 |
methodClasses := IdentitySet new. |
|
3049 |
methods do:[:m | |
|
3050 |
|mCls| |
|
3051 |
||
3052 |
mCls := m containingClass. |
|
6152
b987f345234e
condense changeSet after checking in an extensions container
Claus Gittinger <cg@exept.de>
parents:
6141
diff
changeset
|
3053 |
mCls := mCls theNonMetaclass. |
4850 | 3054 |
methodClasses add:mCls]. |
3055 |
" |
|
3056 |
fileOut by class |
|
3057 |
" |
|
3058 |
methodClasses do:[:cls | |
|
3059 |
stream := (self directory asFilename construct:(cls name , '.chg')) writeStream. |
|
3060 |
||
3061 |
Transcript current show:' ... '; showCR:cls name, '.chg'; endEntry. |
|
3062 |
methods do:[:m | |
|
3063 |
|mCls| |
|
3064 |
||
3065 |
mCls := m containingClass. |
|
3066 |
(mCls == cls or:[mCls == cls class]) ifTrue:[ |
|
3067 |
mCls fileOutMethod:m on:stream. |
|
3068 |
]. |
|
3069 |
stream cr. |
|
3070 |
]. |
|
3071 |
stream close. |
|
3072 |
]. |
|
617 | 3073 |
]. |
1420 | 3074 |
|
6152
b987f345234e
condense changeSet after checking in an extensions container
Claus Gittinger <cg@exept.de>
parents:
6141
diff
changeset
|
3075 |
"Modified: / 18.9.1997 / 18:50:34 / stefan" |
b987f345234e
condense changeSet after checking in an extensions container
Claus Gittinger <cg@exept.de>
parents:
6141
diff
changeset
|
3076 |
"Modified: / 5.11.2001 / 16:46:17 / cg" |
617 | 3077 |
! |
3078 |
||
4850 | 3079 |
createVMSMakefile |
3080 |
"creates an vms.mak makefile" |
|
3081 |
||
3082 |
Transcript current showCR:'VMS support not yet implemented - no vms.mak created'. |
|
3083 |
||
3084 |
! |
|
3085 |
||
617 | 3086 |
findTopFrom:directoryName |
3087 |
"returns the relative path from directoryName to the TOP |
|
3088 |
directory." |
|
3089 |
||
3090 |
|topName relParent foundTop| |
|
3091 |
||
3092 |
"/ find TOP |
|
3093 |
relParent := '..'. |
|
3094 |
foundTop := false. |
|
3095 |
[foundTop] whileFalse:[ |
|
4820 | 3096 |
topName := directoryName asFilename construct:relParent. |
3097 |
((topName construct:'stx') construct:'configurations') exists ifTrue:[ |
|
3098 |
((topName construct:'stx') construct:'include') exists ifTrue:[ |
|
4821 | 3099 |
^ relParent asFilename constructString:'stx'. |
4820 | 3100 |
] |
3101 |
]. |
|
3102 |
(topName construct:'configurations') exists ifTrue:[ |
|
3103 |
(topName construct:'include') exists ifTrue:[ |
|
4888 | 3104 |
^ relParent asFilename name |
4820 | 3105 |
] |
3106 |
]. |
|
3107 |
relParent := relParent asFilename constructString:'..'. |
|
3108 |
||
3109 |
topName isRootDirectory ifTrue:[ |
|
3110 |
self warn:'could not find TOP; assume absolute path to TOP'. |
|
3111 |
^ nil. |
|
4779 | 3112 |
"/ topName := '/usr/local/lib/smalltalk'. |
3113 |
"/ foundTop := true. |
|
4820 | 3114 |
] |
617 | 3115 |
]. |
4779 | 3116 |
^ topName pathName |
4820 | 3117 |
|
4821 | 3118 |
"Modified: / 26.9.1999 / 16:15:14 / cg" |
617 | 3119 |
! ! |
3120 |
||
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
3121 |
!Project methodsFor:'printing & storing'! |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
3122 |
|
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
3123 |
displayString |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
3124 |
^ super displayString , '(''' , (name ? '<unnamed>') , ''')' |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
3125 |
! ! |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
3126 |
|
617 | 3127 |
!Project methodsFor:'properties'! |
3128 |
||
4886 | 3129 |
addClass:classOrClassName |
3130 |
"add a class to the project" |
|
3131 |
||
3132 |
|fn| |
|
3133 |
||
3134 |
(classOrClassName isBehavior and:[classOrClassName isLoaded]) ifTrue:[ |
|
3135 |
fn := classOrClassName classFilename. |
|
3136 |
]. |
|
3137 |
fn isNil ifTrue:[ |
|
3138 |
fn := (Smalltalk fileNameForClass:classOrClassName) , '.st' |
|
3139 |
]. |
|
3140 |
self addClass:classOrClassName classFileName:fn |
|
3141 |
||
3142 |
! |
|
3143 |
||
4097 | 3144 |
addClass:classOrClassName classFileName:fileName |
3145 |
"add a class to the project" |
|
3146 |
||
3147 |
self |
|
4814
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3148 |
addClass:classOrClassName |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3149 |
conditionForInclusion:#always |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3150 |
classFileName:fileName |
4097 | 3151 |
|
3152 |
! |
|
3153 |
||
3154 |
addClass:classOrClassName conditionForInclusion:conditionBlock classFileName:fileName |
|
3155 |
"add a class to the project" |
|
3996
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
3156 |
|
4789
72a61dc595ad
loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents:
4787
diff
changeset
|
3157 |
|i clsName| |
72a61dc595ad
loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents:
4787
diff
changeset
|
3158 |
|
72a61dc595ad
loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents:
4787
diff
changeset
|
3159 |
(clsName := classOrClassName) isBehavior ifTrue:[ |
4886 | 3160 |
clsName := classOrClassName name |
3161 |
]. |
|
3162 |
(clsName startsWith:'Smalltalk::') ifTrue:[ |
|
3163 |
clsName := clsName copyFrom:'Smalltalk::' size + 1. |
|
4789
72a61dc595ad
loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents:
4787
diff
changeset
|
3164 |
]. |
3996
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
3165 |
|
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
3166 |
i := ClassInfo new. |
4789
72a61dc595ad
loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents:
4787
diff
changeset
|
3167 |
i className:clsName. |
3996
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
3168 |
i classFileName:fileName. |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
3169 |
i conditionForInclusion:conditionBlock. |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
3170 |
self addClassInfo:i |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
3171 |
! |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
3172 |
|
4089 | 3173 |
addClassInfo:newInfo |
3996
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
3174 |
"add a class info to the project" |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
3175 |
|
4315 | 3176 |
|infoCollection index nm prefix| |
3996
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
3177 |
|
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
3178 |
(infoCollection := self classInfo) isNil ifTrue:[ |
4814
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3179 |
self classInfo:(infoCollection := OrderedCollection new). |
3996
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
3180 |
]. |
4315 | 3181 |
|
3182 |
index := infoCollection findFirst:[:i | |nm1 nm2| |
|
4814
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3183 |
nm1 := i className. |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3184 |
nm2 := newInfo className. |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3185 |
nm1 = nm2 |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3186 |
]. |
4089 | 3187 |
index ~~ 0 ifTrue:[ |
4814
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3188 |
infoCollection at:index put:newInfo |
4089 | 3189 |
] ifFalse:[ |
4814
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3190 |
infoCollection add:newInfo |
4089 | 3191 |
] |
3996
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
3192 |
! |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
3193 |
|
4755
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3194 |
addMethod:methodName inClass:classOrClassName conditionForInclusion:condition fileName:optionalFileName |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3195 |
"add a method to the project" |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3196 |
|
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3197 |
|i| |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3198 |
|
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3199 |
i := MethodInfo new. |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3200 |
i className:classOrClassName. |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3201 |
i methodName:methodName. |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3202 |
i fileName:optionalFileName. |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3203 |
i conditionForInclusion:condition. |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3204 |
self addMethodInfo:i |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3205 |
! |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3206 |
|
4668 | 3207 |
addMethod:methodOrSelector inClass:aClassOrClassName fileName:fileName |
3208 |
"add an individual method to the project" |
|
3209 |
||
3210 |
|i| |
|
3211 |
||
3212 |
i := MethodInfo new. |
|
3213 |
i methodName:methodOrSelector. |
|
3214 |
i className:aClassOrClassName. |
|
3215 |
i fileName:fileName. |
|
3216 |
self addMethodInfo:i |
|
3217 |
! |
|
3218 |
||
4755
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3219 |
addMethodInfo:newInfo |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3220 |
"add a method info to the project" |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3221 |
|
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3222 |
|infoCollection index nm prefix| |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3223 |
|
5655 | 3224 |
prefix := self defaultNameSpace name , '::'. |
3225 |
||
4887 | 3226 |
infoCollection := self methodInfo. |
4755
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3227 |
|
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3228 |
index := infoCollection findFirst:[:i | |cnm1 cnm2| |
4887 | 3229 |
cnm1 := i className. |
3230 |
cnm2 := newInfo className. |
|
3231 |
(cnm1 includes:$:) ifFalse:[ |
|
5655 | 3232 |
cnm1 := prefix , cnm1 |
4887 | 3233 |
]. |
3234 |
(cnm2 includes:$:) ifFalse:[ |
|
5655 | 3235 |
cnm2 := prefix , cnm2 |
4887 | 3236 |
]. |
3237 |
cnm1 = cnm2 and:[i methodName = newInfo methodName] |
|
3238 |
]. |
|
4755
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3239 |
"/ strip off nameSpace prefix, if its the same as |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3240 |
"/ the default ... |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3241 |
|
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3242 |
nm := newInfo className. |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3243 |
(nm startsWith:prefix) ifTrue:[ |
4887 | 3244 |
nm := nm copyFrom:(prefix size + 1). |
3245 |
newInfo className:nm asSymbol. |
|
4755
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3246 |
]. |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3247 |
index ~~ 0 ifTrue:[ |
4887 | 3248 |
infoCollection at:index put:newInfo |
4755
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3249 |
] ifFalse:[ |
4887 | 3250 |
infoCollection add:newInfo |
4755
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3251 |
] |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3252 |
! |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3253 |
|
3996
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
3254 |
classInfo:aClassInfoCollection |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
3255 |
"set the class info of the project" |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
3256 |
|
4071 | 3257 |
self propertyAt:#classInfo put:aClassInfoCollection |
3996
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
3258 |
|
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
3259 |
! |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
3260 |
|
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
3261 |
comment |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
3262 |
"return the comment of the project" |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
3263 |
|
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
3264 |
properties isNil ifTrue:[^ '']. |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
3265 |
^ properties at:#comment ifAbsent:'' |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
3266 |
! |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
3267 |
|
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
3268 |
comment:aString |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
3269 |
"set the projects comment" |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
3270 |
|
4071 | 3271 |
self propertyAt:#comment put:aString |
4070 | 3272 |
|
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
3273 |
! |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
3274 |
|
3996
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
3275 |
documentationURL |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
3276 |
"return the documentation-URL of the project" |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
3277 |
|
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
3278 |
properties isNil ifTrue:[^ nil]. |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
3279 |
^ properties at:#documentationURL ifAbsent:nil |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
3280 |
! |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
3281 |
|
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
3282 |
documentationURL:anURLString |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
3283 |
"set the projects documentation-URL" |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
3284 |
|
4071 | 3285 |
self propertyAt:#documentationURL put:anURLString |
3286 |
||
3996
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
3287 |
! |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
3288 |
|
4755
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3289 |
methodInfo:aMethodInfoCollection |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3290 |
"set the method info of the project" |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3291 |
|
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3292 |
self propertyAt:#methodInfo put:aMethodInfoCollection |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3293 |
|
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3294 |
! |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3295 |
|
617 | 3296 |
properties |
4097 | 3297 |
"return the property dictionary" |
3298 |
||
617 | 3299 |
^ properties |
3300 |
! |
|
3301 |
||
3302 |
properties:p |
|
4097 | 3303 |
"set the property dictionary" |
3304 |
||
617 | 3305 |
properties := p |
3306 |
! |
|
3307 |
||
4071 | 3308 |
propertyAt:aKey |
4097 | 3309 |
"return a property; the key is a symbol" |
3310 |
||
4071 | 3311 |
properties isNil ifTrue:[^ nil]. |
3312 |
^ properties at:aKey ifAbsent:nil. |
|
3313 |
! |
|
3314 |
||
3315 |
propertyAt:aKey put:aValue |
|
4097 | 3316 |
"set a property; the key is a symbol" |
3317 |
||
4077 | 3318 |
|oldValue| |
3319 |
||
3320 |
oldValue := self propertyAt:aKey. |
|
3321 |
||
4071 | 3322 |
properties isNil ifTrue:[ |
4814
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3323 |
properties := IdentityDictionary new |
4071 | 3324 |
]. |
3325 |
properties at:aKey put:aValue. |
|
4077 | 3326 |
|
3327 |
oldValue ~~ aValue ifTrue:[ |
|
4814
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3328 |
self changed:aKey. |
4077 | 3329 |
]. |
4071 | 3330 |
|
3331 |
"Created: / 23.3.1999 / 14:21:11 / cg" |
|
3332 |
! |
|
3333 |
||
4792 | 3334 |
removeClass:classOrClassName |
3335 |
"remove a class from the project" |
|
3336 |
||
3337 |
|infoCollection index className| |
|
3338 |
||
3339 |
(infoCollection := self classInfo) isNil ifTrue:[^ self]. |
|
3340 |
||
3341 |
(className := classOrClassName) isBehavior ifTrue:[ |
|
4814
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3342 |
className := classOrClassName name |
4792 | 3343 |
]. |
3344 |
||
3345 |
index := infoCollection findFirst:[:i | i className = className.]. |
|
3346 |
index ~~ 0 ifTrue:[ |
|
4814
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3347 |
infoCollection removeIndex:index |
4792 | 3348 |
] |
3349 |
! |
|
3350 |
||
4834 | 3351 |
removeMethod:method |
3352 |
"remove a method from the project" |
|
3353 |
||
3354 |
|infoCollection index className selector| |
|
3355 |
||
4887 | 3356 |
(infoCollection := self methodInfo) size == 0 ifTrue:[^ self]. |
4834 | 3357 |
className := method who methodClass name. |
3358 |
selector := method who methodSelector. |
|
3359 |
||
3360 |
index := infoCollection findFirst:[:i | i className = className.]. |
|
3361 |
index ~~ 0 ifTrue:[ |
|
3362 |
infoCollection removeIndex:index |
|
3363 |
] |
|
3364 |
! |
|
3365 |
||
617 | 3366 |
type |
4097 | 3367 |
"return the type of project (one of #application, #library, #smalltalk)" |
617 | 3368 |
|
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
3369 |
properties isNil ifTrue:[^ #application]. |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
3370 |
^ properties at:#type ifAbsent:#application |
617 | 3371 |
! |
3372 |
||
3373 |
type:aSymbol |
|
4097 | 3374 |
"set the projects type (one of #application, #library, #smalltalk)" |
617 | 3375 |
|
4769 | 3376 |
|sym| |
3377 |
||
3378 |
(sym := aSymbol) == #classLibrary ifTrue:[ |
|
4814
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3379 |
sym := #library |
4769 | 3380 |
]. |
3381 |
(#(application library extension smalltalk) includes:sym) ifFalse:[ |
|
4814
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3382 |
self warn:'invalid project type'. |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3383 |
^ self |
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
3384 |
]. |
4769 | 3385 |
self propertyAt:#type put:sym |
4069 | 3386 |
! |
3387 |
||
3388 |
wasLoadedFromFile |
|
3389 |
"return true, if the project was loaded from a file" |
|
3390 |
||
3391 |
properties isNil ifTrue:[^ nil]. |
|
3392 |
^ properties at:#wasLoadedFromFile ifAbsent:false |
|
3393 |
||
3394 |
"Modified: / 23.3.1999 / 13:59:32 / cg" |
|
3395 |
"Created: / 23.3.1999 / 14:21:06 / cg" |
|
3396 |
! |
|
3397 |
||
3398 |
wasLoadedFromFile:aBoolean |
|
4097 | 3399 |
"set/clear the flag stating that the project was loaded from a file" |
3400 |
||
4071 | 3401 |
self propertyAt:#wasLoadedFromFile put:aBoolean |
617 | 3402 |
! ! |
3403 |
||
3404 |
!Project methodsFor:'queries'! |
|
3405 |
||
4688 | 3406 |
areAllClassesLoaded |
3407 |
"return true, if all classes of the package are loaded |
|
3408 |
(i.e. there are no autoloaded stubs present)" |
|
3409 |
||
4690 | 3410 |
|classes| |
3411 |
||
3412 |
classes := self classes. |
|
4885 | 3413 |
classes size == 0 ifTrue:[^ isLoaded ? false]. |
3414 |
||
4690 | 3415 |
classes do:[:aClass | |
4900 | 3416 |
aClass isBehavior ifFalse:[^ false]. |
4885 | 3417 |
aClass isLoaded ifFalse:[^ false]. |
4688 | 3418 |
]. |
3419 |
^ true |
|
3420 |
||
3421 |
! |
|
3422 |
||
3996
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
3423 |
classInfo |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
3424 |
"return a classInfo collection of classes belonging to that project" |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
3425 |
|
4073 | 3426 |
|classInfo classes| |
3996
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
3427 |
|
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
3428 |
properties notNil ifTrue:[ |
4814
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3429 |
classInfo := properties at:#classInfo ifAbsent:nil. |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3430 |
classInfo notNil ifTrue:[^ classInfo]. |
3996
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
3431 |
]. |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
3432 |
|
4073 | 3433 |
classes := self classes. |
3434 |
classes size == 0 ifTrue:[ |
|
4814
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3435 |
classInfo := OrderedCollection new |
4073 | 3436 |
] ifFalse:[ |
4814
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3437 |
classInfo := classes asOrderedCollection |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3438 |
collect:[:class | |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3439 |
|i fn| |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3440 |
|
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3441 |
i := ClassInfo new. |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3442 |
i conditionForInclusion:#always. |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3443 |
i className:class name. |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3444 |
fn := class classFilename ? ((Smalltalk fileNameForClass:class) , '.st'). |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3445 |
i classFileName:fn. |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3446 |
i |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3447 |
] |
4073 | 3448 |
]. |
3449 |
self propertyAt:#classInfo put:classInfo. |
|
3450 |
^ classInfo |
|
3996
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
3451 |
|
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
3452 |
"Modified: 4.1.1997 / 16:51:18 / cg" |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
3453 |
! |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
3454 |
|
4789
72a61dc595ad
loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents:
4787
diff
changeset
|
3455 |
classInfoFor:aClassOrClassName |
72a61dc595ad
loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents:
4787
diff
changeset
|
3456 |
"return a classInfo for a particular class" |
72a61dc595ad
loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents:
4787
diff
changeset
|
3457 |
|
72a61dc595ad
loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents:
4787
diff
changeset
|
3458 |
|classInfo clsName index| |
72a61dc595ad
loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents:
4787
diff
changeset
|
3459 |
|
72a61dc595ad
loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents:
4787
diff
changeset
|
3460 |
(classInfo := self classInfo) isNil ifTrue:[^ nil]. |
72a61dc595ad
loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents:
4787
diff
changeset
|
3461 |
(clsName := aClassOrClassName) isBehavior ifTrue:[ |
4814
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3462 |
clsName := aClassOrClassName name |
4789
72a61dc595ad
loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents:
4787
diff
changeset
|
3463 |
]. |
72a61dc595ad
loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents:
4787
diff
changeset
|
3464 |
^ classInfo detect:[:i | i className = clsName] ifNone:nil. |
72a61dc595ad
loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents:
4787
diff
changeset
|
3465 |
|
72a61dc595ad
loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents:
4787
diff
changeset
|
3466 |
|
72a61dc595ad
loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents:
4787
diff
changeset
|
3467 |
"Modified: 4.1.1997 / 16:51:18 / cg" |
72a61dc595ad
loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents:
4787
diff
changeset
|
3468 |
! |
72a61dc595ad
loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents:
4787
diff
changeset
|
3469 |
|
617 | 3470 |
classes |
4013
f06d31702f2a
ignore private classes in classList
Claus Gittinger <cg@exept.de>
parents:
4010
diff
changeset
|
3471 |
"return a collection of classes belonging to that project. |
f06d31702f2a
ignore private classes in classList
Claus Gittinger <cg@exept.de>
parents:
4010
diff
changeset
|
3472 |
This excludes any private classes." |
617 | 3473 |
|
3996
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
3474 |
|classes classInfo| |
617 | 3475 |
|
3996
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
3476 |
properties notNil ifTrue:[ |
4885 | 3477 |
classInfo := properties at:#classInfo ifAbsent:nil. |
3478 |
classInfo notNil ifTrue:[ |
|
3479 |
classes := classInfo collect:[:i | i className] |
|
3480 |
] ifFalse:[ |
|
3481 |
classes := properties at:#classes ifAbsent:nil |
|
3482 |
] |
|
3996
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
3483 |
]. |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
3484 |
|
5201 | 3485 |
(properties isNil |
3486 |
or:[properties at:#autoIncludeImageClasses ifAbsent:true]) |
|
3487 |
ifTrue:[ |
|
3488 |
classes isNil ifTrue:[ |
|
3489 |
classes := OrderedCollection new. |
|
3490 |
Smalltalk |
|
3491 |
allClassesDo:[:aClass | |
|
3492 |
(true "aClass owningClass isNil" |
|
3493 |
and:[aClass isMeta not |
|
3494 |
and:[aClass package = packageName |
|
5327
5e5602d156fa
#isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents:
5314
diff
changeset
|
3495 |
and:[aClass isNameSpace not or:[aClass == Smalltalk]]]]) ifTrue:[ |
5201 | 3496 |
classes add:aClass |
3497 |
] |
|
3498 |
]. |
|
3499 |
]. |
|
617 | 3500 |
]. |
4885 | 3501 |
^ classes ? #() |
617 | 3502 |
|
2056 | 3503 |
"Modified: 4.1.1997 / 16:51:18 / cg" |
617 | 3504 |
! |
3505 |
||
4887 | 3506 |
includesClass:aClassOrClassName |
3507 |
"return true, if a class is contained in the project" |
|
3508 |
||
3509 |
|infoCollection index className| |
|
3510 |
||
3511 |
(infoCollection := self classInfo) isNil ifTrue:[^ false]. |
|
3512 |
||
3513 |
aClassOrClassName isBehavior ifTrue:[ |
|
3514 |
className := aClassOrClassName name |
|
3515 |
] ifFalse:[ |
|
3516 |
className := aClassOrClassName |
|
3517 |
]. |
|
3518 |
||
3519 |
index := infoCollection findFirst:[:i | |nm1 nm2| |
|
3520 |
i className = className |
|
3521 |
]. |
|
3522 |
^ index ~~ 0 |
|
3523 |
! |
|
3524 |
||
3525 |
includesMethod:aMethod |
|
3526 |
"return true, if the given method is contained in the project |
|
3527 |
(either as patch/extension or as class" |
|
3528 |
||
3529 |
|who methodClass| |
|
3530 |
||
3531 |
who := aMethod who. |
|
3532 |
who isNil ifTrue:[^ false]. |
|
3533 |
methodClass := who methodClass. |
|
3534 |
(self includesClass:methodClass) ifTrue:[^ true]. |
|
3535 |
^ self includesMethodPatch:aMethod |
|
3536 |
! |
|
3537 |
||
3538 |
includesMethodPatch:aMethod |
|
3539 |
"return true, if the given method is contained in the project |
|
3540 |
as patch/extension" |
|
3541 |
||
3542 |
|who methodClass methodClassName methodSelector infoCollection index className selector| |
|
3543 |
||
3544 |
who := aMethod who. |
|
3545 |
who isNil ifTrue:[^ false]. |
|
3546 |
methodClass := who methodClass. |
|
3547 |
methodClassName := methodClass name. |
|
3548 |
methodSelector := who methodSelector. |
|
3549 |
||
3550 |
infoCollection := self methodInfo. |
|
3551 |
||
3552 |
index := infoCollection findFirst:[:i | |
|
3553 |
(i className = methodClassName |
|
3554 |
and:[i methodName = methodSelector]) |
|
3555 |
]. |
|
3556 |
^ index ~~ 0 |
|
3557 |
! |
|
3558 |
||
617 | 3559 |
individualMethods |
3560 |
"return a collection of individual methods belonging to that project, |
|
3561 |
only methods are returned which are not contained in the |
|
3562 |
projects class set." |
|
3563 |
||
4755
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3564 |
|
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3565 |
"/ |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3566 |
"/ obsoleted by #methods ... |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3567 |
"/ |
617 | 3568 |
|classes methods| |
3569 |
||
3570 |
classes := self classes. |
|
4885 | 3571 |
classes size > 0 ifTrue:[ |
3572 |
classes := classes asIdentitySet. |
|
617 | 3573 |
]. |
3574 |
||
3575 |
methods := IdentitySet new. |
|
5581 | 3576 |
Smalltalk allClassesDo:[:cls | |
4885 | 3577 |
|classToCheck| |
3578 |
||
3579 |
classToCheck := cls. |
|
4670 | 3580 |
"/ cls isPrivate ifTrue:[ |
3581 |
"/ classToCheck := cls topOwningClass |
|
3582 |
"/ ]. |
|
4885 | 3583 |
((classes includes:classToCheck) |
3584 |
or:[classes includes:classToCheck name]) not |
|
3585 |
ifTrue:[ |
|
6079
c18b15a12fe5
renamed: #allSelectorsAndMethodsDo: into: #instAndClassSelectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents:
6032
diff
changeset
|
3586 |
cls instAndClassSelectorsAndMethodsDo:[:sel :m | |
4885 | 3587 |
m package = packageName ifTrue:[ |
3588 |
methods add:m |
|
3589 |
] |
|
3590 |
]. |
|
3591 |
] |
|
617 | 3592 |
]. |
3593 |
^ methods asArray |
|
3594 |
||
3595 |
" |
|
3596 |
Project current classes |
|
3597 |
Project current individualMethods |
|
3598 |
" |
|
1461
dd25bb1e9973
Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents:
1420
diff
changeset
|
3599 |
|
dd25bb1e9973
Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents:
1420
diff
changeset
|
3600 |
"Modified: 7.6.1996 / 09:16:25 / stefan" |
4685
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
3601 |
! |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
3602 |
|
5897 | 3603 |
isDefaultProject |
3604 |
^ self == Project defaultProject |
|
3605 |
! |
|
3606 |
||
4685
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
3607 |
isLoaded |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
3608 |
"return true, if all of this project-package has been loaded |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
3609 |
into the system" |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
3610 |
|
4769 | 3611 |
|binaryModule cls| |
4685
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
3612 |
|
5178 | 3613 |
isLoaded == true ifTrue:[^ isLoaded]. |
4685
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
3614 |
|
4791 | 3615 |
"/ check for loaded class-library - assume loaded if present. |
4685
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
3616 |
binaryModule := ObjectMemory binaryModuleInfo detect:[:i | i package = self package] ifNone:nil. |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
3617 |
binaryModule notNil ifTrue:[ |
5178 | 3618 |
isLoaded := true. |
4819 | 3619 |
^ true |
4685
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
3620 |
]. |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
3621 |
|
4769 | 3622 |
"/ check for all classes ... |
3623 |
self classes do:[:aClassOrClassName | |
|
4819 | 3624 |
aClassOrClassName isBehavior ifFalse:[ |
5165 | 3625 |
aClassOrClassName isString ifTrue:[ |
3626 |
(cls := Smalltalk at:aClassOrClassName asSymbol) isNil ifTrue:[ |
|
4819 | 3627 |
^ false |
3628 |
]. |
|
3629 |
cls isBehavior ifFalse:[^ false]. |
|
3630 |
cls isLoaded ifFalse:[^ false]. |
|
3631 |
] ifFalse:[ |
|
3632 |
self halt. |
|
3633 |
^ false |
|
3634 |
] |
|
3635 |
] |
|
4769 | 3636 |
]. |
3637 |
||
4791 | 3638 |
"/ check for all patches & extensions ... |
3639 |
self methods do:[:aMethodInfo | |
|
4819 | 3640 |
aMethodInfo theMethod isNil ifTrue:[ |
3641 |
^ false |
|
3642 |
]. |
|
4791 | 3643 |
]. |
3644 |
||
5178 | 3645 |
isLoaded := true. |
4791 | 3646 |
^ true |
4685
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
3647 |
|
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
3648 |
" |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
3649 |
(Project projectWithId:#'stx:libbasic') isLoaded |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
3650 |
(Project projectWithId:#'stx:goodies/persistency') isLoaded |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
3651 |
" |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
3652 |
|
4819 | 3653 |
"Modified: / 26.9.1999 / 13:39:55 / cg" |
4755
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3654 |
! |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3655 |
|
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3656 |
methodInfo |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3657 |
"return a methodInfo collection of methods belonging to that project" |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3658 |
|
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3659 |
|methodInfo methods| |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3660 |
|
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3661 |
properties notNil ifTrue:[ |
4814
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3662 |
methodInfo := properties at:#methodInfo ifAbsent:nil. |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3663 |
methodInfo notNil ifTrue:[^ methodInfo]. |
4755
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3664 |
]. |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3665 |
|
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3666 |
methods := self methods. |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3667 |
methods size == 0 ifTrue:[ |
4814
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3668 |
methodInfo := OrderedCollection new |
4755
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3669 |
] ifFalse:[ |
4814
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3670 |
methodInfo := methods asOrderedCollection |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3671 |
collect:[:mthd | |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3672 |
|i fn who className selector| |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3673 |
|
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3674 |
mthd isMethod ifTrue:[ |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3675 |
who := mthd who. |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3676 |
className := who methodClass name. |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3677 |
selector := who methodSelector. |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3678 |
i := MethodInfo new. |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3679 |
i conditionForInclusion:#always. |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3680 |
i className:className. |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3681 |
i methodName:className. |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3682 |
fn := mthd sourceFilename. |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3683 |
i fileName:fn. |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3684 |
i |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3685 |
] ifFalse:[ |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3686 |
mthd "/ already a methodInfo |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3687 |
] |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3688 |
] |
4755
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3689 |
]. |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3690 |
self propertyAt:#methodInfo put:methodInfo. |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3691 |
^ methodInfo |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3692 |
|
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3693 |
"Modified: 4.1.1997 / 16:51:18 / cg" |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3694 |
! |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3695 |
|
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3696 |
methods |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3697 |
"return a collection of methods belonging to that project. |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3698 |
This excludes any methods which are already in my class-set." |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3699 |
|
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3700 |
|methods methodsInfo| |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3701 |
|
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3702 |
properties notNil ifTrue:[ |
5327
5e5602d156fa
#isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents:
5314
diff
changeset
|
3703 |
methodsInfo := properties at:#methodsInfo ifAbsent:nil. |
5e5602d156fa
#isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents:
5314
diff
changeset
|
3704 |
methodsInfo notNil ifTrue:[ |
5e5602d156fa
#isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents:
5314
diff
changeset
|
3705 |
methods := methodsInfo collect:[:i | i className] |
5e5602d156fa
#isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents:
5314
diff
changeset
|
3706 |
] ifFalse:[ |
5e5602d156fa
#isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents:
5314
diff
changeset
|
3707 |
methods := properties at:#methods ifAbsent:nil |
5e5602d156fa
#isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents:
5314
diff
changeset
|
3708 |
] |
4755
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3709 |
]. |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3710 |
|
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3711 |
methods isNil ifTrue:[ |
5327
5e5602d156fa
#isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents:
5314
diff
changeset
|
3712 |
methods := OrderedCollection new. |
5e5602d156fa
#isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents:
5314
diff
changeset
|
3713 |
Smalltalk allClassesDo:[:aClass | |
5e5602d156fa
#isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents:
5314
diff
changeset
|
3714 |
(true "aClass owningClass isNil" |
5e5602d156fa
#isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents:
5314
diff
changeset
|
3715 |
and:[aClass isMeta not |
5e5602d156fa
#isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents:
5314
diff
changeset
|
3716 |
and:[aClass package ~= packageName |
5e5602d156fa
#isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents:
5314
diff
changeset
|
3717 |
and:[aClass isNameSpace not or:[aClass == Smalltalk]]]]) ifTrue:[ |
5e5602d156fa
#isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents:
5314
diff
changeset
|
3718 |
|
5e5602d156fa
#isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents:
5314
diff
changeset
|
3719 |
aClass methodDictionary keysAndValuesDo:[:sel :mthd | |
5e5602d156fa
#isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents:
5314
diff
changeset
|
3720 |
mthd package = packageName ifTrue:[ |
5e5602d156fa
#isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents:
5314
diff
changeset
|
3721 |
methods add:(MethodInfo new |
5e5602d156fa
#isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents:
5314
diff
changeset
|
3722 |
className:aClass name; |
5e5602d156fa
#isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents:
5314
diff
changeset
|
3723 |
methodName:sel; |
5e5602d156fa
#isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents:
5314
diff
changeset
|
3724 |
yourself) |
5e5602d156fa
#isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents:
5314
diff
changeset
|
3725 |
]. |
5e5602d156fa
#isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents:
5314
diff
changeset
|
3726 |
]. |
5e5602d156fa
#isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents:
5314
diff
changeset
|
3727 |
aClass class methodDictionary keysAndValuesDo:[:sel :mthd | |
5e5602d156fa
#isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents:
5314
diff
changeset
|
3728 |
mthd package = packageName ifTrue:[ |
5e5602d156fa
#isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents:
5314
diff
changeset
|
3729 |
methods add:(MethodInfo new |
5e5602d156fa
#isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents:
5314
diff
changeset
|
3730 |
className:(aClass name , ' class'); |
5e5602d156fa
#isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents:
5314
diff
changeset
|
3731 |
methodName:sel; |
5e5602d156fa
#isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents:
5314
diff
changeset
|
3732 |
yourself) |
5e5602d156fa
#isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents:
5314
diff
changeset
|
3733 |
]. |
5e5602d156fa
#isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents:
5314
diff
changeset
|
3734 |
] |
5e5602d156fa
#isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents:
5314
diff
changeset
|
3735 |
] |
5e5602d156fa
#isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents:
5314
diff
changeset
|
3736 |
]. |
5e5602d156fa
#isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents:
5314
diff
changeset
|
3737 |
methods isEmpty ifTrue:[^ #()]. |
4755
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3738 |
]. |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3739 |
^ methods |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3740 |
|
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3741 |
"Modified: 4.1.1997 / 16:51:18 / cg" |
2 | 3742 |
! ! |
3743 |
||
3744 |
!Project methodsFor:'specifications'! |
|
3745 |
||
3746 |
readSpec |
|
3747 |
|s chunk fileName| |
|
3748 |
||
3749 |
fileName := (properties at:#directoryName) asFilename construct:'.project'. |
|
3750 |
s := fileName readStream. |
|
3751 |
s isNil ifTrue:[^ self]. |
|
3752 |
[s atEnd] whileFalse:[ |
|
203 | 3753 |
chunk := s nextChunk. |
3754 |
Compiler evaluate:chunk receiver:properties notifying:nil |
|
2 | 3755 |
]. |
3756 |
s close. |
|
3757 |
||
3758 |
"(Project new directory:'../projects/Clock') readSpec" |
|
3759 |
! |
|
3760 |
||
3761 |
saveSpec |
|
3762 |
|f d s| |
|
3763 |
||
3764 |
d := (properties at:#directoryName) asFilename. |
|
3765 |
d exists ifFalse:[ |
|
4814
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3766 |
self error:'directory does not exist' mayProceed:true. |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3767 |
^ self |
2 | 3768 |
]. |
3769 |
f := d construct:'.project'. |
|
3770 |
s := f writeStream. |
|
3771 |
s isNil ifTrue:[^ self]. |
|
3772 |
properties associationsDo:[:aProp | |
|
4814
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3773 |
(aProp == #directoryName) ifFalse:[ |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3774 |
s nextChunkPut:('self at:' , aProp key storeString, |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3775 |
' put:' , aProp value storeString). |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3776 |
s cr |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3777 |
] |
2 | 3778 |
]. |
3779 |
s close |
|
3780 |
||
3781 |
"((Project new directory:'../projects/Clock') readSpec |
|
4814
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3782 |
directory:'../projects/xxx') saveSpec" |
2 | 3783 |
! ! |
3784 |
||
617 | 3785 |
!Project methodsFor:'views'! |
3786 |
||
3787 |
addView:aView |
|
2164
063b0227aeda
use #remap instead of #map to show views
Claus Gittinger <cg@exept.de>
parents:
2056
diff
changeset
|
3788 |
"add a view to this projects set of views" |
063b0227aeda
use #remap instead of #map to show views
Claus Gittinger <cg@exept.de>
parents:
2056
diff
changeset
|
3789 |
|
617 | 3790 |
views notNil ifTrue:[views add:aView] |
2164
063b0227aeda
use #remap instead of #map to show views
Claus Gittinger <cg@exept.de>
parents:
2056
diff
changeset
|
3791 |
|
063b0227aeda
use #remap instead of #map to show views
Claus Gittinger <cg@exept.de>
parents:
2056
diff
changeset
|
3792 |
"Modified: 14.2.1997 / 15:36:51 / cg" |
617 | 3793 |
! |
3794 |
||
3795 |
destroyViews |
|
3796 |
"destroy all views of this project" |
|
3797 |
||
3798 |
views notNil ifTrue:[ |
|
3799 |
views do:[:aView | |
|
3800 |
aView notNil ifTrue:[aView destroy] |
|
3801 |
] |
|
3802 |
]. |
|
3803 |
! |
|
3804 |
||
3805 |
hideViews |
|
3806 |
"hide all views of this project" |
|
3807 |
||
3808 |
views notNil ifTrue:[ |
|
4814
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3809 |
views do:[:aView | |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3810 |
aView notNil ifTrue:[aView unmap] |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3811 |
] |
617 | 3812 |
]. |
1332
a1d72522f5fc
Rename unrealize-->unmap, rerealize->map.
Stefan Vogel <sv@exept.de>
parents:
1298
diff
changeset
|
3813 |
|
a1d72522f5fc
Rename unrealize-->unmap, rerealize->map.
Stefan Vogel <sv@exept.de>
parents:
1298
diff
changeset
|
3814 |
"Modified: 3.5.1996 / 23:48:51 / stefan" |
617 | 3815 |
! |
3816 |
||
3817 |
removeView:aView |
|
2164
063b0227aeda
use #remap instead of #map to show views
Claus Gittinger <cg@exept.de>
parents:
2056
diff
changeset
|
3818 |
"remove a view from this projects set of views" |
063b0227aeda
use #remap instead of #map to show views
Claus Gittinger <cg@exept.de>
parents:
2056
diff
changeset
|
3819 |
|
3996
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
3820 |
views notNil ifTrue:[ |
4814
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3821 |
views remove:aView ifAbsent:nil |
3996
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
3822 |
] |
2164
063b0227aeda
use #remap instead of #map to show views
Claus Gittinger <cg@exept.de>
parents:
2056
diff
changeset
|
3823 |
|
063b0227aeda
use #remap instead of #map to show views
Claus Gittinger <cg@exept.de>
parents:
2056
diff
changeset
|
3824 |
"Modified: 14.2.1997 / 15:37:20 / cg" |
617 | 3825 |
! |
3826 |
||
3827 |
showViews |
|
2164
063b0227aeda
use #remap instead of #map to show views
Claus Gittinger <cg@exept.de>
parents:
2056
diff
changeset
|
3828 |
"show all views of this project" |
063b0227aeda
use #remap instead of #map to show views
Claus Gittinger <cg@exept.de>
parents:
2056
diff
changeset
|
3829 |
|
617 | 3830 |
views notNil ifTrue:[ |
4814
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3831 |
views do:[:aView | |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3832 |
aView notNil ifTrue:[aView remap] |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3833 |
] |
617 | 3834 |
]. |
1332
a1d72522f5fc
Rename unrealize-->unmap, rerealize->map.
Stefan Vogel <sv@exept.de>
parents:
1298
diff
changeset
|
3835 |
|
a1d72522f5fc
Rename unrealize-->unmap, rerealize->map.
Stefan Vogel <sv@exept.de>
parents:
1298
diff
changeset
|
3836 |
"Modified: 3.5.1996 / 23:59:10 / stefan" |
2164
063b0227aeda
use #remap instead of #map to show views
Claus Gittinger <cg@exept.de>
parents:
2056
diff
changeset
|
3837 |
"Modified: 14.2.1997 / 15:38:47 / cg" |
617 | 3838 |
! ! |
3839 |
||
5734 | 3840 |
!Project::ClassInfo methodsFor:'accessing'! |
3841 |
||
3842 |
classFileName |
|
3843 |
"return the value of the instance variable 'classFileName' (automatically generated)" |
|
3844 |
||
3845 |
^ classFileName |
|
3846 |
! |
|
3847 |
||
3848 |
classFileName:something |
|
3849 |
"set the value of the instance variable 'classFileName' (automatically generated)" |
|
3850 |
||
3851 |
classFileName := something. |
|
3852 |
! |
|
3853 |
||
3854 |
className |
|
3855 |
"return the value of the instance variable 'className' (automatically generated)" |
|
3856 |
||
3857 |
^ className |
|
3858 |
! |
|
3859 |
||
3860 |
className:something |
|
3861 |
"set the value of the instance variable 'className' (automatically generated)" |
|
3862 |
||
3863 |
className := something. |
|
3864 |
! |
|
3865 |
||
3866 |
conditionForInclusion |
|
3867 |
"return the value of the instance variable 'conditionForInclusion' (automatically generated)" |
|
3868 |
||
3869 |
^ conditionForInclusion |
|
3870 |
! |
|
3871 |
||
3872 |
conditionForInclusion:something |
|
3873 |
"set the value of the instance variable 'conditionForInclusion' (automatically generated)" |
|
3874 |
||
3875 |
conditionForInclusion := something. |
|
3876 |
! ! |
|
3877 |
||
3878 |
!Project::ClassInfo methodsFor:'printing & storing'! |
|
3879 |
||
3880 |
displayString |
|
3881 |
^ 'ClassInfo: ' , className |
|
3882 |
! ! |
|
3883 |
||
3884 |
!Project::ClassInfo methodsFor:'queries'! |
|
3885 |
||
3886 |
theClass |
|
3887 |
|cls| |
|
3888 |
||
3889 |
cls := Smalltalk classNamed:className. |
|
3890 |
cls isNil ifTrue:[ ^ nil]. |
|
3891 |
^ cls |
|
3892 |
||
3893 |
"Created: / 26.9.1999 / 13:39:00 / cg" |
|
3894 |
! ! |
|
3895 |
||
4743 | 3896 |
!Project::MethodInfo methodsFor:'accessing'! |
3897 |
||
3898 |
className |
|
3899 |
"return the value of the instance variable 'className' (automatically generated)" |
|
3900 |
||
5734 | 3901 |
^ className |
3902 |
! |
|
4743 | 3903 |
|
3904 |
className:something |
|
3905 |
"set the value of the instance variable 'className' (automatically generated)" |
|
3906 |
||
5734 | 3907 |
className := something. |
3908 |
! |
|
4743 | 3909 |
|
4755
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3910 |
conditionForInclusion |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3911 |
"return the value of the instance variable 'conditionForInclusion' (automatically generated)" |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3912 |
|
5734 | 3913 |
^ conditionForInclusion |
3914 |
! |
|
4755
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3915 |
|
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3916 |
conditionForInclusion:something |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3917 |
"set the value of the instance variable 'conditionForInclusion' (automatically generated)" |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3918 |
|
5734 | 3919 |
conditionForInclusion := something. |
3920 |
! |
|
4755
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3921 |
|
4743 | 3922 |
fileName |
3923 |
"return the value of the instance variable 'fileName' (automatically generated)" |
|
3924 |
||
5734 | 3925 |
^ fileName |
3926 |
! |
|
4743 | 3927 |
|
3928 |
fileName:something |
|
3929 |
"set the value of the instance variable 'fileName' (automatically generated)" |
|
3930 |
||
5734 | 3931 |
fileName := something. |
3932 |
! |
|
4743 | 3933 |
|
3934 |
methodName |
|
3935 |
"return the value of the instance variable 'methodName' (automatically generated)" |
|
3936 |
||
5734 | 3937 |
^ methodName |
3938 |
! |
|
4743 | 3939 |
|
3940 |
methodName:something |
|
3941 |
"set the value of the instance variable 'methodName' (automatically generated)" |
|
3942 |
||
5734 | 3943 |
methodName := something. |
3944 |
! ! |
|
4743 | 3945 |
|
4755
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3946 |
!Project::MethodInfo methodsFor:'printing & storing'! |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3947 |
|
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3948 |
displayString |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3949 |
^ 'MethodInfo: ' , className , ' ' , methodName |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3950 |
|
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3951 |
|
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3952 |
! ! |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3953 |
|
4791 | 3954 |
!Project::MethodInfo methodsFor:'queries'! |
3955 |
||
3956 |
method |
|
4819 | 3957 |
self obsoleteMethodWarning. |
3958 |
^ self theMethod. |
|
3959 |
||
3960 |
"Modified: / 26.9.1999 / 13:40:16 / cg" |
|
3961 |
! |
|
3962 |
||
3963 |
theMethod |
|
4791 | 3964 |
|cls| |
3965 |
||
3966 |
cls := Smalltalk classNamed:className. |
|
3967 |
cls isNil ifTrue:[ ^ nil]. |
|
3968 |
^ cls compiledMethodAt:methodName asSymbol. |
|
4819 | 3969 |
|
3970 |
"Created: / 26.9.1999 / 13:39:07 / cg" |
|
3971 |
! ! |
|
3972 |
||
1854
b44227fd2b3d
use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents:
1636
diff
changeset
|
3973 |
!Project class methodsFor:'documentation'! |
630 | 3974 |
|
3975 |
version |
|
6192 | 3976 |
^ '$Header: /cvs/stx/stx/libbasic/Project.st,v 1.178 2001-11-16 12:21:45 cg Exp $' |
1298 | 3977 |
! ! |
1 | 3978 |
Project initialize! |