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