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